diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 82164ec63f16..0b83b6051d99 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -72,7 +72,8 @@ ['var', 'phpstan-var', 'psalm-var'], ], ], - 'statement_indentation' => true, + 'single_line_comment_spacing' => true, + 'statement_indentation' => true, // >>>>>>>>>>>>>>>>>>>>>>>>> ]; diff --git a/.php-cs-fixer.no-header.php b/.php-cs-fixer.no-header.php index 6764b3bc2c30..8e9f3351953b 100644 --- a/.php-cs-fixer.no-header.php +++ b/.php-cs-fixer.no-header.php @@ -64,7 +64,8 @@ ['var', 'phpstan-var', 'psalm-var'], ], ], - 'statement_indentation' => true, + 'single_line_comment_spacing' => true, + 'statement_indentation' => true, // >>>>>>>>>>>>>>>>>>>>>>>>> ]; diff --git a/.php-cs-fixer.user-guide.php b/.php-cs-fixer.user-guide.php index d17b75b18886..be38def156f6 100644 --- a/.php-cs-fixer.user-guide.php +++ b/.php-cs-fixer.user-guide.php @@ -66,7 +66,8 @@ ['var', 'phpstan-var', 'psalm-var'], ], ], - 'statement_indentation' => true, + 'single_line_comment_spacing' => true, + 'statement_indentation' => true, // >>>>>>>>>>>>>>>>>>>>>>>>> ]; diff --git a/app/Config/ContentSecurityPolicy.php b/app/Config/ContentSecurityPolicy.php index aa18ba9f1060..0be616301fb9 100644 --- a/app/Config/ContentSecurityPolicy.php +++ b/app/Config/ContentSecurityPolicy.php @@ -15,9 +15,9 @@ */ class ContentSecurityPolicy extends BaseConfig { - //------------------------------------------------------------------------- + // ------------------------------------------------------------------------- // Broadbrush CSP management - //------------------------------------------------------------------------- + // ------------------------------------------------------------------------- /** * Default CSP report context @@ -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 diff --git a/app/Config/Routes.php b/app/Config/Routes.php index ff2ac645cb9a..0bfdce972157 100644 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -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); /* * -------------------------------------------------------------------- diff --git a/app/Config/Validation.php b/app/Config/Validation.php index a254c1850015..e0a03bdf4f08 100644 --- a/app/Config/Validation.php +++ b/app/Config/Validation.php @@ -10,9 +10,9 @@ class Validation extends BaseConfig { - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- // Setup - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- /** * Stores the classes that contain the @@ -38,7 +38,7 @@ class Validation extends BaseConfig 'single' => 'CodeIgniter\Validation\Views\single', ]; - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- // Rules - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- } diff --git a/system/API/ResponseTrait.php b/system/API/ResponseTrait.php index 5f6a52c497e5..6ae0e3a361bd 100644 --- a/system/API/ResponseTrait.php +++ b/system/API/ResponseTrait.php @@ -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. @@ -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 diff --git a/system/CLI/CLI.php b/system/CLI/CLI.php index 7a5030314948..f20a08a103ff 100644 --- a/system/CLI/CLI.php +++ b/system/CLI/CLI.php @@ -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 diff --git a/system/Cookie/Cookie.php b/system/Cookie/Cookie.php index b153d8fe6e0f..72188451d3e2 100644 --- a/system/Cookie/Cookie.php +++ b/system/Cookie/Cookie.php @@ -152,9 +152,9 @@ public static function setDefaults($config = []) return $oldDefaults; } - //========================================================================= + // ========================================================================= // CONSTRUCTORS - //========================================================================= + // ========================================================================= /** * Create a new Cookie instance from a `Set-Cookie` header. @@ -238,9 +238,9 @@ final public function __construct(string $name, string $value = '', array $optio $this->raw = $raw; } - //========================================================================= + // ========================================================================= // GETTERS - //========================================================================= + // ========================================================================= /** * {@inheritDoc} @@ -391,9 +391,9 @@ public function getOptions(): array ]; } - //========================================================================= + // ========================================================================= // CLONING - //========================================================================= + // ========================================================================= /** * {@inheritDoc} @@ -556,9 +556,9 @@ public function withRaw(bool $raw = true) return $cookie; } - //========================================================================= + // ========================================================================= // ARRAY ACCESS FOR BC - //========================================================================= + // ========================================================================= /** * Whether an offset exists. @@ -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} @@ -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. diff --git a/system/Database/BaseConnection.php b/system/Database/BaseConnection.php index 865a1893b902..11e54ea72aaa 100644 --- a/system/Database/BaseConnection.php +++ b/system/Database/BaseConnection.php @@ -1352,9 +1352,9 @@ protected function getDriverFunctionPrefix(): string return strtolower($this->DBDriver) . '_'; } - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- // META Methods - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- /** * Returns an array of table names diff --git a/system/Debug/Exceptions.php b/system/Debug/Exceptions.php index 68dbf98d174a..437a47268706 100644 --- a/system/Debug/Exceptions.php +++ b/system/Debug/Exceptions.php @@ -329,9 +329,9 @@ protected function determineCodes(Throwable $exception): array return [$statusCode, $exitStatus]; } - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- // Display Methods - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- /** * This makes nicer looking paths for the error output. diff --git a/system/Files/FileCollection.php b/system/Files/FileCollection.php index 20b208fded43..ee1d0477d34c 100644 --- a/system/Files/FileCollection.php +++ b/system/Files/FileCollection.php @@ -33,9 +33,9 @@ class FileCollection implements Countable, IteratorAggregate */ protected $files = []; - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- // Support Methods - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- /** * Resolves a full path and verifies it is an actual directory. @@ -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. @@ -189,9 +189,9 @@ public function add($paths, bool $recursive = true) return $this; } - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- // File Handling - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- /** * Verifies and adds files to the list. @@ -245,9 +245,9 @@ public function removeFile(string $file) return $this->removeFiles([$file]); } - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- // Directory Handling - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- /** * Verifies and adds files from each @@ -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 @@ -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. diff --git a/system/Filters/Filters.php b/system/Filters/Filters.php index 353ce4e90f20..ca2b8a4b5ba8 100644 --- a/system/Filters/Filters.php +++ b/system/Filters/Filters.php @@ -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. diff --git a/system/HTTP/MessageTrait.php b/system/HTTP/MessageTrait.php index 90e36ad5dccc..daa70875f548 100644 --- a/system/HTTP/MessageTrait.php +++ b/system/HTTP/MessageTrait.php @@ -38,9 +38,9 @@ trait MessageTrait */ protected $headerMap = []; - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- // Body - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- /** * Sets the body of the current message. @@ -70,9 +70,9 @@ public function appendBody($data): self return $this; } - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- // Headers - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- /** * Populates the $headers array with any headers the server knows about. diff --git a/system/HTTP/Negotiate.php b/system/HTTP/Negotiate.php index d0e822574b85..7b0fdc2d54b4 100644 --- a/system/HTTP/Negotiate.php +++ b/system/HTTP/Negotiate.php @@ -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 diff --git a/system/HTTP/ResponseInterface.php b/system/HTTP/ResponseInterface.php index 7c824c7818e6..e8bfde68dde2 100644 --- a/system/HTTP/ResponseInterface.php +++ b/system/HTTP/ResponseInterface.php @@ -146,9 +146,9 @@ public function setStatusCode(int $code, string $reason = ''); */ public function getReason(): string; - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- // Convenience Methods - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- /** * Sets the date header @@ -186,9 +186,9 @@ public function setLink(PagerInterface $pager); */ public function setContentType(string $mime, string $charset = 'UTF-8'); - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- // Formatter Methods - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- /** * Converts the $body into JSON and sets the Content Type header. @@ -226,11 +226,11 @@ public function setXML($body); */ public function getXML(); - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- // Cache Control Methods // // http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9 - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- /** * Sets the appropriate headers to ensure this response @@ -266,9 +266,9 @@ public function noCache(); */ public function setCache(array $options = []); - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- // Output Methods - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- /** * Sends the output to the browser. @@ -291,9 +291,9 @@ public function sendHeaders(); */ public function sendBody(); - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- // Cookie Methods - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- /** * Set a cookie @@ -351,9 +351,9 @@ public function deleteCookie(string $name = '', string $domain = '', string $pat */ public function getCookies(); - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- // Response Methods - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- /** * Perform a redirect to a new URL, in two flavors: header or location. diff --git a/system/HTTP/ResponseTrait.php b/system/HTTP/ResponseTrait.php index 66c7ce263fed..2b96d6a083aa 100644 --- a/system/HTTP/ResponseTrait.php +++ b/system/HTTP/ResponseTrait.php @@ -165,9 +165,9 @@ public function setStatusCode(int $code, string $reason = '') return $this; } - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- // Convenience Methods - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- /** * Sets the date header @@ -323,11 +323,11 @@ protected function formatBody($body, string $format) return $body; } - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- // Cache Control Methods // // http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9 - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- /** * Sets the appropriate headers to ensure this response @@ -422,9 +422,9 @@ public function setLastModified($date) return $this; } - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- // Output Methods - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- /** * Sends the output to the browser. diff --git a/system/Helpers/cookie_helper.php b/system/Helpers/cookie_helper.php index 5537de9c3899..bb355f70224a 100755 --- a/system/Helpers/cookie_helper.php +++ b/system/Helpers/cookie_helper.php @@ -13,9 +13,9 @@ use Config\Cookie; use Config\Services; -//============================================================================= +// ============================================================================= // CodeIgniter Cookie Helpers -//============================================================================= +// ============================================================================= if (! function_exists('set_cookie')) { /** diff --git a/system/I18n/Time.php b/system/I18n/Time.php index 62129245d67c..9b8633fe006b 100644 --- a/system/I18n/Time.php +++ b/system/I18n/Time.php @@ -62,9 +62,9 @@ class Time extends DateTime */ protected static $testNow; - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- // Constructors - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- /** * Time constructor. @@ -308,9 +308,9 @@ public function toDateTime() return $dateTime; } - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- // For Testing - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- /** * Creates an instance of Time that will be returned during testing @@ -348,9 +348,9 @@ public static function hasTestNow(): bool return static::$testNow !== null; } - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- // Getters - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- /** * Returns the localized Year @@ -510,9 +510,9 @@ public function getTimezoneName(): string return $this->timezone->getName(); } - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- // Setters - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- /** * Sets the current year for this instance. @@ -689,9 +689,9 @@ public function setTimestamp($timestamp) return self::parse($time, $this->timezone, $this->locale); } - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- // Add/Subtract - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- /** * Returns a new Time instance with $seconds added to the time. @@ -837,9 +837,9 @@ public function subYears(int $years) return $time->sub(DateInterval::createFromDateString("{$years} years")); } - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- // Formatters - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- /** * Returns the localized value of the date in the format 'Y-m-d H:i:s' @@ -905,9 +905,9 @@ public function toLocalizedString(?string $format = null) return IntlDateFormatter::formatObject($this->toDateTime(), $format, $this->locale); } - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- // Comparison - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- /** * Determines if the datetime passed in is equal to the current instance. @@ -985,9 +985,9 @@ public function isAfter($testTime, ?string $timezone = null): bool return $ourTime > $testTime; } - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- // Differences - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- /** * Returns a text string that is easily readable that describes @@ -1061,9 +1061,9 @@ public function difference($testTime, ?string $timezone = null) return new TimeDifference($ourTime, $testTime); } - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- // Utilities - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- /** * Returns a Time instance with the timezone converted to UTC. diff --git a/system/Publisher/Publisher.php b/system/Publisher/Publisher.php index 01a3c62db657..41ecfb0d6fd1 100644 --- a/system/Publisher/Publisher.php +++ b/system/Publisher/Publisher.php @@ -85,9 +85,9 @@ class Publisher extends FileCollection */ protected $destination = FCPATH; - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- // Support Methods - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- /** * Discovers and returns all Publishers in the specified namespace directory. @@ -143,9 +143,9 @@ private static function wipeDirectory(string $directory): void } } - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- // Class Core - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- /** * Loads the helper and verifies the source and destination directories. @@ -199,9 +199,9 @@ public function publish(): bool return $this->addPath('/')->merge(true); } - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- // Property Accessors - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- /** * Returns the source directory. @@ -254,9 +254,9 @@ final public function getPublished(): array return $this->published; } - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- // Additional Handlers - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- /** * Verifies and adds paths to the list. @@ -320,9 +320,9 @@ final public function addUri(string $uri) return $this->addFile($file); } - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- // Write Methods - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- /** * Removes the destination and all its files and folders. diff --git a/system/Test/CIUnitTestCase.php b/system/Test/CIUnitTestCase.php index b5a105c6886b..213bcf5886c6 100644 --- a/system/Test/CIUnitTestCase.php +++ b/system/Test/CIUnitTestCase.php @@ -71,9 +71,9 @@ abstract class CIUnitTestCase extends TestCase */ private ?array $traits = null; - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- // Database Properties - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- /** * Should run db migration? @@ -166,9 +166,9 @@ abstract class CIUnitTestCase extends TestCase */ protected $insertCache = []; - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- // Feature Properties - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- /** * If present, will override application @@ -216,9 +216,9 @@ abstract class CIUnitTestCase extends TestCase */ protected $requestBody = ''; - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- // Staging - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- /** * Load the helpers. @@ -289,9 +289,9 @@ private function callTraitMethods(string $stage): void } } - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- // Mocking - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- /** * Resets shared instanced for all Factories components @@ -338,9 +338,9 @@ protected function mockSession() Services::injectMock('session', $session); } - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- // Assertions - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- /** * Custom function to hook into CodeIgniter's Logging mechanism @@ -496,9 +496,9 @@ public function assertCloseEnoughString($expected, $actual, string $message = '' } } - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- // Utility - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- /** * Loads up an instance of CodeIgniter diff --git a/system/Test/DatabaseTestTrait.php b/system/Test/DatabaseTestTrait.php index 539627e29189..f7a6d532a1a6 100644 --- a/system/Test/DatabaseTestTrait.php +++ b/system/Test/DatabaseTestTrait.php @@ -42,9 +42,9 @@ trait DatabaseTestTrait */ private static $doneSeed = false; - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- // Staging - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- /** * Runs the trait set up methods. @@ -89,9 +89,9 @@ public function loadDependencies() } } - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- // Migrations - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- /** * Migrate on setUp @@ -163,9 +163,9 @@ protected function migrateDatabase() } } - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- // Seeds - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- /** * Seed on setUp @@ -205,9 +205,9 @@ public function seed(string $name) $this->seeder->call($name); } - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- // Utility - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- /** * Reset $doneMigration and $doneSeed @@ -264,9 +264,9 @@ public function grabFromDatabase(string $table, string $column, array $where) return $query->{$column} ?? false; } - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- // Assertions - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- /** * Asserts that records that match the conditions in $where DO diff --git a/system/Test/FilterTestTrait.php b/system/Test/FilterTestTrait.php index 1407a67b0a64..822a6b2e614c 100644 --- a/system/Test/FilterTestTrait.php +++ b/system/Test/FilterTestTrait.php @@ -78,9 +78,9 @@ trait FilterTestTrait */ protected $collection; - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- // Staging - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- /** * Initializes dependencies once. @@ -113,9 +113,9 @@ protected function setUpFilterTestTrait(): void $this->doneFilterSetUp = true; } - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- // Utility - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- /** * Returns a callable method for a filter position @@ -187,9 +187,9 @@ protected function getFiltersForRoute(string $route, string $position): array return $aliases[$position]; } - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- // Assertions - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- /** * Asserts that the given route at position uses diff --git a/system/Test/Mock/MockCache.php b/system/Test/Mock/MockCache.php index ebdacccbbef5..69afc0e47039 100644 --- a/system/Test/Mock/MockCache.php +++ b/system/Test/Mock/MockCache.php @@ -236,9 +236,9 @@ public function isSupported(): bool return true; } - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- // Test Helpers - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- /** * Instructs the class to ignore all @@ -255,9 +255,9 @@ public function bypass(bool $bypass = true) return $this; } - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- // Additional Assertions - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- /** * Asserts that the cache has an item named $key. diff --git a/system/Test/TestResponse.php b/system/Test/TestResponse.php index d91f00080b14..16a50f74d1e5 100644 --- a/system/Test/TestResponse.php +++ b/system/Test/TestResponse.php @@ -60,9 +60,9 @@ public function __construct(ResponseInterface $response) $this->setResponse($response); } - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- // Getters / Setters - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- /** * Sets the request. @@ -114,9 +114,9 @@ public function response() return $this->response; } - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- // Status Checks - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- /** * Boils down the possible responses into a boolean valid/not-valid @@ -165,9 +165,9 @@ public function assertNotOK() $this->assertFalse($this->isOK(), "{$this->response->getStatusCode()} is an unexpected successful status code, or the Response has body content."); } - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- // Redirection - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- /** * Returns whether or not the Response was a redirect or RedirectResponse @@ -239,9 +239,9 @@ public function getRedirectUrl(): ?string return null; } - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- // Session - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- /** * Asserts that an SESSION key has been set and, optionally, test it's value. @@ -275,9 +275,9 @@ public function assertSessionMissing(string $key) $this->assertArrayNotHasKey($key, $_SESSION, "'{$key}' should not be present in \$_SESSION."); } - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- // Headers - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- /** * Asserts that the Response contains a specific header. @@ -305,9 +305,9 @@ public function assertHeaderMissing(string $key) $this->assertFalse($this->response->hasHeader($key), "'{$key}' should not be in the Response headers."); } - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- // Cookies - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- /** * Asserts that the response has the specified cookie. @@ -340,9 +340,9 @@ public function assertCookieExpired(string $key, string $prefix = '') $this->assertGreaterThan(time(), $this->response->getCookie($key, $prefix)->getExpiresTimestamp()); } - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- // JSON - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- /** * Returns the response's body as JSON @@ -401,9 +401,9 @@ public function assertJSONExact($test) $this->assertJsonStringEqualsJsonString($test, $json, 'Response does not contain matching JSON.'); } - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- // XML Methods - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- /** * Returns the response' body as XML @@ -415,9 +415,9 @@ public function getXML() return $this->response->getXML(); } - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- // DomParser - //-------------------------------------------------------------------- + // -------------------------------------------------------------------- /** * Assert that the desired text can be found in the result body. diff --git a/tests/system/Helpers/TextHelperTest.php b/tests/system/Helpers/TextHelperTest.php index 7c736614a36d..bdc236909f8c 100755 --- a/tests/system/Helpers/TextHelperTest.php +++ b/tests/system/Helpers/TextHelperTest.php @@ -196,7 +196,6 @@ public function testEntitiesToAsciiSmallOrdinals() public function testConvertAccentedCharacters() { - //$this->ci_vfs_clone('application/Config/ForeignChars.php'); $this->assertSame('AAAeEEEIIOOEUUUeY', convert_accented_characters('ÀÂÄÈÊËÎÏÔŒÙÛÜŸ')); $this->assertSame('a e i o u n ue', convert_accented_characters('á é í ó ú ñ ü')); }