Skip to content

Enable single_line_comment_spacing #6484

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@
['var', 'phpstan-var', 'psalm-var'],
],
],
'statement_indentation' => true,
'single_line_comment_spacing' => true,
'statement_indentation' => true,
// >>>>>>>>>>>>>>>>>>>>>>>>>
];

Expand Down
3 changes: 2 additions & 1 deletion .php-cs-fixer.no-header.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@
['var', 'phpstan-var', 'psalm-var'],
],
],
'statement_indentation' => true,
'single_line_comment_spacing' => true,
'statement_indentation' => true,
// >>>>>>>>>>>>>>>>>>>>>>>>>
];

Expand Down
3 changes: 2 additions & 1 deletion .php-cs-fixer.user-guide.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@
['var', 'phpstan-var', 'psalm-var'],
],
],
'statement_indentation' => true,
'single_line_comment_spacing' => true,
'statement_indentation' => true,
// >>>>>>>>>>>>>>>>>>>>>>>>>
];

Expand Down
8 changes: 4 additions & 4 deletions app/Config/ContentSecurityPolicy.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
*/
class ContentSecurityPolicy extends BaseConfig
{
//-------------------------------------------------------------------------
// -------------------------------------------------------------------------
// Broadbrush CSP management
//-------------------------------------------------------------------------
// -------------------------------------------------------------------------

/**
* Default CSP report context
Expand All @@ -43,10 +43,10 @@ class ContentSecurityPolicy extends BaseConfig
*/
public $upgradeInsecureRequests = false;

//-------------------------------------------------------------------------
// -------------------------------------------------------------------------
// Sources allowed
// Note: once you set a policy to 'none', it cannot be further restricted
//-------------------------------------------------------------------------
// -------------------------------------------------------------------------

/**
* Will default to self if not overridden
Expand Down
2 changes: 1 addition & 1 deletion app/Config/Routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
// where controller filters or CSRF protection are bypassed.
// If you don't want to define all routes, please use the Auto Routing (Improved).
// Set `$autoRoutesImproved` to true in `app/Config/Feature.php` and set the following to true.
//$routes->setAutoRoute(false);
// $routes->setAutoRoute(false);

/*
* --------------------------------------------------------------------
Expand Down
8 changes: 4 additions & 4 deletions app/Config/Validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@

class Validation extends BaseConfig
{
//--------------------------------------------------------------------
// --------------------------------------------------------------------
// Setup
//--------------------------------------------------------------------
// --------------------------------------------------------------------

/**
* Stores the classes that contain the
Expand All @@ -38,7 +38,7 @@ class Validation extends BaseConfig
'single' => 'CodeIgniter\Validation\Views\single',
];

//--------------------------------------------------------------------
// --------------------------------------------------------------------
// Rules
//--------------------------------------------------------------------
// --------------------------------------------------------------------
}
8 changes: 4 additions & 4 deletions system/API/ResponseTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ protected function fail($messages, int $status = 400, ?string $code = null, stri
return $this->respond($response, $status, $customMessage);
}

//--------------------------------------------------------------------
// --------------------------------------------------------------------
// Response Helpers
//--------------------------------------------------------------------
// --------------------------------------------------------------------

/**
* Used after successfully creating a new resource.
Expand Down Expand Up @@ -290,9 +290,9 @@ protected function failServerError(string $description = 'Internal Server Error'
return $this->fail($description, $this->codes['server_error'], $code, $message);
}

//--------------------------------------------------------------------
// --------------------------------------------------------------------
// Utility Methods
//--------------------------------------------------------------------
// --------------------------------------------------------------------

/**
* Handles formatting a response. Currently makes some heavy assumptions
Expand Down
4 changes: 2 additions & 2 deletions system/CLI/CLI.php
Original file line number Diff line number Diff line change
Expand Up @@ -756,9 +756,9 @@ public static function wrap(?string $string = null, int $max = 0, int $padLeft =
return $lines;
}

//--------------------------------------------------------------------
// --------------------------------------------------------------------
// Command-Line 'URI' support
//--------------------------------------------------------------------
// --------------------------------------------------------------------

/**
* Parses the command line it was called from and collects all
Expand Down
24 changes: 12 additions & 12 deletions system/Cookie/Cookie.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,9 @@ public static function setDefaults($config = [])
return $oldDefaults;
}

//=========================================================================
// =========================================================================
// CONSTRUCTORS
//=========================================================================
// =========================================================================

/**
* Create a new Cookie instance from a `Set-Cookie` header.
Expand Down Expand Up @@ -238,9 +238,9 @@ final public function __construct(string $name, string $value = '', array $optio
$this->raw = $raw;
}

//=========================================================================
// =========================================================================
// GETTERS
//=========================================================================
// =========================================================================

/**
* {@inheritDoc}
Expand Down Expand Up @@ -391,9 +391,9 @@ public function getOptions(): array
];
}

//=========================================================================
// =========================================================================
// CLONING
//=========================================================================
// =========================================================================

/**
* {@inheritDoc}
Expand Down Expand Up @@ -556,9 +556,9 @@ public function withRaw(bool $raw = true)
return $cookie;
}

//=========================================================================
// =========================================================================
// ARRAY ACCESS FOR BC
//=========================================================================
// =========================================================================

/**
* Whether an offset exists.
Expand Down Expand Up @@ -614,9 +614,9 @@ public function offsetUnset($offset): void
throw new LogicException(sprintf('Cannot unset values of properties of %s as it is immutable.', static::class));
}

//=========================================================================
// =========================================================================
// CONVERTERS
//=========================================================================
// =========================================================================

/**
* {@inheritDoc}
Expand Down Expand Up @@ -716,9 +716,9 @@ protected static function convertExpiresTimestamp($expires = 0): int
return $expires > 0 ? (int) $expires : 0;
}

//=========================================================================
// =========================================================================
// VALIDATION
//=========================================================================
// =========================================================================

/**
* Validates the cookie name per RFC 2616.
Expand Down
4 changes: 2 additions & 2 deletions system/Database/BaseConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -1352,9 +1352,9 @@ protected function getDriverFunctionPrefix(): string
return strtolower($this->DBDriver) . '_';
}

//--------------------------------------------------------------------
// --------------------------------------------------------------------
// META Methods
//--------------------------------------------------------------------
// --------------------------------------------------------------------

/**
* Returns an array of table names
Expand Down
4 changes: 2 additions & 2 deletions system/Debug/Exceptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -329,9 +329,9 @@ protected function determineCodes(Throwable $exception): array
return [$statusCode, $exitStatus];
}

//--------------------------------------------------------------------
// --------------------------------------------------------------------
// Display Methods
//--------------------------------------------------------------------
// --------------------------------------------------------------------

/**
* This makes nicer looking paths for the error output.
Expand Down
24 changes: 12 additions & 12 deletions system/Files/FileCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ class FileCollection implements Countable, IteratorAggregate
*/
protected $files = [];

//--------------------------------------------------------------------
// --------------------------------------------------------------------
// Support Methods
//--------------------------------------------------------------------
// --------------------------------------------------------------------

/**
* Resolves a full path and verifies it is an actual directory.
Expand Down Expand Up @@ -106,9 +106,9 @@ final protected static function matchFiles(array $files, string $pattern): array
return array_filter($files, static fn ($value) => (bool) preg_match($pattern, basename($value)));
}

//--------------------------------------------------------------------
// --------------------------------------------------------------------
// Class Core
//--------------------------------------------------------------------
// --------------------------------------------------------------------

/**
* Loads the Filesystem helper and adds any initial files.
Expand Down Expand Up @@ -189,9 +189,9 @@ public function add($paths, bool $recursive = true)
return $this;
}

//--------------------------------------------------------------------
// --------------------------------------------------------------------
// File Handling
//--------------------------------------------------------------------
// --------------------------------------------------------------------

/**
* Verifies and adds files to the list.
Expand Down Expand Up @@ -245,9 +245,9 @@ public function removeFile(string $file)
return $this->removeFiles([$file]);
}

//--------------------------------------------------------------------
// --------------------------------------------------------------------
// Directory Handling
//--------------------------------------------------------------------
// --------------------------------------------------------------------

/**
* Verifies and adds files from each
Expand Down Expand Up @@ -287,9 +287,9 @@ public function addDirectory(string $directory, bool $recursive = false)
return $this;
}

//--------------------------------------------------------------------
// --------------------------------------------------------------------
// Filtering
//--------------------------------------------------------------------
// --------------------------------------------------------------------

/**
* Removes any files from the list that match the supplied pattern
Expand Down Expand Up @@ -335,9 +335,9 @@ public function retainPattern(string $pattern, ?string $scope = null)
return $this->removeFiles(array_diff($files, self::matchFiles($files, $pattern)));
}

//--------------------------------------------------------------------
// --------------------------------------------------------------------
// Interface Methods
//--------------------------------------------------------------------
// --------------------------------------------------------------------

/**
* Returns the current number of files in the collection.
Expand Down
4 changes: 2 additions & 2 deletions system/Filters/Filters.php
Original file line number Diff line number Diff line change
Expand Up @@ -382,9 +382,9 @@ public function getArguments(?string $key = null)
return $key === null ? $this->arguments : $this->arguments[$key];
}

//--------------------------------------------------------------------
// --------------------------------------------------------------------
// Processors
//--------------------------------------------------------------------
// --------------------------------------------------------------------

/**
* Add any applicable (not excluded) global filter settings to the mix.
Expand Down
8 changes: 4 additions & 4 deletions system/HTTP/MessageTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ trait MessageTrait
*/
protected $headerMap = [];

//--------------------------------------------------------------------
// --------------------------------------------------------------------
// Body
//--------------------------------------------------------------------
// --------------------------------------------------------------------

/**
* Sets the body of the current message.
Expand Down Expand Up @@ -70,9 +70,9 @@ public function appendBody($data): self
return $this;
}

//--------------------------------------------------------------------
// --------------------------------------------------------------------
// Headers
//--------------------------------------------------------------------
// --------------------------------------------------------------------

/**
* Populates the $headers array with any headers the server knows about.
Expand Down
4 changes: 2 additions & 2 deletions system/HTTP/Negotiate.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ public function language(array $supported): string
return $this->getBestMatch($supported, $this->request->getHeaderLine('accept-language'), false, false, true);
}

//--------------------------------------------------------------------
// --------------------------------------------------------------------
// Utility Methods
//--------------------------------------------------------------------
// --------------------------------------------------------------------

/**
* Does the grunt work of comparing any of the app-supported values
Expand Down
Loading