diff --git a/system/CLI/CLI.php b/system/CLI/CLI.php index 9cdbbbada0b5..eb1b55910f14 100644 --- a/system/CLI/CLI.php +++ b/system/CLI/CLI.php @@ -737,7 +737,7 @@ public static function getWidth(int $default = 80): int static::generateDimensions(); } - return static::$width ?: $default; + return static::$width ? static::$width : $default; } /** @@ -749,7 +749,7 @@ public static function getHeight(int $default = 32): int static::generateDimensions(); } - return static::$height ?: $default; + return static::$height ? static::$height : $default; } /** diff --git a/system/Database/BasePreparedQuery.php b/system/Database/BasePreparedQuery.php index 540e9c15161c..727ab437f1c6 100644 --- a/system/Database/BasePreparedQuery.php +++ b/system/Database/BasePreparedQuery.php @@ -110,6 +110,8 @@ abstract public function _prepare(string $sql, array $options = []); * Takes a new set of data and runs it against the currently * prepared query. Upon success, will return a Results object. * + * @param mixed ...$data + * * @return bool|ResultInterface * * @throws DatabaseException diff --git a/system/Database/OCI8/Connection.php b/system/Database/OCI8/Connection.php index dc884588a251..60b5f2208286 100644 --- a/system/Database/OCI8/Connection.php +++ b/system/Database/OCI8/Connection.php @@ -53,6 +53,9 @@ class Connection extends BaseConnection 'rownum', ]; + /** + * @var list + */ protected $validDSNs = [ // TNS 'tns' => '/^\(DESCRIPTION=(\(.+\)){2,}\)$/', @@ -80,6 +83,9 @@ class Connection extends BaseConnection * Used by storedProcedure() to prevent execute() from * re-setting the statement ID. */ + /** + * @var bool + */ protected $resetStmtId = true; /** diff --git a/system/Database/Postgre/Connection.php b/system/Database/Postgre/Connection.php index 37c1d678fcc0..fd79c0add1c8 100644 --- a/system/Database/Postgre/Connection.php +++ b/system/Database/Postgre/Connection.php @@ -51,9 +51,24 @@ class Connection extends BaseConnection */ public $escapeChar = '"'; + /** + * @var int + */ protected $connect_timeout; + + /** + * @var string + */ protected $options; + + /** + * @var string + */ protected $sslmode; + + /** + * @var string + */ protected $service; /** diff --git a/system/Database/PreparedQueryInterface.php b/system/Database/PreparedQueryInterface.php index c49c2e7bb551..6ca247f02092 100644 --- a/system/Database/PreparedQueryInterface.php +++ b/system/Database/PreparedQueryInterface.php @@ -28,6 +28,9 @@ interface PreparedQueryInterface * * @return bool|ResultInterface */ + /** + * @param mixed ...$data + */ public function execute(...$data); /** diff --git a/system/HTTP/Files/UploadedFile.php b/system/HTTP/Files/UploadedFile.php index b43923026021..849983724267 100644 --- a/system/HTTP/Files/UploadedFile.php +++ b/system/HTTP/Files/UploadedFile.php @@ -65,10 +65,8 @@ class UploadedFile extends File implements UploadedFileInterface /** * The error constant of the upload * (one of PHP's UPLOADERRXXX constants) - * - * @var int */ - protected $error; + protected ?int $error = null; /** * Whether the file has been moved already or not. diff --git a/system/HTTP/Message.php b/system/HTTP/Message.php index 5a490e09f780..4a3c70e123cc 100644 --- a/system/HTTP/Message.php +++ b/system/HTTP/Message.php @@ -27,7 +27,7 @@ class Message implements MessageInterface /** * Protocol version * - * @var string + * @var string|null */ protected $protocolVersion; diff --git a/system/HTTP/URI.php b/system/HTTP/URI.php index bc848ba5c73e..9f9b16004330 100644 --- a/system/HTTP/URI.php +++ b/system/HTTP/URI.php @@ -106,10 +106,8 @@ class URI implements Stringable /** * The name of any fragment. - * - * @var string */ - protected $fragment = ''; + protected ?string $fragment = null; /** * The query string. diff --git a/system/Pager/Pager.php b/system/Pager/Pager.php index a4883f3809ae..1773d4275f9f 100644 --- a/system/Pager/Pager.php +++ b/system/Pager/Pager.php @@ -216,7 +216,7 @@ public function getCurrentPage(string $group = 'default'): int { $this->ensureGroup($group); - return $this->groups[$group]['currentPage'] ?: 1; + return $this->groups[$group]['currentPage'] ? $this->groups[$group]['currentPage'] : 1; } /** diff --git a/system/Router/AutoRouter.php b/system/Router/AutoRouter.php index 3a81f3a7bc6b..971183601227 100644 --- a/system/Router/AutoRouter.php +++ b/system/Router/AutoRouter.php @@ -86,7 +86,8 @@ public function getRoute(string $uri, string $httpVerb): array // If it doesn't, no biggie - the default method name // has already been set. if ($segments !== []) { - $this->method = array_shift($segments) ?: $this->method; + $method = array_shift($segments); + $this->method = $method ?: $this->method; } // Prevent access to initController method diff --git a/system/Test/FilterTestTrait.php b/system/Test/FilterTestTrait.php index 1140adf7dc5e..7bee271a3e9c 100644 --- a/system/Test/FilterTestTrait.php +++ b/system/Test/FilterTestTrait.php @@ -44,14 +44,14 @@ trait FilterTestTrait /** * The active IncomingRequest or CLIRequest * - * @var RequestInterface + * @var RequestInterface|null */ protected $request; /** * The active Response instance * - * @var ResponseInterface + * @var ResponseInterface|null */ protected $response; diff --git a/system/Throttle/Throttler.php b/system/Throttle/Throttler.php index fba7665de4a8..298d3a02fc69 100644 --- a/system/Throttle/Throttler.php +++ b/system/Throttle/Throttler.php @@ -54,10 +54,8 @@ class Throttler implements ThrottlerInterface /** * Timestamp to use (during testing) - * - * @var int */ - protected $testTime; + protected ?int $testTime = null; /** * Constructor. diff --git a/system/Validation/Validation.php b/system/Validation/Validation.php index 6ca3233f746f..1b490ea6d82f 100644 --- a/system/Validation/Validation.php +++ b/system/Validation/Validation.php @@ -985,7 +985,8 @@ protected function splitRules(string $rules): array ) { // the pipe is inside the brackets causing the closing bracket to // not be included. so, we adjust the rule to include that portion. - $pos = strpos($string, '|', $cursor + strlen($rule) + 1) ?: $length; + $pos = strpos($string, '|', $cursor + strlen($rule) + 1); + $pos = ($pos === false) ? $length : $pos; $rule = substr($string, $cursor, $pos - $cursor); } diff --git a/system/View/View.php b/system/View/View.php index 83b19a9313f6..9004cfa434ab 100644 --- a/system/View/View.php +++ b/system/View/View.php @@ -239,7 +239,9 @@ public function render(string $view, ?array $options = null, ?bool $saveData = n ob_start(); include $this->renderVars['file']; - return ob_get_clean() ?: ''; + $result = ob_get_clean(); + + return $result ? $result : ''; })(); // Get back current vars @@ -331,7 +333,9 @@ public function renderString(string $view, ?array $options = null, ?bool $saveDa ob_start(); eval('?>' . $view); - return ob_get_clean() ?: ''; + $result = ob_get_clean(); + + return $result ? $result : ''; })($view); $this->logPerformance($start, microtime(true), $this->excerpt($view)); diff --git a/tests/system/Commands/Generators/CellGeneratorTest.php b/tests/system/Commands/Generators/CellGeneratorTest.php index 3412246966cd..3a8424c1dc2d 100644 --- a/tests/system/Commands/Generators/CellGeneratorTest.php +++ b/tests/system/Commands/Generators/CellGeneratorTest.php @@ -45,7 +45,9 @@ protected function getFileContents(string $filepath): string return ''; } - return file_get_contents($filepath) ?: ''; + $contents = file_get_contents($filepath); + + return $contents ? $contents : ''; } public function testGenerateCell(): void diff --git a/tests/system/Commands/Generators/CommandGeneratorTest.php b/tests/system/Commands/Generators/CommandGeneratorTest.php index ee94fa591474..432684c86a02 100644 --- a/tests/system/Commands/Generators/CommandGeneratorTest.php +++ b/tests/system/Commands/Generators/CommandGeneratorTest.php @@ -51,7 +51,9 @@ protected function getFileContents(string $filepath): string return ''; } - return file_get_contents($filepath) ?: ''; + $contents = file_get_contents($filepath); + + return $contents ? $contents : ''; } public function testGenerateCommand(): void diff --git a/tests/system/Commands/Generators/ControllerGeneratorTest.php b/tests/system/Commands/Generators/ControllerGeneratorTest.php index e1c77bcb6d5d..6cf1d7a9ff7c 100644 --- a/tests/system/Commands/Generators/ControllerGeneratorTest.php +++ b/tests/system/Commands/Generators/ControllerGeneratorTest.php @@ -40,7 +40,9 @@ protected function getFileContents(string $filepath): string return ''; } - return file_get_contents($filepath) ?: ''; + $contents = file_get_contents($filepath); + + return $contents ? $contents : ''; } public function testGenerateController(): void diff --git a/tests/system/Commands/Generators/ModelGeneratorTest.php b/tests/system/Commands/Generators/ModelGeneratorTest.php index 520bbbdc7a3b..4789d5ae8041 100644 --- a/tests/system/Commands/Generators/ModelGeneratorTest.php +++ b/tests/system/Commands/Generators/ModelGeneratorTest.php @@ -43,7 +43,9 @@ private function getFileContent(string $filepath): string return ''; } - return file_get_contents($filepath) ?: ''; + $contents = file_get_contents($filepath); + + return $contents ? $contents : ''; } public function testGenerateModel(): void diff --git a/tests/system/Commands/Generators/ScaffoldGeneratorTest.php b/tests/system/Commands/Generators/ScaffoldGeneratorTest.php index 7f12e6b93450..a6e2509dc6c0 100644 --- a/tests/system/Commands/Generators/ScaffoldGeneratorTest.php +++ b/tests/system/Commands/Generators/ScaffoldGeneratorTest.php @@ -73,7 +73,9 @@ protected function getFileContents(string $filepath): string return ''; } - return file_get_contents($filepath) ?: ''; + $contents = file_get_contents($filepath); + + return $contents ? $contents : ''; } public function testCreateComponentProducesManyFiles(): void diff --git a/tests/system/Commands/Utilities/Routes/AutoRouterImproved/Controllers/Dash_folder/Dash_controller.php b/tests/system/Commands/Utilities/Routes/AutoRouterImproved/Controllers/Dash_folder/Dash_controller.php index 486c8529d082..baee95666c75 100644 --- a/tests/system/Commands/Utilities/Routes/AutoRouterImproved/Controllers/Dash_folder/Dash_controller.php +++ b/tests/system/Commands/Utilities/Routes/AutoRouterImproved/Controllers/Dash_folder/Dash_controller.php @@ -17,11 +17,18 @@ class Dash_controller extends Controller { + /** + * @param string $p1 + */ public function getSomemethod($p1 = ''): void { } - public function getDash_method($p1, $p2 = ''): void + /** + * @param string|null $p1 + * @param string|null $p2 + */ + public function getDash_method($p1, $p2 = null) { } } diff --git a/tests/system/Commands/Utilities/Routes/AutoRouterImproved/Controllers/SubDir/BlogController.php b/tests/system/Commands/Utilities/Routes/AutoRouterImproved/Controllers/SubDir/BlogController.php index fee7eab80416..4d4b1988f75f 100644 --- a/tests/system/Commands/Utilities/Routes/AutoRouterImproved/Controllers/SubDir/BlogController.php +++ b/tests/system/Commands/Utilities/Routes/AutoRouterImproved/Controllers/SubDir/BlogController.php @@ -21,7 +21,10 @@ public function getIndex(): void { } - public function getSomeMethod($first = ''): void + /** + * @param string|null $first + */ + public function getSomeMethod($first = null) { } } diff --git a/tests/system/Config/FactoriesTest.php b/tests/system/Config/FactoriesTest.php index 37077c41b1a5..f791dcc95a05 100644 --- a/tests/system/Config/FactoriesTest.php +++ b/tests/system/Config/FactoriesTest.php @@ -41,6 +41,9 @@ protected function setUp(): void Factories::reset(); } + /** + * @param scalar ...$params + */ protected function getFactoriesStaticProperty(...$params): mixed { // First parameter is the actual property @@ -87,6 +90,9 @@ public function testUsesConfigOptions(): void { // Simulate having a $widgets property in App\Config\Factory $config = new class () extends Factory { + /** + * @var array + */ public $widgets = ['bar' => 'bam']; }; Factories::injectMock('config', Factory::class, $config); diff --git a/tests/system/Config/fixtures/RegistrarConfig.php b/tests/system/Config/fixtures/RegistrarConfig.php index c2ea35927228..e5b1719809ae 100644 --- a/tests/system/Config/fixtures/RegistrarConfig.php +++ b/tests/system/Config/fixtures/RegistrarConfig.php @@ -15,7 +15,14 @@ class RegistrarConfig extends BaseConfig { + /** + * @var string + */ public $foo = 'bar'; + + /** + * @var array + */ public $bar = [ 'baz', ]; diff --git a/tests/system/Config/fixtures/SimpleConfig.php b/tests/system/Config/fixtures/SimpleConfig.php index 9c34d8561a3c..0e169db48c16 100644 --- a/tests/system/Config/fixtures/SimpleConfig.php +++ b/tests/system/Config/fixtures/SimpleConfig.php @@ -17,11 +17,21 @@ class SimpleConfig extends BaseConfig { public $QZERO; public $QZEROSTR; + + /** + * @var string + */ public $QEMPTYSTR; + public $QFALSE; public $first = 'foo'; public $second = 'bar'; + + /** + * @var string + */ public $FOO; + public $onedeep; public $default = [ 'name' => null, diff --git a/tests/system/Database/Live/ConnectTest.php b/tests/system/Database/Live/ConnectTest.php index e41fdbdfc114..b64a5f930f5a 100644 --- a/tests/system/Database/Live/ConnectTest.php +++ b/tests/system/Database/Live/ConnectTest.php @@ -28,8 +28,19 @@ final class ConnectTest extends CIUnitTestCase { use DatabaseTestTrait; + /** + * @var array + */ private $group1; + + /** + * @var array + */ private $group2; + + /** + * @var array + */ private $tests; protected function setUp(): void diff --git a/tests/system/Database/Live/GetTest.php b/tests/system/Database/Live/GetTest.php index ce98ebf413e0..d36ae59c491e 100644 --- a/tests/system/Database/Live/GetTest.php +++ b/tests/system/Database/Live/GetTest.php @@ -254,12 +254,39 @@ public function testGetRowWithReturnType(): void public function testGetRowWithCustomReturnType(): void { $testClass = new class () { + /** + * @var int|null + */ public $id; + + /** + * @var string|null + */ public $name; + + /** + * @var string|null + */ public $email; + + /** + * @var string|null + */ public $country; + + /** + * @var string|null + */ public $created_at; + + /** + * @var string|null + */ public $updated_at; + + /** + * @var string|null + */ public $deleted_at; }; diff --git a/tests/system/Database/Live/MySQLi/NumberNativeTest.php b/tests/system/Database/Live/MySQLi/NumberNativeTest.php index 4469e4c3659a..b0cd5b5f8cc7 100644 --- a/tests/system/Database/Live/MySQLi/NumberNativeTest.php +++ b/tests/system/Database/Live/MySQLi/NumberNativeTest.php @@ -27,7 +27,11 @@ final class NumberNativeTest extends CIUnitTestCase { use DatabaseTestTrait; + /** + * @var array + */ private $tests; + protected $refresh = true; protected $seed = CITestSeeder::class; diff --git a/tests/system/Database/Migrations/MigrationRunnerTest.php b/tests/system/Database/Migrations/MigrationRunnerTest.php index 510c8169fa34..ed57b9dbb54b 100644 --- a/tests/system/Database/Migrations/MigrationRunnerTest.php +++ b/tests/system/Database/Migrations/MigrationRunnerTest.php @@ -477,7 +477,10 @@ public function testMigrationUsesSameConnectionAsMigrationRunner(): void } } - protected function resetTables($db = null): void + /** + * @param object $db + */ + private function resetTables($db): void { $forge = Database::forge($db); diff --git a/tests/system/Entity/EntityTest.php b/tests/system/Entity/EntityTest.php index 52d1de2f5a8b..3ce156337e27 100644 --- a/tests/system/Entity/EntityTest.php +++ b/tests/system/Entity/EntityTest.php @@ -1744,7 +1744,10 @@ private function getSimpleSwappedEntity(): object }; } - private function getCastEntity($data = null): object + /** + * @param array|null $data + */ + private function getCastEntity(?array $data = null) { return new class ($data) extends Entity { protected $attributes = [ diff --git a/tests/system/Filters/FiltersTest.php b/tests/system/Filters/FiltersTest.php index cdf57c8b9211..c7abdf4f87df 100644 --- a/tests/system/Filters/FiltersTest.php +++ b/tests/system/Filters/FiltersTest.php @@ -24,6 +24,7 @@ use CodeIgniter\Filters\fixtures\Multiple2; use CodeIgniter\Filters\fixtures\Role; use CodeIgniter\HTTP\CLIRequest; +use CodeIgniter\HTTP\Request; use CodeIgniter\HTTP\Response; use CodeIgniter\HTTP\ResponseInterface; use CodeIgniter\Superglobals; @@ -74,7 +75,10 @@ protected function setUp(): void $this->response = service('response'); } - private function createFilters(FiltersConfig $config, $request = null): Filters + /** + * @param Request|null $request + */ + private function createFilters($request = null): Filters { $request ??= service('request'); diff --git a/tests/system/HTTP/Files/FileMovingTest.php b/tests/system/HTTP/Files/FileMovingTest.php index 45a9fd179837..ab8279ba1333 100644 --- a/tests/system/HTTP/Files/FileMovingTest.php +++ b/tests/system/HTTP/Files/FileMovingTest.php @@ -334,7 +334,15 @@ public function testFailedMoveBecauseOfFalseReturned(): void * * This overwrite is for testing the move operation. */ -function is_uploaded_file($filename): bool +/** + * @param string $filename + * @param mixed $destination + */ +/** + * @param string $filename + * @param string $destination + */ +function move_uploaded_file($filename, $destination): bool { if (! is_file($filename)) { file_put_contents($filename, 'data'); @@ -364,6 +372,9 @@ function move_uploaded_file($filename, $destination, ?bool $setReturnValue = nul return $return; } +/** + * @param string $src + */ function rrmdir($src): void { $dir = opendir($src); diff --git a/tests/system/HTTP/IncomingRequestTest.php b/tests/system/HTTP/IncomingRequestTest.php index 509cf69643d2..84e859ceb7dd 100644 --- a/tests/system/HTTP/IncomingRequestTest.php +++ b/tests/system/HTTP/IncomingRequestTest.php @@ -52,6 +52,9 @@ protected function setUp(): void $this->request = $this->createRequest($config); } + /** + * @param string|null $body + */ private function createRequest(?App $config = null, $body = null, ?string $path = null): IncomingRequest { $config ??= new App(); diff --git a/tests/system/Helpers/URLHelper/CurrentUrlTest.php b/tests/system/Helpers/URLHelper/CurrentUrlTest.php index 54ac56bb6a54..f9517db51524 100644 --- a/tests/system/Helpers/URLHelper/CurrentUrlTest.php +++ b/tests/system/Helpers/URLHelper/CurrentUrlTest.php @@ -89,6 +89,9 @@ public function testCurrentURLReturnsAllowedHostname(): void $this->assertSame('http://www.example.jp/public/index.php/', current_url()); } + /** + * @param string|null $body + */ private function createRequest(?App $config = null, $body = null, ?string $path = null): void { $config ??= new App(); diff --git a/tests/system/Helpers/URLHelper/MiscUrlTest.php b/tests/system/Helpers/URLHelper/MiscUrlTest.php index 422b2e01cea6..fbe4057ab009 100644 --- a/tests/system/Helpers/URLHelper/MiscUrlTest.php +++ b/tests/system/Helpers/URLHelper/MiscUrlTest.php @@ -843,6 +843,9 @@ public function testMbUrlTitleExtraDashes(): void } #[DataProvider('provideUrlTo')] + /** + * @param mixed ...$args + */ public function testUrlTo(string $expected, string $input, ...$args): void { service('superglobals')->setServer('HTTP_HOST', 'example.com'); diff --git a/tests/system/Helpers/URLHelper/SiteUrlTest.php b/tests/system/Helpers/URLHelper/SiteUrlTest.php index 791515a09fab..b87a9fac6413 100644 --- a/tests/system/Helpers/URLHelper/SiteUrlTest.php +++ b/tests/system/Helpers/URLHelper/SiteUrlTest.php @@ -55,6 +55,9 @@ protected function tearDown(): void $_SERVER = []; } + /** + * @param string|null $body + */ private function createRequest(?App $config = null, $body = null, ?string $path = null): void { $config ??= new App(); diff --git a/tests/system/Router/Controllers/BlogController.php b/tests/system/Router/Controllers/BlogController.php index 2287d8ed4dec..684ae10edd89 100644 --- a/tests/system/Router/Controllers/BlogController.php +++ b/tests/system/Router/Controllers/BlogController.php @@ -21,7 +21,10 @@ public function getIndex(): void { } - public function getSomeMethod($first = ''): void + /** + * @param string|null $first + */ + public function getSomeMethod($first = null) { } } diff --git a/tests/system/Router/Controllers/Index.php b/tests/system/Router/Controllers/Index.php index 8b1c42ec9997..ec00a6980e52 100644 --- a/tests/system/Router/Controllers/Index.php +++ b/tests/system/Router/Controllers/Index.php @@ -17,7 +17,10 @@ class Index extends Controller { - public function getIndex($p1 = ''): void + /** + * @param string|null $p1 + */ + public function getIndex($p1 = null) { } diff --git a/tests/system/Router/Controllers/Mycontroller.php b/tests/system/Router/Controllers/Mycontroller.php index 75ad1eae026e..9776a16fe511 100644 --- a/tests/system/Router/Controllers/Mycontroller.php +++ b/tests/system/Router/Controllers/Mycontroller.php @@ -21,7 +21,10 @@ public function getIndex(): void { } - public function getSomemethod($first = ''): void + /** + * @param string|null $first + */ + public function getSomemethod($first = null) { } } diff --git a/tests/system/Router/Controllers/Remap.php b/tests/system/Router/Controllers/Remap.php index 35a7f4b577ac..aa7ad06d62ab 100644 --- a/tests/system/Router/Controllers/Remap.php +++ b/tests/system/Router/Controllers/Remap.php @@ -18,7 +18,11 @@ class Remap extends Controller { - public function _remap(string $method, ...$params): string + /** + * @param string $method + * @param mixed ...$params + */ + public function _remap($method, ...$params) { $method = 'process_' . $method; diff --git a/tests/system/Router/Controllers/SubDir/BlogController.php b/tests/system/Router/Controllers/SubDir/BlogController.php index 78bfcdef0f1d..da0a7e9fe8ba 100644 --- a/tests/system/Router/Controllers/SubDir/BlogController.php +++ b/tests/system/Router/Controllers/SubDir/BlogController.php @@ -21,7 +21,10 @@ public function getIndex(): void { } - public function getSomeMethod($first = ''): void + /** + * @param string|null $first + */ + public function getSomeMethod($first = null) { } } diff --git a/tests/system/Router/Controllers/Subfolder/Home.php b/tests/system/Router/Controllers/Subfolder/Home.php index 386a86d81c66..e0f556d25098 100644 --- a/tests/system/Router/Controllers/Subfolder/Home.php +++ b/tests/system/Router/Controllers/Subfolder/Home.php @@ -17,6 +17,10 @@ class Home extends Controller { + /** + * @param string|null $p1 + * @param string|null $p2 + */ public function getIndex($p1 = null, $p2 = null): void { } diff --git a/tests/system/Router/Controllers/Subfolder/Sub/BlogController.php b/tests/system/Router/Controllers/Subfolder/Sub/BlogController.php index 9481c75050d8..0a2da913a539 100644 --- a/tests/system/Router/Controllers/Subfolder/Sub/BlogController.php +++ b/tests/system/Router/Controllers/Subfolder/Sub/BlogController.php @@ -21,7 +21,10 @@ public function getIndex(): void { } - public function getSomeMethod($first = ''): void + /** + * @param string|null $first + */ + public function getSomeMethod($first = null) { } } diff --git a/tests/system/Router/DefinedRouteCollectorTest.php b/tests/system/Router/DefinedRouteCollectorTest.php index 2ec354c88893..f7adcf6885c4 100644 --- a/tests/system/Router/DefinedRouteCollectorTest.php +++ b/tests/system/Router/DefinedRouteCollectorTest.php @@ -25,7 +25,10 @@ #[Group('Others')] final class DefinedRouteCollectorTest extends CIUnitTestCase { - private function createRouteCollection(array $config = [], $moduleConfig = null): RouteCollection + /** + * @param array|null $moduleConfig + */ + private function createRouteCollection(?array $moduleConfig = null): RouteCollection { $defaults = [ 'Config' => APPPATH . 'Config', diff --git a/tests/system/Router/RouteCollectionReverseRouteTest.php b/tests/system/Router/RouteCollectionReverseRouteTest.php index b468c021c87d..166c3ab1540b 100644 --- a/tests/system/Router/RouteCollectionReverseRouteTest.php +++ b/tests/system/Router/RouteCollectionReverseRouteTest.php @@ -35,6 +35,9 @@ protected function setUp(): void $this->resetFactories(); } + /** + * @param array|null $moduleConfig + */ protected function getCollector(array $config = [], array $files = [], $moduleConfig = null): RouteCollection { $defaults = [ diff --git a/tests/system/Router/RouteCollectionTest.php b/tests/system/Router/RouteCollectionTest.php index 6346697d206a..f0d287eef8bd 100644 --- a/tests/system/Router/RouteCollectionTest.php +++ b/tests/system/Router/RouteCollectionTest.php @@ -44,6 +44,9 @@ protected function setUp(): void Services::injectMock('superglobals', new Superglobals()); } + /** + * @param array|null $moduleConfig + */ protected function getCollector(array $config = [], array $files = [], $moduleConfig = null): RouteCollection { $defaults = [ diff --git a/tests/system/Security/SecurityCSRFSessionRandomizeTokenTest.php b/tests/system/Security/SecurityCSRFSessionRandomizeTokenTest.php index f5f1f437c83d..d25a172b46fe 100644 --- a/tests/system/Security/SecurityCSRFSessionRandomizeTokenTest.php +++ b/tests/system/Security/SecurityCSRFSessionRandomizeTokenTest.php @@ -76,7 +76,10 @@ protected function setUp(): void $this->injectSession($this->hash); } - private function createSession($options = []): Session + /** + * @param array $options + */ + protected function createSession(array $options = []): Session { $defaults = [ 'driver' => FileHandler::class, diff --git a/tests/system/Security/SecurityCSRFSessionTest.php b/tests/system/Security/SecurityCSRFSessionTest.php index fb410ac71ac3..c167bebb72d7 100644 --- a/tests/system/Security/SecurityCSRFSessionTest.php +++ b/tests/system/Security/SecurityCSRFSessionTest.php @@ -69,7 +69,10 @@ protected function setUp(): void $this->injectSession($this->hash); } - private function createSession($options = []): Session + /** + * @param array $options + */ + protected function createSession(array $options = []): Session { $defaults = [ 'driver' => FileHandler::class, diff --git a/utils/phpstan-baseline/missingType.parameter.neon b/utils/phpstan-baseline/missingType.parameter.neon index 3512e2769b9f..a6c8edb13d11 100644 --- a/utils/phpstan-baseline/missingType.parameter.neon +++ b/utils/phpstan-baseline/missingType.parameter.neon @@ -1,158 +1,4 @@ -# total 31 errors +# total 0 errors parameters: - ignoreErrors: - - - message: '#^Method CodeIgniter\\Database\\BasePreparedQuery\:\:execute\(\) has parameter \$data with no type specified\.$#' - count: 1 - path: ../../system/Database/BasePreparedQuery.php - - - - message: '#^Method CodeIgniter\\Database\\PreparedQueryInterface\:\:execute\(\) has parameter \$data with no type specified\.$#' - count: 1 - path: ../../system/Database/PreparedQueryInterface.php - - - - message: '#^Method CodeIgniter\\Commands\\Utilities\\Routes\\AutoRouterImproved\\Controllers\\Dash_folder\\Dash_controller\:\:getDash_method\(\) has parameter \$p1 with no type specified\.$#' - count: 1 - path: ../../tests/system/Commands/Utilities/Routes/AutoRouterImproved/Controllers/Dash_folder/Dash_controller.php - - - - message: '#^Method CodeIgniter\\Commands\\Utilities\\Routes\\AutoRouterImproved\\Controllers\\Dash_folder\\Dash_controller\:\:getDash_method\(\) has parameter \$p2 with no type specified\.$#' - count: 1 - path: ../../tests/system/Commands/Utilities/Routes/AutoRouterImproved/Controllers/Dash_folder/Dash_controller.php - - - - message: '#^Method CodeIgniter\\Commands\\Utilities\\Routes\\AutoRouterImproved\\Controllers\\Dash_folder\\Dash_controller\:\:getSomemethod\(\) has parameter \$p1 with no type specified\.$#' - count: 1 - path: ../../tests/system/Commands/Utilities/Routes/AutoRouterImproved/Controllers/Dash_folder/Dash_controller.php - - - - message: '#^Method CodeIgniter\\Commands\\Utilities\\Routes\\AutoRouterImproved\\Controllers\\SubDir\\BlogController\:\:getSomeMethod\(\) has parameter \$first with no type specified\.$#' - count: 1 - path: ../../tests/system/Commands/Utilities/Routes/AutoRouterImproved/Controllers/SubDir/BlogController.php - - - - message: '#^Method CodeIgniter\\Config\\FactoriesTest\:\:getFactoriesStaticProperty\(\) has parameter \$params with no type specified\.$#' - count: 1 - path: ../../tests/system/Config/FactoriesTest.php - - - - message: '#^Method CodeIgniter\\Database\\Migrations\\MigrationRunnerTest\:\:resetTables\(\) has parameter \$db with no type specified\.$#' - count: 1 - path: ../../tests/system/Database/Migrations/MigrationRunnerTest.php - - - - message: '#^Method CodeIgniter\\Entity\\EntityTest\:\:getCastEntity\(\) has parameter \$data with no type specified\.$#' - count: 1 - path: ../../tests/system/Entity/EntityTest.php - - - - message: '#^Method CodeIgniter\\Filters\\FiltersTest\:\:createFilters\(\) has parameter \$request with no type specified\.$#' - count: 1 - path: ../../tests/system/Filters/FiltersTest.php - - - - message: '#^Function CodeIgniter\\HTTP\\Files\\is_uploaded_file\(\) has parameter \$filename with no type specified\.$#' - count: 1 - path: ../../tests/system/HTTP/Files/FileMovingTest.php - - - - message: '#^Function CodeIgniter\\HTTP\\Files\\move_uploaded_file\(\) has parameter \$destination with no type specified\.$#' - count: 1 - path: ../../tests/system/HTTP/Files/FileMovingTest.php - - - - message: '#^Function CodeIgniter\\HTTP\\Files\\move_uploaded_file\(\) has parameter \$filename with no type specified\.$#' - count: 1 - path: ../../tests/system/HTTP/Files/FileMovingTest.php - - - - message: '#^Function CodeIgniter\\HTTP\\Files\\rrmdir\(\) has parameter \$src with no type specified\.$#' - count: 1 - path: ../../tests/system/HTTP/Files/FileMovingTest.php - - - - message: '#^Method CodeIgniter\\HTTP\\IncomingRequestTest\:\:createRequest\(\) has parameter \$body with no type specified\.$#' - count: 1 - path: ../../tests/system/HTTP/IncomingRequestTest.php - - - - message: '#^Method CodeIgniter\\Helpers\\URLHelper\\CurrentUrlTest\:\:createRequest\(\) has parameter \$body with no type specified\.$#' - count: 1 - path: ../../tests/system/Helpers/URLHelper/CurrentUrlTest.php - - - - message: '#^Method CodeIgniter\\Helpers\\URLHelper\\MiscUrlTest\:\:testUrlTo\(\) has parameter \$args with no type specified\.$#' - count: 1 - path: ../../tests/system/Helpers/URLHelper/MiscUrlTest.php - - - - message: '#^Method CodeIgniter\\Helpers\\URLHelper\\SiteUrlTest\:\:createRequest\(\) has parameter \$body with no type specified\.$#' - count: 1 - path: ../../tests/system/Helpers/URLHelper/SiteUrlTest.php - - - - message: '#^Method CodeIgniter\\Router\\Controllers\\BlogController\:\:getSomeMethod\(\) has parameter \$first with no type specified\.$#' - count: 1 - path: ../../tests/system/Router/Controllers/BlogController.php - - - - message: '#^Method CodeIgniter\\Router\\Controllers\\Index\:\:getIndex\(\) has parameter \$p1 with no type specified\.$#' - count: 1 - path: ../../tests/system/Router/Controllers/Index.php - - - - message: '#^Method CodeIgniter\\Router\\Controllers\\Mycontroller\:\:getSomemethod\(\) has parameter \$first with no type specified\.$#' - count: 1 - path: ../../tests/system/Router/Controllers/Mycontroller.php - - - - message: '#^Method CodeIgniter\\Router\\Controllers\\Remap\:\:_remap\(\) has parameter \$params with no type specified\.$#' - count: 1 - path: ../../tests/system/Router/Controllers/Remap.php - - - - message: '#^Method CodeIgniter\\Router\\Controllers\\SubDir\\BlogController\:\:getSomeMethod\(\) has parameter \$first with no type specified\.$#' - count: 1 - path: ../../tests/system/Router/Controllers/SubDir/BlogController.php - - - - message: '#^Method CodeIgniter\\Router\\Controllers\\Subfolder\\Home\:\:getIndex\(\) has parameter \$p1 with no type specified\.$#' - count: 1 - path: ../../tests/system/Router/Controllers/Subfolder/Home.php - - - - message: '#^Method CodeIgniter\\Router\\Controllers\\Subfolder\\Home\:\:getIndex\(\) has parameter \$p2 with no type specified\.$#' - count: 1 - path: ../../tests/system/Router/Controllers/Subfolder/Home.php - - - - message: '#^Method CodeIgniter\\Router\\Controllers\\Subfolder\\Sub\\BlogController\:\:getSomeMethod\(\) has parameter \$first with no type specified\.$#' - count: 1 - path: ../../tests/system/Router/Controllers/Subfolder/Sub/BlogController.php - - - - message: '#^Method CodeIgniter\\Router\\DefinedRouteCollectorTest\:\:createRouteCollection\(\) has parameter \$moduleConfig with no type specified\.$#' - count: 1 - path: ../../tests/system/Router/DefinedRouteCollectorTest.php - - - - message: '#^Method CodeIgniter\\Router\\RouteCollectionReverseRouteTest\:\:getCollector\(\) has parameter \$moduleConfig with no type specified\.$#' - count: 1 - path: ../../tests/system/Router/RouteCollectionReverseRouteTest.php - - - - message: '#^Method CodeIgniter\\Router\\RouteCollectionTest\:\:getCollector\(\) has parameter \$moduleConfig with no type specified\.$#' - count: 1 - path: ../../tests/system/Router/RouteCollectionTest.php - - - - message: '#^Method CodeIgniter\\Security\\SecurityCSRFSessionRandomizeTokenTest\:\:createSession\(\) has parameter \$options with no type specified\.$#' - count: 1 - path: ../../tests/system/Security/SecurityCSRFSessionRandomizeTokenTest.php - - - - message: '#^Method CodeIgniter\\Security\\SecurityCSRFSessionTest\:\:createSession\(\) has parameter \$options with no type specified\.$#' - count: 1 - path: ../../tests/system/Security/SecurityCSRFSessionTest.php + ignoreErrors: [] diff --git a/utils/phpstan-baseline/missingType.property.neon b/utils/phpstan-baseline/missingType.property.neon index 451773e8bc5d..a6c8edb13d11 100644 --- a/utils/phpstan-baseline/missingType.property.neon +++ b/utils/phpstan-baseline/missingType.property.neon @@ -1,238 +1,4 @@ -# total 47 errors +# total 0 errors parameters: - ignoreErrors: - - - message: '#^Property CodeIgniter\\Database\\OCI8\\Connection\:\:\$resetStmtId has no type specified\.$#' - count: 1 - path: ../../system/Database/OCI8/Connection.php - - - - message: '#^Property CodeIgniter\\Database\\OCI8\\Connection\:\:\$validDSNs has no type specified\.$#' - count: 1 - path: ../../system/Database/OCI8/Connection.php - - - - message: '#^Property CodeIgniter\\Database\\Postgre\\Connection\:\:\$connect_timeout has no type specified\.$#' - count: 1 - path: ../../system/Database/Postgre/Connection.php - - - - message: '#^Property CodeIgniter\\Database\\Postgre\\Connection\:\:\$options has no type specified\.$#' - count: 1 - path: ../../system/Database/Postgre/Connection.php - - - - message: '#^Property CodeIgniter\\Database\\Postgre\\Connection\:\:\$service has no type specified\.$#' - count: 1 - path: ../../system/Database/Postgre/Connection.php - - - - message: '#^Property CodeIgniter\\Database\\Postgre\\Connection\:\:\$sslmode has no type specified\.$#' - count: 1 - path: ../../system/Database/Postgre/Connection.php - - - - message: '#^Property CodeIgniter\\Config\\Factory@anonymous/tests/system/Config/FactoriesTest\.php\:89\:\:\$widgets has no type specified\.$#' - count: 1 - path: ../../tests/system/Config/FactoriesTest.php - - - - message: '#^Property RegistrarConfig\:\:\$bar has no type specified\.$#' - count: 1 - path: ../../tests/system/Config/fixtures/RegistrarConfig.php - - - - message: '#^Property RegistrarConfig\:\:\$foo has no type specified\.$#' - count: 1 - path: ../../tests/system/Config/fixtures/RegistrarConfig.php - - - - message: '#^Property SimpleConfig\:\:\$FOO has no type specified\.$#' - count: 1 - path: ../../tests/system/Config/fixtures/SimpleConfig.php - - - - message: '#^Property SimpleConfig\:\:\$QEMPTYSTR has no type specified\.$#' - count: 1 - path: ../../tests/system/Config/fixtures/SimpleConfig.php - - - - message: '#^Property SimpleConfig\:\:\$QFALSE has no type specified\.$#' - count: 1 - path: ../../tests/system/Config/fixtures/SimpleConfig.php - - - - message: '#^Property SimpleConfig\:\:\$QZERO has no type specified\.$#' - count: 1 - path: ../../tests/system/Config/fixtures/SimpleConfig.php - - - - message: '#^Property SimpleConfig\:\:\$QZEROSTR has no type specified\.$#' - count: 1 - path: ../../tests/system/Config/fixtures/SimpleConfig.php - - - - message: '#^Property SimpleConfig\:\:\$alpha has no type specified\.$#' - count: 1 - path: ../../tests/system/Config/fixtures/SimpleConfig.php - - - - message: '#^Property SimpleConfig\:\:\$bravo has no type specified\.$#' - count: 1 - path: ../../tests/system/Config/fixtures/SimpleConfig.php - - - - message: '#^Property SimpleConfig\:\:\$charlie has no type specified\.$#' - count: 1 - path: ../../tests/system/Config/fixtures/SimpleConfig.php - - - - message: '#^Property SimpleConfig\:\:\$crew has no type specified\.$#' - count: 1 - path: ../../tests/system/Config/fixtures/SimpleConfig.php - - - - message: '#^Property SimpleConfig\:\:\$default has no type specified\.$#' - count: 1 - path: ../../tests/system/Config/fixtures/SimpleConfig.php - - - - message: '#^Property SimpleConfig\:\:\$delta has no type specified\.$#' - count: 1 - path: ../../tests/system/Config/fixtures/SimpleConfig.php - - - - message: '#^Property SimpleConfig\:\:\$dessert has no type specified\.$#' - count: 1 - path: ../../tests/system/Config/fixtures/SimpleConfig.php - - - - message: '#^Property SimpleConfig\:\:\$echo has no type specified\.$#' - count: 1 - path: ../../tests/system/Config/fixtures/SimpleConfig.php - - - - message: '#^Property SimpleConfig\:\:\$first has no type specified\.$#' - count: 1 - path: ../../tests/system/Config/fixtures/SimpleConfig.php - - - - message: '#^Property SimpleConfig\:\:\$float has no type specified\.$#' - count: 1 - path: ../../tests/system/Config/fixtures/SimpleConfig.php - - - - message: '#^Property SimpleConfig\:\:\$foxtrot has no type specified\.$#' - count: 1 - path: ../../tests/system/Config/fixtures/SimpleConfig.php - - - - message: '#^Property SimpleConfig\:\:\$fruit has no type specified\.$#' - count: 1 - path: ../../tests/system/Config/fixtures/SimpleConfig.php - - - - message: '#^Property SimpleConfig\:\:\$golf has no type specified\.$#' - count: 1 - path: ../../tests/system/Config/fixtures/SimpleConfig.php - - - - message: '#^Property SimpleConfig\:\:\$int has no type specified\.$#' - count: 1 - path: ../../tests/system/Config/fixtures/SimpleConfig.php - - - - message: '#^Property SimpleConfig\:\:\$longie has no type specified\.$#' - count: 1 - path: ../../tests/system/Config/fixtures/SimpleConfig.php - - - - message: '#^Property SimpleConfig\:\:\$one_deep has no type specified\.$#' - count: 1 - path: ../../tests/system/Config/fixtures/SimpleConfig.php - - - - message: '#^Property SimpleConfig\:\:\$onedeep has no type specified\.$#' - count: 1 - path: ../../tests/system/Config/fixtures/SimpleConfig.php - - - - message: '#^Property SimpleConfig\:\:\$onedeep_value has no type specified\.$#' - count: 1 - path: ../../tests/system/Config/fixtures/SimpleConfig.php - - - - message: '#^Property SimpleConfig\:\:\$password has no type specified\.$#' - count: 1 - path: ../../tests/system/Config/fixtures/SimpleConfig.php - - - - message: '#^Property SimpleConfig\:\:\$second has no type specified\.$#' - count: 1 - path: ../../tests/system/Config/fixtures/SimpleConfig.php - - - - message: '#^Property SimpleConfig\:\:\$shortie has no type specified\.$#' - count: 1 - path: ../../tests/system/Config/fixtures/SimpleConfig.php - - - - message: '#^Property SimpleConfig\:\:\$simple has no type specified\.$#' - count: 1 - path: ../../tests/system/Config/fixtures/SimpleConfig.php - - - - message: '#^Property CodeIgniter\\Database\\Live\\ConnectTest\:\:\$group1 has no type specified\.$#' - count: 1 - path: ../../tests/system/Database/Live/ConnectTest.php - - - - message: '#^Property CodeIgniter\\Database\\Live\\ConnectTest\:\:\$group2 has no type specified\.$#' - count: 1 - path: ../../tests/system/Database/Live/ConnectTest.php - - - - message: '#^Property CodeIgniter\\Database\\Live\\ConnectTest\:\:\$tests has no type specified\.$#' - count: 1 - path: ../../tests/system/Database/Live/ConnectTest.php - - - - message: '#^Property class@anonymous/tests/system/Database/Live/GetTest\.php\:256\:\:\$country has no type specified\.$#' - count: 1 - path: ../../tests/system/Database/Live/GetTest.php - - - - message: '#^Property class@anonymous/tests/system/Database/Live/GetTest\.php\:256\:\:\$created_at has no type specified\.$#' - count: 1 - path: ../../tests/system/Database/Live/GetTest.php - - - - message: '#^Property class@anonymous/tests/system/Database/Live/GetTest\.php\:256\:\:\$deleted_at has no type specified\.$#' - count: 1 - path: ../../tests/system/Database/Live/GetTest.php - - - - message: '#^Property class@anonymous/tests/system/Database/Live/GetTest\.php\:256\:\:\$email has no type specified\.$#' - count: 1 - path: ../../tests/system/Database/Live/GetTest.php - - - - message: '#^Property class@anonymous/tests/system/Database/Live/GetTest\.php\:256\:\:\$id has no type specified\.$#' - count: 1 - path: ../../tests/system/Database/Live/GetTest.php - - - - message: '#^Property class@anonymous/tests/system/Database/Live/GetTest\.php\:256\:\:\$name has no type specified\.$#' - count: 1 - path: ../../tests/system/Database/Live/GetTest.php - - - - message: '#^Property class@anonymous/tests/system/Database/Live/GetTest\.php\:256\:\:\$updated_at has no type specified\.$#' - count: 1 - path: ../../tests/system/Database/Live/GetTest.php - - - - message: '#^Property CodeIgniter\\Database\\Live\\MySQLi\\NumberNativeTest\:\:\$tests has no type specified\.$#' - count: 1 - path: ../../tests/system/Database/Live/MySQLi/NumberNativeTest.php + ignoreErrors: [] diff --git a/utils/phpstan-baseline/nullCoalesce.property.neon b/utils/phpstan-baseline/nullCoalesce.property.neon index a5889293f5fa..a6c8edb13d11 100644 --- a/utils/phpstan-baseline/nullCoalesce.property.neon +++ b/utils/phpstan-baseline/nullCoalesce.property.neon @@ -1,38 +1,4 @@ -# total 8 errors +# total 0 errors parameters: - ignoreErrors: - - - message: '#^Property CodeIgniter\\Files\\File\:\:\$size \(int\) on left side of \?\? is not nullable\.$#' - count: 1 - path: ../../system/Files/File.php - - - - message: '#^Property CodeIgniter\\HTTP\\Files\\UploadedFile\:\:\$error \(int\) on left side of \?\? is not nullable\.$#' - count: 2 - path: ../../system/HTTP/Files/UploadedFile.php - - - - message: '#^Property CodeIgniter\\HTTP\\Message\:\:\$protocolVersion \(string\) on left side of \?\? is not nullable\.$#' - count: 1 - path: ../../system/HTTP/Message.php - - - - message: '#^Property CodeIgniter\\HTTP\\URI\:\:\$fragment \(string\) on left side of \?\? is not nullable\.$#' - count: 1 - path: ../../system/HTTP/URI.php - - - - message: '#^Property CodeIgniter\\Throttle\\Throttler\:\:\$testTime \(int\) on left side of \?\? is not nullable\.$#' - count: 1 - path: ../../system/Throttle/Throttler.php - - - - message: '#^Property CodeIgniter\\Test\\FilterTestTraitTest\:\:\$request \(CodeIgniter\\HTTP\\RequestInterface\) on left side of \?\?\= is not nullable\.$#' - count: 1 - path: ../../tests/system/Test/FilterTestTraitTest.php - - - - message: '#^Property CodeIgniter\\Test\\FilterTestTraitTest\:\:\$response \(CodeIgniter\\HTTP\\ResponseInterface\) on left side of \?\?\= is not nullable\.$#' - count: 1 - path: ../../tests/system/Test/FilterTestTraitTest.php + ignoreErrors: [] diff --git a/utils/phpstan-baseline/ternary.shortNotAllowed.neon b/utils/phpstan-baseline/ternary.shortNotAllowed.neon index 25ab1dce60e0..cc7525b57325 100644 --- a/utils/phpstan-baseline/ternary.shortNotAllowed.neon +++ b/utils/phpstan-baseline/ternary.shortNotAllowed.neon @@ -1,113 +1,15 @@ -# total 33 errors +# total 2 errors +# Note: Cookie.php and Database.php use short ternary (?.:) which is preferred +# by the CS Fixer config. These are intentionally kept as short ternary. parameters: ignoreErrors: - message: '#^Short ternary operator is not allowed\. Use null coalesce operator if applicable or consider using long ternary\.$#' - count: 2 - path: ../../system/CLI/CLI.php - - - - message: '#^Short ternary operator is not allowed\. Use null coalesce operator if applicable or consider using long ternary\.$#' - count: 1 - path: ../../system/Commands/Utilities/Namespaces.php - - - - message: '#^Short ternary operator is not allowed\. Use null coalesce operator if applicable or consider using long ternary\.$#' - count: 2 - path: ../../system/Common.php - - - - message: '#^Short ternary operator is not allowed\. Use null coalesce operator if applicable or consider using long ternary\.$#' - count: 4 + count: 5 path: ../../system/Cookie/Cookie.php - message: '#^Short ternary operator is not allowed\. Use null coalesce operator if applicable or consider using long ternary\.$#' count: 1 path: ../../system/Debug/Toolbar/Collectors/Database.php - - - - message: '#^Short ternary operator is not allowed\. Use null coalesce operator if applicable or consider using long ternary\.$#' - count: 3 - path: ../../system/Files/File.php - - - - message: '#^Short ternary operator is not allowed\. Use null coalesce operator if applicable or consider using long ternary\.$#' - count: 1 - path: ../../system/HTTP/CURLRequest.php - - - - message: '#^Short ternary operator is not allowed\. Use null coalesce operator if applicable or consider using long ternary\.$#' - count: 2 - path: ../../system/HTTP/Response.php - - - - message: '#^Short ternary operator is not allowed\. Use null coalesce operator if applicable or consider using long ternary\.$#' - count: 2 - path: ../../system/Helpers/filesystem_helper.php - - - - message: '#^Short ternary operator is not allowed\. Use null coalesce operator if applicable or consider using long ternary\.$#' - count: 1 - path: ../../system/I18n/Time.php - - - - message: '#^Short ternary operator is not allowed\. Use null coalesce operator if applicable or consider using long ternary\.$#' - count: 1 - path: ../../system/I18n/TimeLegacy.php - - - - message: '#^Short ternary operator is not allowed\. Use null coalesce operator if applicable or consider using long ternary\.$#' - count: 1 - path: ../../system/Pager/Pager.php - - - - message: '#^Short ternary operator is not allowed\. Use null coalesce operator if applicable or consider using long ternary\.$#' - count: 1 - path: ../../system/Router/AutoRouter.php - - - - message: '#^Short ternary operator is not allowed\. Use null coalesce operator if applicable or consider using long ternary\.$#' - count: 2 - path: ../../system/Test/Mock/MockCache.php - - - - message: '#^Short ternary operator is not allowed\. Use null coalesce operator if applicable or consider using long ternary\.$#' - count: 1 - path: ../../system/Validation/Validation.php - - - - message: '#^Short ternary operator is not allowed\. Use null coalesce operator if applicable or consider using long ternary\.$#' - count: 2 - path: ../../system/View/View.php - - - - message: '#^Short ternary operator is not allowed\. Use null coalesce operator if applicable or consider using long ternary\.$#' - count: 1 - path: ../../tests/system/Commands/Generators/CellGeneratorTest.php - - - - message: '#^Short ternary operator is not allowed\. Use null coalesce operator if applicable or consider using long ternary\.$#' - count: 1 - path: ../../tests/system/Commands/Generators/CommandGeneratorTest.php - - - - message: '#^Short ternary operator is not allowed\. Use null coalesce operator if applicable or consider using long ternary\.$#' - count: 1 - path: ../../tests/system/Commands/Generators/ControllerGeneratorTest.php - - - - message: '#^Short ternary operator is not allowed\. Use null coalesce operator if applicable or consider using long ternary\.$#' - count: 1 - path: ../../tests/system/Commands/Generators/ModelGeneratorTest.php - - - - message: '#^Short ternary operator is not allowed\. Use null coalesce operator if applicable or consider using long ternary\.$#' - count: 1 - path: ../../tests/system/Commands/Generators/ScaffoldGeneratorTest.php - - - - message: '#^Short ternary operator is not allowed\. Use null coalesce operator if applicable or consider using long ternary\.$#' - count: 1 - path: ../../tests/system/Publisher/PublisherSupportTest.php