Merge branch 'develop' into 4.6

This commit is contained in:
John Paul E. Balandan, CPA 2024-12-19 16:39:09 +08:00
commit bd5945df9b
No known key found for this signature in database
GPG Key ID: 697D84680E3738DA
130 changed files with 16009 additions and 18356 deletions

View File

@ -13,6 +13,12 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout base branch for PR
if: github.event_name == 'pull_request'
uses: actions/checkout@v4
with:
ref: ${{ github.base_ref }}
- name: Checkout
uses: actions/checkout@v4

View File

@ -148,6 +148,12 @@ jobs:
sudo apt-get install -y gsfonts libmagickwand-dev imagemagick
sudo apt-get install --fix-broken
- name: Checkout base branch for PR
if: github.event_name == 'pull_request'
uses: actions/checkout@v4
with:
ref: ${{ github.base_ref }}
- name: Checkout
uses: actions/checkout@v4

View File

@ -60,6 +60,12 @@ jobs:
sudo apt-get install -y imagemagick
sudo apt-get install --fix-broken
- name: Checkout base branch for PR
if: github.event_name == 'pull_request'
uses: actions/checkout@v4
with:
ref: ${{ github.base_ref }}
- name: Checkout
uses: actions/checkout@v4

View File

@ -35,6 +35,12 @@ jobs:
name: Check normalized composer.json
runs-on: ubuntu-latest
steps:
- name: Checkout base branch for PR
if: github.event_name == 'pull_request'
uses: actions/checkout@v4
with:
ref: ${{ github.base_ref }}
- name: Checkout
uses: actions/checkout@v4

View File

@ -32,6 +32,12 @@ jobs:
- '8.4'
steps:
- name: Checkout base branch for PR
if: github.event_name == 'pull_request'
uses: actions/checkout@v4
with:
ref: ${{ github.base_ref }}
- name: Checkout
uses: actions/checkout@v4

View File

@ -36,6 +36,12 @@ jobs:
name: Architectural Inspection
runs-on: ubuntu-22.04
steps:
- name: Checkout base branch for PR
if: github.event_name == 'pull_request'
uses: actions/checkout@v4
with:
ref: ${{ github.base_ref }}
- name: Checkout
uses: actions/checkout@v4

View File

@ -45,6 +45,12 @@ jobs:
strategy:
fail-fast: false
steps:
- name: Checkout base branch for PR
if: github.event_name == 'pull_request'
uses: actions/checkout@v4
with:
ref: ${{ github.base_ref }}
- name: Checkout
uses: actions/checkout@v4

View File

@ -27,6 +27,12 @@ jobs:
if: (! contains(github.event.head_commit.message, '[ci skip]'))
steps:
- name: Checkout base branch for PR
if: github.event_name == 'pull_request'
uses: actions/checkout@v4
with:
ref: ${{ github.base_ref }}
- name: Checkout
uses: actions/checkout@v4

View File

@ -47,6 +47,12 @@ jobs:
matrix:
php-versions: ['8.1', '8.4']
steps:
- name: Checkout base branch for PR
if: github.event_name == 'pull_request'
uses: actions/checkout@v4
with:
ref: ${{ github.base_ref }}
- name: Checkout
uses: actions/checkout@v4

View File

@ -17,18 +17,19 @@
"psr/log": "^3.0"
},
"require-dev": {
"codeigniter/phpstan-codeigniter": "^1.4",
"fakerphp/faker": "^1.24",
"kint-php/kint": "^6.0",
"mikey179/vfsstream": "^1.6.12",
"codeigniter/phpstan-codeigniter": "^1.5.1",
"fakerphp/faker": "^1.9",
"kint-php/kint": "^5.0.4",
"mikey179/vfsstream": "^1.6",
"nexusphp/tachycardia": "^2.0",
"phpstan/extension-installer": "^1.4",
"phpstan/phpstan": "^1.11",
"phpstan/phpstan-strict-rules": "^1.6",
"phpstan/phpstan": "^2.0",
"phpstan/phpstan-strict-rules": "^2.0",
"phpunit/phpcov": "^9.0.2 || ^10.0",
"phpunit/phpunit": "^10.5.16 || ^11.2",
"predis/predis": "^1.1 || ^2.3",
"rector/rector": "1.2.10"
"predis/predis": "^1.1 || ^2.0",
"rector/rector": "2.0.3",
"shipmonk/phpstan-baseline-per-identifier": "^2.0"
},
"replace": {
"codeigniter4/framework": "self.version"
@ -110,7 +111,12 @@
"utils/vendor/bin/php-cs-fixer fix --ansi --verbose --diff"
],
"metrics": "utils/vendor/bin/phpmetrics --config=phpmetrics.json",
"phpstan:baseline": "vendor/bin/phpstan analyse --ansi --generate-baseline=phpstan-baseline.php",
"phpstan:baseline": [
"bash -c \"rm -rf utils/phpstan-baseline/*.neon\"",
"bash -c \"touch utils/phpstan-baseline/loader.neon\"",
"phpstan analyse --ansi --generate-baseline=utils/phpstan-baseline/loader.neon",
"split-phpstan-baseline utils/phpstan-baseline/loader.neon"
],
"phpstan:check": "vendor/bin/phpstan analyse --verbose --ansi",
"sa": "@analyze",
"style": "@cs-fix",

File diff suppressed because it is too large Load Diff

View File

@ -1,11 +1,5 @@
services:
-
class: Utils\PHPStan\CheckUseStatementsAfterLicenseRule
tags:
- phpstan.rules.rule
includes:
- phpstan-baseline.php
- utils/phpstan-baseline/loader.neon
parameters:
phpVersion: 80100
@ -18,7 +12,6 @@ parameters:
- app
- system
- tests
- utils/src/PHPStan
excludePaths:
- app/Views/errors/cli/*
- app/Views/errors/html/*
@ -40,8 +33,13 @@ parameters:
allRules: false
disallowedLooseComparison: true
booleansInConditions: true
disallowedConstructs: true
disallowedBacktick: true
disallowedEmpty: true
disallowedImplicitArrayCreation: true
disallowedShortTernary: true
matchingInheritedMethodNames: true
codeigniter:
additionalServices:
- AfterAutoloadModule\Config\Services
shipmonkBaselinePerIdentifier:
directory: %currentWorkingDirectory%

View File

@ -12,11 +12,11 @@ declare(strict_types=1);
*/
use Rector\Caching\ValueObject\Storage\FileCacheStorage;
use Rector\CodeQuality\Rector\Class_\CompleteDynamicPropertiesRector;
use Rector\CodeQuality\Rector\Empty_\SimplifyEmptyCheckOnEmptyArrayRector;
use Rector\CodeQuality\Rector\Expression\InlineIfToExplicitIfRector;
use Rector\CodeQuality\Rector\Foreach_\UnusedForeachValueToArrayKeysRector;
use Rector\CodeQuality\Rector\FuncCall\ChangeArrayPushToArrayAssignRector;
use Rector\CodeQuality\Rector\FuncCall\CompactToVariablesRector;
use Rector\CodeQuality\Rector\FunctionLike\SimplifyUselessVariableRector;
use Rector\CodeQuality\Rector\Identical\FlipTypeControlToUseExclusiveTypeRector;
use Rector\CodeQuality\Rector\If_\ShortenElseIfRector;
@ -36,7 +36,6 @@ use Rector\EarlyReturn\Rector\Return_\PreparedValueToEarlyReturnRector;
use Rector\Php55\Rector\String_\StringClassNameToClassConstantRector;
use Rector\Php70\Rector\FuncCall\RandomFunctionRector;
use Rector\Php80\Rector\Class_\ClassPropertyAssignToConstructorPromotionRector;
use Rector\Php80\Rector\FunctionLike\MixedTypeRector;
use Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector;
use Rector\PHPUnit\CodeQuality\Rector\Class_\YieldDataProviderRector;
use Rector\PHPUnit\Set\PHPUnitSetList;
@ -83,6 +82,7 @@ return RectorConfig::configure()
__DIR__ . '/phpstan.neon.dist',
__DIR__ . '/vendor/codeigniter/phpstan-codeigniter/extension.neon',
__DIR__ . '/vendor/phpstan/phpstan-strict-rules/rules.neon',
__DIR__ . '/vendor/shipmonk/phpstan-baseline-per-identifier/extension.neon',
])
// is there a file you need to skip?
->withSkip([
@ -151,7 +151,6 @@ return RectorConfig::configure()
__DIR__ . '/system/Security/Security.php',
__DIR__ . '/system/Session/Session.php',
],
MixedTypeRector::class,
ReturnNeverTypeRector::class => [
__DIR__ . '/system/Cache/Handlers/BaseHandler.php',
@ -171,6 +170,8 @@ return RectorConfig::configure()
// Unnecessary (string) is inserted
NullToStrictStringFuncCallArgRector::class,
CompactToVariablesRector::class,
])
// auto import fully qualified class names
->withImportNames(removeUnusedImports: true)
@ -196,7 +197,6 @@ return RectorConfig::configure()
EmptyOnNullableObjectToInstanceOfRector::class,
DisallowedEmptyRuleFixerRector::class,
PrivatizeFinalClassPropertyRector::class,
CompleteDynamicPropertiesRector::class,
BooleanInIfConditionRuleFixerRector::class,
VersionCompareFuncCallToConstantRector::class,
AddClosureVoidReturnTypeWhereNoReturnRector::class,
@ -210,4 +210,4 @@ return RectorConfig::configure()
// keep '\\' prefix string on string '\Foo\Bar'
StringClassNameToClassConstantRector::SHOULD_KEEP_PRE_SLASH => true,
])
->withCodeQualityLevel(24);
->withCodeQualityLevel(31);

View File

@ -571,7 +571,7 @@ abstract class BaseModel
* This method works only with dbCalls.
*
* @param int $size Size
* @param Closure $userFunc Callback Function
* @param Closure(array<string, string>|object): mixed $userFunc Callback Function
*
* @return void
*
@ -1799,8 +1799,6 @@ abstract class BaseModel
// Loop over each property,
// saving the name/value in a new array we can return.
foreach ($props as $prop) {
// Must make protected values accessible.
$prop->setAccessible(true);
$properties[$prop->getName()] = $prop->getValue($object);
}
}

View File

@ -196,7 +196,16 @@ class Boot
// The path to the writable directory.
if (! defined('WRITEPATH')) {
define('WRITEPATH', realpath(rtrim($paths->writableDirectory, '\\/ ')) . DIRECTORY_SEPARATOR);
$writePath = realpath(rtrim($paths->writableDirectory, '\\/ '));
if ($writePath === false) {
header('HTTP/1.1 503 Service Unavailable.', true, 503);
echo 'The WRITEPATH is not set correctly.';
// EXIT_ERROR is not yet defined
exit(1);
}
define('WRITEPATH', $writePath . DIRECTORY_SEPARATOR);
}
// The path to the tests directory

View File

@ -337,13 +337,13 @@ class FileHandler extends BaseHandler
$relativePath = $sourceDir;
if ($fp = @opendir($sourceDir)) {
// reset the array and make sure $source_dir has a trailing slash on the initial call
// reset the array and make sure $sourceDir has a trailing slash on the initial call
if ($_recursion === false) {
$_filedata = [];
$sourceDir = rtrim(realpath($sourceDir) ?: $sourceDir, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;
}
// Used to be foreach (scandir($source_dir, 1) as $file), but scandir() is simply not as fast
// Used to be foreach (scandir($sourceDir, 1) as $file), but scandir() is simply not as fast
while (false !== ($file = readdir($fp))) {
if (is_dir($sourceDir . $file) && $file[0] !== '.' && $topLevelOnly === false) {
$this->getDirFileInfo($sourceDir . $file . DIRECTORY_SEPARATOR, $topLevelOnly, true);

View File

@ -122,8 +122,10 @@ final class AutoRouteCollector
$filtersShortest = $filterCollector->get($route['method'], $routePath . $sampleUri);
// Get common array elements
$filters['before'] = array_intersect($filtersLongest['before'], $filtersShortest['before']);
$filters['after'] = array_intersect($filtersLongest['after'], $filtersShortest['after']);
$filters = [
'before' => array_intersect($filtersLongest['before'], $filtersShortest['before']),
'after' => array_intersect($filtersLongest['after'], $filtersShortest['after']),
];
$route['before'] = implode(' ', array_map(class_basename(...), $filters['before']));
$route['after'] = implode(' ', array_map(class_basename(...), $filters['after']));

View File

@ -15,6 +15,7 @@ namespace CodeIgniter;
use CodeIgniter\HTTP\CLIRequest;
use CodeIgniter\HTTP\Exceptions\HTTPException;
use CodeIgniter\HTTP\Exceptions\RedirectException;
use CodeIgniter\HTTP\IncomingRequest;
use CodeIgniter\HTTP\RequestInterface;
use CodeIgniter\HTTP\ResponseInterface;
@ -77,7 +78,7 @@ class Controller
*
* @return void
*
* @throws HTTPException
* @throws HTTPException|RedirectException
*/
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
{
@ -105,7 +106,7 @@ class Controller
*
* @return void
*
* @throws HTTPException
* @throws HTTPException|RedirectException
*/
protected function forceHTTPS(int $duration = 31_536_000)
{

View File

@ -841,7 +841,7 @@ class BaseBuilder
* Generates a WHERE field IN('item', 'item') SQL query,
* joined with 'AND' if appropriate.
*
* @param array|BaseBuilder|Closure|string $values The values searched on, or anonymous function with subquery
* @param array|BaseBuilder|(Closure(BaseBuilder): BaseBuilder)|null $values The values searched on, or anonymous function with subquery
*
* @return $this
*/
@ -854,7 +854,7 @@ class BaseBuilder
* Generates a WHERE field IN('item', 'item') SQL query,
* joined with 'OR' if appropriate.
*
* @param array|BaseBuilder|Closure|string $values The values searched on, or anonymous function with subquery
* @param array|BaseBuilder|(Closure(BaseBuilder): BaseBuilder)|null $values The values searched on, or anonymous function with subquery
*
* @return $this
*/
@ -867,7 +867,7 @@ class BaseBuilder
* Generates a WHERE field NOT IN('item', 'item') SQL query,
* joined with 'AND' if appropriate.
*
* @param array|BaseBuilder|Closure|string $values The values searched on, or anonymous function with subquery
* @param array|BaseBuilder|(Closure(BaseBuilder): BaseBuilder)|null $values The values searched on, or anonymous function with subquery
*
* @return $this
*/
@ -880,7 +880,7 @@ class BaseBuilder
* Generates a WHERE field NOT IN('item', 'item') SQL query,
* joined with 'OR' if appropriate.
*
* @param array|BaseBuilder|Closure|string $values The values searched on, or anonymous function with subquery
* @param array|BaseBuilder|(Closure(BaseBuilder): BaseBuilder)|null $values The values searched on, or anonymous function with subquery
*
* @return $this
*/
@ -893,7 +893,7 @@ class BaseBuilder
* Generates a HAVING field IN('item', 'item') SQL query,
* joined with 'AND' if appropriate.
*
* @param array|BaseBuilder|Closure|string $values The values searched on, or anonymous function with subquery
* @param array|BaseBuilder|(Closure(BaseBuilder): BaseBuilder)|null $values The values searched on, or anonymous function with subquery
*
* @return $this
*/
@ -906,7 +906,7 @@ class BaseBuilder
* Generates a HAVING field IN('item', 'item') SQL query,
* joined with 'OR' if appropriate.
*
* @param array|BaseBuilder|Closure|string $values The values searched on, or anonymous function with subquery
* @param array|BaseBuilder|(Closure(BaseBuilder): BaseBuilder)|null $values The values searched on, or anonymous function with subquery
*
* @return $this
*/
@ -919,7 +919,7 @@ class BaseBuilder
* Generates a HAVING field NOT IN('item', 'item') SQL query,
* joined with 'AND' if appropriate.
*
* @param array|BaseBuilder|Closure|string $values The values searched on, or anonymous function with subquery
* @param array|BaseBuilder|(Closure(BaseBuilder):BaseBuilder)|null $values The values searched on, or anonymous function with subquery
*
* @return $this
*/
@ -932,7 +932,7 @@ class BaseBuilder
* Generates a HAVING field NOT IN('item', 'item') SQL query,
* joined with 'OR' if appropriate.
*
* @param array|BaseBuilder|Closure|string $values The values searched on, or anonymous function with subquery
* @param array|BaseBuilder|(Closure(BaseBuilder): BaseBuilder)|null $values The values searched on, or anonymous function with subquery
*
* @return $this
*/
@ -948,7 +948,7 @@ class BaseBuilder
* @used-by orWhereNotIn()
*
* @param non-empty-string|null $key
* @param array|BaseBuilder|Closure|null $values The values searched on, or anonymous function with subquery
* @param array|BaseBuilder|(Closure(BaseBuilder): BaseBuilder)|null $values The values searched on, or anonymous function with subquery
*
* @return $this
*
@ -1202,7 +1202,7 @@ class BaseBuilder
/**
* Add UNION statement
*
* @param BaseBuilder|Closure $union
* @param BaseBuilder|Closure(BaseBuilder): BaseBuilder $union
*
* @return $this
*/
@ -1214,7 +1214,7 @@ class BaseBuilder
/**
* Add UNION ALL statement
*
* @param BaseBuilder|Closure $union
* @param BaseBuilder|Closure(BaseBuilder): BaseBuilder $union
*
* @return $this
*/
@ -1227,7 +1227,7 @@ class BaseBuilder
* @used-by union()
* @used-by unionAll()
*
* @param BaseBuilder|Closure $union
* @param BaseBuilder|Closure(BaseBuilder): BaseBuilder $union
*
* @return $this
*/
@ -3563,7 +3563,7 @@ class BaseBuilder
}
/**
* @param BaseBuilder|Closure $builder
* @param BaseBuilder|Closure(BaseBuilder): BaseBuilder $builder
* @param bool $wrapped Wrap the subquery in brackets
* @param string $alias Subquery alias
*/

View File

@ -406,7 +406,7 @@ abstract class BaseConnection implements ConnectionInterface
/* If an established connection is available, then there's
* no need to connect and select the database.
*
* Depending on the database driver, conn_id can be either
* Depending on the database driver, connID can be either
* boolean TRUE, a resource or an object.
*/
if ($this->connID) {
@ -850,7 +850,7 @@ abstract class BaseConnection implements ConnectionInterface
}
// Reset the transaction failure flag.
// If the $test_mode flag is set to TRUE transactions will be rolled back
// If the $testMode flag is set to TRUE transactions will be rolled back
// even if the queries produce a successful result.
$this->transFailure = $testMode;
@ -973,6 +973,8 @@ abstract class BaseConnection implements ConnectionInterface
* ->get();
* })
*
* @param Closure(BaseConnection): mixed $func
*
* @return BasePreparedQuery|null
*/
public function prepare(Closure $func, array $options = [])

View File

@ -32,9 +32,9 @@ class Forge
protected $db;
/**
* List of fields.
* List of fields in the form `[name => attributes]`
*
* @var array<string, array|string> [name => attributes]
* @var array<string, array<string, bool|string>|string>
*/
protected $fields = [];
@ -1108,10 +1108,12 @@ class Forge
$fk = $this->foreignKeys;
if ($this->fields === []) {
$this->fields = array_flip(array_map(
static fn ($columnName) => $columnName->name,
$this->db->getFieldData($this->db->DBPrefix . $table)
));
$fieldData = $this->db->getFieldData($this->db->DBPrefix . $table);
$this->fields = array_combine(
array_map(static fn ($columnName) => $columnName->name, $fieldData),
array_fill(0, count($fieldData), [])
);
}
$fields = $this->fields;

View File

@ -58,7 +58,7 @@ class Connection extends BaseConnection
/**
* MySQLi object
*
* Has to be preserved without being assigned to $conn_id.
* Has to be preserved without being assigned to $connId.
*
* @var false|mysqli
*/
@ -312,7 +312,7 @@ class Connection extends BaseConnection
/**
* Executes the query against the database.
*
* @return false|mysqli_result;
* @return false|mysqli_result
*/
protected function execute(string $sql)
{

View File

@ -262,13 +262,13 @@ if (! function_exists('get_dir_file_info')) {
try {
$fp = opendir($sourceDir);
// reset the array and make sure $source_dir has a trailing slash on the initial call
// reset the array and make sure $sourceDir has a trailing slash on the initial call
if ($recursion === false) {
$fileData = [];
$sourceDir = rtrim(realpath($sourceDir), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;
}
// Used to be foreach (scandir($source_dir, 1) as $file), but scandir() is simply not as fast
// Used to be foreach (scandir($sourceDir, 1) as $file), but scandir() is simply not as fast
while (false !== ($file = readdir($fp))) {
if (is_dir($sourceDir . $file) && $file[0] !== '.' && $topLevelOnly === false) {
get_dir_file_info($sourceDir . $file . DIRECTORY_SEPARATOR, $topLevelOnly, true);

View File

@ -211,6 +211,8 @@ if (! function_exists('anchor_popup')) {
$windowName = '_blank';
}
$atts = [];
foreach (['width' => '800', 'height' => '600', 'scrollbars' => 'yes', 'menubar' => 'no', 'status' => 'yes', 'resizable' => 'yes', 'screenx' => '0', 'screeny' => '0'] as $key => $val) {
$atts[$key] = $attributes[$key] ?? $val;
unset($attributes[$key]);

View File

@ -592,9 +592,9 @@ class Model extends BaseModel
*/
public function getIdValue($row)
{
if (is_object($row) && isset($row->{$this->primaryKey})) {
// Get the raw primary key value of the Entity.
if ($row instanceof Entity) {
if (is_object($row)) {
// Get the raw or mapped primary key value of the Entity.
if ($row instanceof Entity && $row->{$this->primaryKey} !== null) {
$cast = $row->cast();
// Disable Entity casting, because raw primary key value is needed for database.
@ -608,8 +608,10 @@ class Model extends BaseModel
return $primaryKey;
}
if (! $row instanceof Entity && isset($row->{$this->primaryKey})) {
return $row->{$this->primaryKey};
}
}
if (is_array($row) && isset($row[$this->primaryKey])) {
return $row[$this->primaryKey];
@ -623,10 +625,6 @@ class Model extends BaseModel
* Works with $this->builder to get the Compiled select to
* determine the rows to operate on.
* This method works only with dbCalls.
*
* @return void
*
* @throws DataException
*/
public function chunk(int $size, Closure $userFunc)
{

View File

@ -1158,6 +1158,8 @@ class RouteCollection implements RouteCollectionInterface
/**
* Limits the routes to a specified ENVIRONMENT or they won't run.
*
* @param Closure(RouteCollection): void $callback
*/
public function environment(string $env, Closure $callback): RouteCollectionInterface
{

View File

@ -377,7 +377,7 @@ class Security implements SecurityInterface
return bin2hex(hex2bin($value) ^ hex2bin($key));
} catch (ErrorException $e) {
// "hex2bin(): Hexadecimal input string must have an even length"
throw new InvalidArgumentException($e->getMessage());
throw new InvalidArgumentException($e->getMessage(), $e->getCode(), $e);
}
}
@ -422,7 +422,7 @@ class Security implements SecurityInterface
*
* If it is acceptable for the user input to include relative paths,
* e.g. file/in/some/approved/folder.txt, you can set the second optional
* parameter, $relative_path to TRUE.
* parameter, $relativePath to TRUE.
*
* @param string $str Input file name
* @param bool $relativePath Whether to preserve paths

View File

@ -64,7 +64,7 @@ interface SecurityInterface
*
* If it is acceptable for the user input to include relative paths,
* e.g. file/in/some/approved/folder.txt, you can set the second optional
* parameter, $relative_path to TRUE.
* parameter, $relativePath to TRUE.
*
* @param string $str Input file name
* @param bool $relativePath Whether to preserve paths

View File

@ -248,7 +248,7 @@ class Session implements SessionInterface
if (! isset($_SESSION['__ci_last_regenerate'])) {
$_SESSION['__ci_last_regenerate'] = Time::now()->getTimestamp();
} elseif ($_SESSION['__ci_last_regenerate'] < (Time::now()->getTimestamp() - $regenerateTime)) {
$this->regenerate((bool) $this->config->regenerateDestroy);
$this->regenerate($this->config->regenerateDestroy);
}
}
// Another work-around ... PHP doesn't seem to send the session cookie

View File

@ -31,7 +31,7 @@ use Throwable;
*
* $this->withRequest($request)
* ->withResponse($response)
* ->withURI($uri)
* ->withUri($uri)
* ->withBody($body)
* ->controller('App\Controllers\Home')
* ->execute('methodName');

View File

@ -119,6 +119,8 @@ trait FilterTestTrait
*
* @param FilterInterface|string $filter The filter instance, class, or alias
* @param string $position "before" or "after"
*
* @phpstan-return Closure(list<string>|null=): mixed
*/
protected function getFilterCaller($filter, string $position): Closure
{

View File

@ -39,7 +39,6 @@ trait ReflectionHelper
public static function getPrivateMethodInvoker($obj, $method)
{
$refMethod = new ReflectionMethod($obj, $method);
$refMethod->setAccessible(true);
$obj = (gettype($obj) === 'object') ? $obj : null;
return static fn (...$args) => $refMethod->invokeArgs($obj, $args);
@ -59,10 +58,7 @@ trait ReflectionHelper
{
$refClass = is_object($obj) ? new ReflectionObject($obj) : new ReflectionClass($obj);
$refProperty = $refClass->getProperty($property);
$refProperty->setAccessible(true);
return $refProperty;
return $refClass->getProperty($property);
}
/**

View File

@ -71,7 +71,6 @@ trait PropertiesTrait
continue;
}
$property->setAccessible(true);
$properties[] = $property;
}

View File

@ -369,10 +369,8 @@ class Rules
foreach (explode(',', $fields) as $field) {
if (
(array_key_exists($field, $data)
&& ! empty($data[$field])) // @phpstan-ignore-line Use empty()
|| (str_contains($field, '.')
&& ! empty(dot_array_search($field, $data))) // @phpstan-ignore-line Use empty()
(array_key_exists($field, $data) && ! empty($data[$field]))
|| (str_contains($field, '.') && ! empty(dot_array_search($field, $data)))
) {
$requiredFields[] = $field;
}
@ -419,7 +417,7 @@ class Rules
if (
(! str_contains($otherField, '.'))
&& (! array_key_exists($otherField, $data)
|| empty($data[$otherField])) // @phpstan-ignore-line Use empty()
|| empty($data[$otherField]))
) {
return false;
}
@ -434,7 +432,7 @@ class Rules
$fieldKey = $fieldSplitArray[1];
if (is_array($fieldData)) {
return ! empty(dot_array_search($otherField, $data)[$fieldKey]); // @phpstan-ignore-line Use empty()
return ! empty(dot_array_search($otherField, $data)[$fieldKey]);
}
$nowField = str_replace('*', $fieldKey, $otherField);
$nowFieldVaule = dot_array_search($nowField, $data);

View File

@ -466,7 +466,7 @@ class Validation implements ValidationInterface
}
/**
* @param Closure|string $rule
* @param Closure(bool|float|int|list<mixed>|object|string|null, bool|float|int|list<mixed>|object|string|null, string|null, string|null): (bool|string) $rule
*/
private function isClosure($rule): bool
{

View File

@ -71,9 +71,7 @@ class Filters
*/
public static function default($value, string $default): string
{
return empty($value) // @phpstan-ignore-line
? $default
: $value;
return empty($value) ? $default : $value;
}
/**

View File

@ -549,13 +549,11 @@ final class CLITest extends CIUnitTestCase
public function testWindow(): void
{
$height = new ReflectionProperty(CLI::class, 'height');
$height->setAccessible(true);
$height->setValue(null, null);
$this->assertIsInt(CLI::getHeight());
$width = new ReflectionProperty(CLI::class, 'width');
$width->setAccessible(true);
$width->setValue(null, null);
$this->assertIsInt(CLI::getWidth());

View File

@ -13,6 +13,7 @@ declare(strict_types=1);
namespace CodeIgniter\Cache;
use CodeIgniter\Cache\FactoriesCache\FileVarExportHandler;
use Config\Cache as CacheConfig;
use PHPUnit\Framework\Attributes\Group;
@ -23,7 +24,7 @@ use PHPUnit\Framework\Attributes\Group;
final class FactoriesCacheFileHandlerTest extends FactoriesCacheFileVarExportHandlerTest
{
/**
* @var @var FileVarExportHandler|CacheInterface
* @var CacheInterface|FileVarExportHandler
*/
protected $handler;

View File

@ -703,13 +703,11 @@ final class DataConverterTest extends CIUnitTestCase
'created_at' => 'datetime',
'updated_at' => 'datetime',
];
$extractor = static function ($obj): array {
$array['id'] = $obj->id;
$array['name'] = $obj->name;
$array['created_at'] = $obj->created_at;
return $array;
};
$extractor = static fn ($obj): array => [
'id' => $obj->id,
'name' => $obj->name,
'created_at' => $obj->created_at,
];
$converter = $this->createDataConverter($types, [], db_connect(), null, $extractor);
$phpData = [

View File

@ -81,8 +81,11 @@ final class ForgeTest extends CIUnitTestCase
$this->assertFalse($result);
$db->close();
if ($this->db->DBDriver !== 'SQLite3') {
$this->forge->dropDatabase($dbName);
} elseif (is_file($db->database)) {
unlink($db->database);
}
}

View File

@ -97,7 +97,7 @@ final class InsertTest extends CIUnitTestCase
$this->db->table('job')->replace($data);
$row = $this->db->table('job')
->getwhere(['id' => 5])
->getWhere(['id' => 5])
->getRow();
$this->assertSame('Cab Driver', $row->name);
@ -114,7 +114,7 @@ final class InsertTest extends CIUnitTestCase
$this->db->table('job')->replace($data);
$row = $this->db->table('job')
->getwhere(['id' => 1])
->getWhere(['id' => 1])
->getRow();
$this->assertSame('Cab Driver', $row->name);
@ -135,7 +135,7 @@ final class InsertTest extends CIUnitTestCase
$builder->replace($data);
$row = $this->db->table('job')
->getwhere(['id' => 1])
->getWhere(['id' => 1])
->getRow();
$this->assertSame('John Smith', $row->name);
@ -147,7 +147,7 @@ final class InsertTest extends CIUnitTestCase
$builder->replace($data);
$row = $this->db->table('job')
->getwhere(['id' => 2])
->getWhere(['id' => 2])
->getRow();
$this->assertSame('Hans Schmidt', $row->name);
}

View File

@ -101,7 +101,7 @@ final class MetadataTest extends CIUnitTestCase
$expectedTables[] = 'tmp_widgets';
sort($tables);
$this->assertSame($expectedTables, array_values($tables));
$this->assertSame($expectedTables, $tables);
} finally {
$this->dropExtraneousTable();
}
@ -117,7 +117,7 @@ final class MetadataTest extends CIUnitTestCase
$this->assertNotSame([], $tables);
sort($tables);
$this->assertSame($this->expectedTables, array_values($tables));
$this->assertSame($this->expectedTables, $tables);
} finally {
$this->dropExtraneousTable();
}
@ -138,7 +138,7 @@ final class MetadataTest extends CIUnitTestCase
$this->assertNotSame([], $tables);
sort($tables);
$this->assertSame(['tmp_widgets'], array_values($tables));
$this->assertSame(['tmp_widgets'], $tables);
} finally {
$this->db->setPrefix($oldPrefix);
$this->dropExtraneousTable();

View File

@ -17,7 +17,7 @@ use CodeIgniter\Database\RawSql;
use CodeIgniter\Test\CIUnitTestCase;
use CodeIgniter\Test\DatabaseTestTrait;
use PHPUnit\Framework\Attributes\Group;
use stdclass;
use stdClass;
use Tests\Support\Database\Seeds\CITestSeeder;
/**
@ -61,12 +61,12 @@ final class RawSqlTest extends CIUnitTestCase
{
$data = [];
$row = new stdclass();
$row = new stdClass();
$row->email = 'derek@world.com';
$row->created_at = new RawSql("setDateTime('2022-01-01')");
$data[] = $row;
$row = new stdclass();
$row = new stdClass();
$row->email = 'ahmadinejad@world.com';
$row->created_at = new RawSql("setDateTime('2022-01-01')");
$data[] = $row;
@ -85,12 +85,12 @@ final class RawSqlTest extends CIUnitTestCase
{
$data = [];
$row = new stdclass();
$row = new stdClass();
$row->email = 'derek@world.com';
$row->created_at = new RawSql("setDateTime('2022-02-01')");
$data[] = $row;
$row = new stdclass();
$row = new stdClass();
$row->email = 'ahmadinejad@world.com';
$row->created_at = new RawSql("setDateTime('2022-02-01')");
$data[] = $row;
@ -147,12 +147,12 @@ final class RawSqlTest extends CIUnitTestCase
{
$data = [];
$row = new stdclass();
$row = new stdClass();
$row->email = 'tony@world.com';
$row->created_at = new RawSql("setDateTime('2022-05-01')");
$data[] = $row;
$row = new stdclass();
$row = new stdClass();
$row->email = 'sara@world.com';
$row->created_at = new RawSql("setDateTime('2022-05-01')");
$data[] = $row;
@ -173,12 +173,12 @@ final class RawSqlTest extends CIUnitTestCase
{
$data = [];
$row = new stdclass();
$row = new stdClass();
$row->email = 'laura@world.com';
$row->created_at = new RawSql("setDateTime('2022-06-01')");
$data[] = $row;
$row = new stdclass();
$row = new stdClass();
$row->email = 'travis@world.com';
$row->created_at = new RawSql("setDateTime('2022-06-01')");
$data[] = $row;

View File

@ -20,7 +20,7 @@ use CodeIgniter\Test\CIUnitTestCase;
use CodeIgniter\Test\DatabaseTestTrait;
use Config\Database;
use PHPUnit\Framework\Attributes\Group;
use stdclass;
use stdClass;
use Tests\Support\Database\Seeds\CITestSeeder;
/**
@ -107,21 +107,21 @@ final class UpsertTest extends CIUnitTestCase
$data = [];
// new row insert
$row = new stdclass();
$row = new stdClass();
$row->name = 'Pedro';
$row->email = 'pedro@acme.com';
$row->country = 'El Salvador';
$data[] = $row;
// no change
$row = new stdclass();
$row = new stdClass();
$row->name = 'Ahmadinejad';
$row->email = 'ahmadinejad@world.com';
$row->country = 'Iran';
$data[] = $row;
// changed country for update
$row = new stdclass();
$row = new stdClass();
$row->name = 'Derek Jones';
$row->email = 'derek@world.com';
$row->country = 'Canada';
@ -190,7 +190,7 @@ final class UpsertTest extends CIUnitTestCase
->upsert($userData);
$new = $this->db->table('user')
->getwhere(['email' => 'ahmadinejad@world.com'])
->getWhere(['email' => 'ahmadinejad@world.com'])
->getRow();
$this->assertSame(5, (int) $new->id);
@ -460,7 +460,7 @@ final class UpsertTest extends CIUnitTestCase
$this->db->table('user')->upsert($data);
$original = $this->db->table('user')
->getwhere(['id' => 6])
->getWhere(['id' => 6])
->getRow();
$data = [
@ -474,7 +474,7 @@ final class UpsertTest extends CIUnitTestCase
// get by id
$row = $this->db->table('user')
->getwhere(['id' => 6])
->getWhere(['id' => 6])
->getRow();
$this->assertSame('Random Name 356', $row->name);
@ -508,17 +508,17 @@ final class UpsertTest extends CIUnitTestCase
// get by id
$row1 = $this->db->table('user')
->getwhere(['id' => 1])
->getWhere(['id' => 1])
->getRow();
// get by id
$row2 = $this->db->table('user')
->getwhere(['id' => 2])
->getWhere(['id' => 2])
->getRow();
// get by id
$row3 = $this->db->table('user')
->getwhere(['id' => 3])
->getWhere(['id' => 3])
->getRow();
$this->assertSame('Upsert One On Id', $row1->name);
@ -553,17 +553,17 @@ final class UpsertTest extends CIUnitTestCase
// get by id
$row1 = $this->db->table('user')
->getwhere(['email' => 'nullone@domain.com'])
->getWhere(['email' => 'nullone@domain.com'])
->getRow();
// get by id
$row2 = $this->db->table('user')
->getwhere(['email' => 'nulltwo@domain.com'])
->getWhere(['email' => 'nulltwo@domain.com'])
->getRow();
// get by id
$row3 = $this->db->table('user')
->getwhere(['email' => 'nullthree@domain.com'])
->getWhere(['email' => 'nullthree@domain.com'])
->getRow();
$this->assertSame('Null One', $row1->name);
@ -644,7 +644,7 @@ final class UpsertTest extends CIUnitTestCase
$builder->setData($moreData);
}
$evenMoreData = new stdclass();
$evenMoreData = new stdClass();
$evenMoreData->name = 'New User2 users';
$evenMoreData->email = 'newuser2@example.com';
$evenMoreData->country = 'Netherlands';

View File

@ -66,13 +66,9 @@ final class ExceptionsTest extends CIUnitTestCase
$this->exception = new Exceptions($config);
$this->exception->initialize();
// this is only needed for IDEs not to complain that strlen does not accept explicit null
$maybeNull = PHP_VERSION_ID >= 80100 ? null : 'random string';
try {
// We test DEPRECATED error, so cannot set `declare(strict_types=1)` in this file.
strlen($maybeNull);
$this->assertLogContains('error', '[DEPRECATED] strlen(): ');
$result = str_contains('foobar', null); // @phpstan-ignore argument.type (Needed for testing)
$this->assertLogContains('error', '[DEPRECATED] str_contains(): ');
} catch (ErrorException) {
$this->fail('The catch block should not be reached.');
} finally {

View File

@ -42,7 +42,7 @@ final class FormatTest extends CIUnitTestCase
public function testGetFormatter(): void
{
$this->assertInstanceof(FormatterInterface::class, $this->format->getFormatter('application/json'));
$this->assertInstanceOf(FormatterInterface::class, $this->format->getFormatter('application/json'));
}
public function testGetFormatterExpectsExceptionOnUndefinedMime(): void

View File

@ -524,7 +524,7 @@ final class FileCollectionTest extends CIUnitTestCase
$collection = new FileCollection();
$file = $collection->getFile('fileuser');
$this->AssertNull($file);
$this->assertNull($file);
}
public function testFileReturnValidMultipleFiles(): void

View File

@ -301,7 +301,7 @@ final class SaveModelTest extends LiveModelTestCase
$this->setPrivateProperty($testModel, 'useTimestamps', true);
$this->assertTrue($testModel->save($entity));
$testModel->truncate();
$testModel->db->table('empty')->truncate();
}
public function testInvalidAllowedFieldException(): void
@ -365,4 +365,44 @@ final class SaveModelTest extends LiveModelTestCase
$this->assertSame($insert['key'], $this->model->getInsertID());
$this->seeInDatabase('without_auto_increment', $update);
}
/**
* @see https://github.com/codeigniter4/CodeIgniter4/issues/9306
*/
public function testSaveNewEntityWithMappedPrimaryKey(): void
{
$entity = new class () extends Entity {
protected string $name;
protected $attributes = [
'id' => null,
'name' => null,
];
protected $original = [
'id' => null,
'name' => null,
];
protected $datamap = [
'new_kid_in_the_block' => 'id',
];
};
$testModel = new class () extends Model {
protected $table = 'empty';
protected $allowedFields = [
'name',
];
protected $returnType = 'object';
};
$entity->name = 'New';
$this->assertTrue($testModel->save($entity));
$this->seeInDatabase('empty', ['id' => 1, 'name' => 'New']);
$entity->new_kid_in_the_block = 1;
$entity->name = 'Updated';
$this->assertTrue($testModel->save($entity));
$this->seeInDatabase('empty', ['id' => 1, 'name' => 'Updated']);
$testModel->db->table('empty')->truncate();
}
}

View File

@ -15,7 +15,7 @@ namespace CodeIgniter\Router;
use App\Controllers\Home;
use App\Controllers\Product;
use CodeIgniter\controller;
use CodeIgniter\Controller;
use CodeIgniter\Exceptions\PageNotFoundException;
use CodeIgniter\HTTP\Method;
use CodeIgniter\Test\CIUnitTestCase;
@ -245,10 +245,10 @@ final class RouteCollectionTest extends CIUnitTestCase
$routes = $this->getCollector();
$routes->setDefaultNamespace('\CodeIgniter');
$routes->add('home', 'controller');
$routes->add('home', 'Controller');
$expects = [
'home' => '\\' . controller::class,
'home' => '\\' . Controller::class,
];
$routes = $routes->getRoutes();

View File

@ -51,7 +51,7 @@ final class ControllerTestTraitTest extends CIUnitTestCase
$this->expectException(InvalidArgumentException::class);
$logger = new Logger(new LoggerConfig());
$this->withURI('http://example.com')
$this->withUri('http://example.com')
->withLogger($logger)
->controller(NeverHeardOfIt::class)
->execute('index');
@ -62,7 +62,7 @@ final class ControllerTestTraitTest extends CIUnitTestCase
$this->expectException(InvalidArgumentException::class);
$logger = new Logger(new LoggerConfig());
$this->withURI('http://example.com')
$this->withUri('http://example.com')
->withLogger($logger)
->controller(Home::class)
->execute('nothere');
@ -71,7 +71,7 @@ final class ControllerTestTraitTest extends CIUnitTestCase
public function testController(): void
{
$logger = new Logger(new LoggerConfig());
$result = $this->withURI('http://example.com')
$result = $this->withUri('http://example.com')
->withLogger($logger)
->controller(Home::class)
->execute('index');
@ -81,7 +81,7 @@ final class ControllerTestTraitTest extends CIUnitTestCase
public function testControllerWithoutLogger(): void
{
$result = $this->withURI('http://example.com')
$result = $this->withUri('http://example.com')
->controller(Home::class)
->execute('index');
@ -91,7 +91,7 @@ final class ControllerTestTraitTest extends CIUnitTestCase
public function testPopcornIndex(): void
{
$logger = new Logger(new LoggerConfig());
$result = $this->withURI('http://example.com')
$result = $this->withUri('http://example.com')
->withLogger($logger)
->controller(Popcorn::class)
->execute('index');
@ -102,7 +102,7 @@ final class ControllerTestTraitTest extends CIUnitTestCase
public function testPopcornIndex2(): void
{
$logger = new Logger(new LoggerConfig());
$result = $this->withURI('http://example.com')
$result = $this->withUri('http://example.com')
->withLogger($logger)
->controller(Popcorn::class)
->execute('index');
@ -114,7 +114,7 @@ final class ControllerTestTraitTest extends CIUnitTestCase
public function testPopcornFailure(): void
{
$logger = new Logger(new LoggerConfig());
$result = $this->withURI('http://example.com')
$result = $this->withUri('http://example.com')
->withLogger($logger)
->controller(Popcorn::class)
->execute('pop');
@ -125,7 +125,7 @@ final class ControllerTestTraitTest extends CIUnitTestCase
public function testPopcornException(): void
{
$logger = new Logger(new LoggerConfig());
$result = $this->withURI('http://example.com')
$result = $this->withUri('http://example.com')
->withLogger($logger)
->controller(Popcorn::class)
->execute('popper');
@ -139,7 +139,7 @@ final class ControllerTestTraitTest extends CIUnitTestCase
$config = new App();
$body = '';
$result = $this->withURI('http://example.com')
$result = $this->withUri('http://example.com')
->withConfig($config)
->withRequest(service('request', $config))
->withResponse(service('response', $config))
@ -155,7 +155,7 @@ final class ControllerTestTraitTest extends CIUnitTestCase
public function testRequestPassthrough(): void
{
$logger = new Logger(new LoggerConfig());
$result = $this->withURI('http://example.com')
$result = $this->withUri('http://example.com')
->withLogger($logger)
->controller(Popcorn::class)
->execute('popper');
@ -167,7 +167,7 @@ final class ControllerTestTraitTest extends CIUnitTestCase
public function testFailureResponse(): void
{
$logger = new Logger(new LoggerConfig());
$result = $this->withURI('http://example.com')
$result = $this->withUri('http://example.com')
->withLogger($logger)
->controller(Popcorn::class)
->execute('oops');
@ -179,7 +179,7 @@ final class ControllerTestTraitTest extends CIUnitTestCase
public function testEmptyResponse(): void
{
$logger = new Logger(new LoggerConfig());
$result = $this->withURI('http://example.com')
$result = $this->withUri('http://example.com')
->withLogger($logger)
->controller(Popcorn::class)
->execute('weasel');
@ -192,7 +192,7 @@ final class ControllerTestTraitTest extends CIUnitTestCase
public function testRedirect(): void
{
$logger = new Logger(new LoggerConfig());
$result = $this->withURI('http://example.com')
$result = $this->withUri('http://example.com')
->withLogger($logger)
->controller(Popcorn::class)
->execute('goaway');
@ -203,7 +203,7 @@ final class ControllerTestTraitTest extends CIUnitTestCase
public function testDOMParserForward(): void
{
$logger = new Logger(new LoggerConfig());
$result = $this->withURI('http://example.com')
$result = $this->withUri('http://example.com')
->withLogger($logger)
->controller(Popcorn::class)
->execute('index');
@ -214,7 +214,7 @@ final class ControllerTestTraitTest extends CIUnitTestCase
public function testFailsForward(): void
{
$logger = new Logger(new LoggerConfig());
$result = $this->withURI('http://example.com')
$result = $this->withUri('http://example.com')
->withLogger($logger)
->controller(Popcorn::class)
->execute('index');
@ -228,7 +228,7 @@ final class ControllerTestTraitTest extends CIUnitTestCase
*/
public function testResponseOverriding(): void
{
$result = $this->withURI('http://example.com/rest/')
$result = $this->withUri('http://example.com/rest/')
->controller(Popcorn::class)
->execute('index3');
@ -274,7 +274,7 @@ final class ControllerTestTraitTest extends CIUnitTestCase
public function testWithUriUpdatesUriStringAndCurrentUrlValues(): void
{
$result = $this->withURI('http://example.com/foo/bar/1/2/3')
$result = $this->withUri('http://example.com/foo/bar/1/2/3')
->controller(Newautorouting::class)
->execute('postSave', '1', '2', '3');

View File

@ -789,7 +789,7 @@ class FormatRulesTest extends CIUnitTestCase
$data = [
'foo' => $value,
];
$this->assertsame($expected, $this->validation->run($data));
$this->assertSame($expected, $this->validation->run($data));
}
/**
@ -807,7 +807,7 @@ class FormatRulesTest extends CIUnitTestCase
$data = [
'foo' => $value,
];
$this->assertsame($expected, $this->validation->run($data));
$this->assertSame($expected, $this->validation->run($data));
}
public static function provideInvalidIntegerType(): iterable

View File

@ -38,10 +38,10 @@ Bugs Fixed
- **DownloadResponse:** Fixed a bug that prevented setting custom cache headers. We can now also use the ``setCache()`` method.
- **DownloadResponse:** Fixed a bug involving sending a custom "Expires-Disposition" header.
- **Routing:** Fixed a TypeError in `str_replace()` when `Routing::$translateURIDashes` is set to `true` and a route is defined using a closure.
- **Validation:** Fixed a bug where complex language strings were not properly handled.
- **CURLRequest:** Added support for handling proxy responses using HTTP versions other than 1.1.
- **Database:** Fixed a bug that caused ``Postgre\Connection::reconnect()`` method to throw an error when the connection had not yet been established.
- **Model** Fixed a bug that caused the ``Model::getIdValue()`` method to not correctly recognize the primary key in the ``Entity`` object if a data mapping for the primary key was used.
See the repo's
`CHANGELOG.md <https://github.com/codeigniter4/CodeIgniter4/blob/develop/CHANGELOG.md>`_

View File

@ -1,3 +1,3 @@
<?php
$user = $userModel->find($user_id);
$user = $userModel->find($userId);

View File

@ -1,3 +1,3 @@
<?php
$user = $userModel->findColumn($column_name);
$user = $userModel->findColumn($columnName);

View File

@ -1,3 +1,3 @@
<?php
$user_name = $userModel->escape($name);
$userName = $userModel->escape($name);

View File

@ -90,7 +90,7 @@ Allows you to provide a **Logger** instance:
If you do not provide one, a new Logger instance with the default configuration values will be passed
into your controller.
withURI(string $uri)
withUri(string $uri)
--------------------
Allows you to provide a new URI that simulates the URL the client was visiting when this controller was run.

View File

@ -13,7 +13,7 @@ class ForumControllerTest extends CIUnitTestCase
public function testShowCategories()
{
$result = $this->withURI('http://example.com/categories')
$result = $this->withUri('http://example.com/categories')
->controller(ForumController::class)
->execute('showCategories');

View File

@ -1,5 +1,5 @@
<?php
$results = $this->withURI('http://example.com/forums/categories')
$results = $this->withUri('http://example.com/forums/categories')
->controller(\App\Controllers\ForumController::class)
->execute('showCategories');

View File

@ -0,0 +1,378 @@
# total 75 errors
parameters:
ignoreErrors:
-
message: '#^Parameter \#2 \$params of method CodeIgniter\\CLI\\BaseCommand\:\:call\(\) expects array\<int\|string, string\|null\>, array\<int\|string, int\|string\|null\> given\.$#'
count: 2
path: ../../system/Commands/Database/MigrateRefresh.php
-
message: '#^Parameter \#3 \.\.\.\$arrays of function array_map expects array, int\|string given\.$#'
count: 1
path: ../../system/Database/BaseBuilder.php
-
message: '#^Parameter \#3 \.\.\.\$arrays of function array_map expects array, int\|string given\.$#'
count: 1
path: ../../system/Database/OCI8/Builder.php
-
message: '#^Parameter \#3 \.\.\.\$arrays of function array_map expects array, int\|string given\.$#'
count: 1
path: ../../system/Database/Postgre/Builder.php
-
message: '#^Parameter \#3 \.\.\.\$arrays of function array_map expects array, int\|string given\.$#'
count: 1
path: ../../system/Database/SQLite3/Builder.php
-
message: '#^Parameter \#2 \$message_type of function error_log expects 0\|1\|3\|4, int given\.$#'
count: 1
path: ../../system/Log/Handlers/ErrorlogHandler.php
-
message: '#^Parameter \#1 \$fields of method CodeIgniter\\Database\\Forge\:\:addField\(\) expects array\<string, array\|string\>\|string, array\<int\|string, array\<string, bool\|int\|string\>\|string\> given\.$#'
count: 2
path: ../../tests/_support/Database/Migrations/20160428212500_Create_test_tables.php
-
message: '#^Parameter \#2 \$to of method CodeIgniter\\Router\\RouteCollection\:\:add\(\) expects array\|\(Closure\(mixed \.\.\.\)\: \(CodeIgniter\\HTTP\\ResponseInterface\|string\|void\)\)\|string, Closure\(mixed\)\: \(CodeIgniter\\HTTP\\DownloadResponse\|null\) given\.$#'
count: 1
path: ../../tests/system/CodeIgniterTest.php
-
message: '#^Parameter \#2 \$to of method CodeIgniter\\Router\\RouteCollection\:\:add\(\) expects array\|\(Closure\(mixed \.\.\.\)\: \(CodeIgniter\\HTTP\\ResponseInterface\|string\|void\)\)\|string, Closure\(mixed\)\: CodeIgniter\\HTTP\\ResponseInterface given\.$#'
count: 1
path: ../../tests/system/CodeIgniterTest.php
-
message: '#^Parameter \#2 \$to of method CodeIgniter\\Router\\RouteCollection\:\:add\(\) expects array\|\(Closure\(mixed \.\.\.\)\: \(CodeIgniter\\HTTP\\ResponseInterface\|string\|void\)\)\|string, Closure\(mixed\)\: non\-falsy\-string given\.$#'
count: 1
path: ../../tests/system/CodeIgniterTest.php
-
message: '#^Parameter \#2 \$to of method CodeIgniter\\Router\\RouteCollection\:\:add\(\) expects array\|\(Closure\(mixed \.\.\.\)\: \(CodeIgniter\\HTTP\\ResponseInterface\|string\|void\)\)\|string, Closure\(mixed\)\: void given\.$#'
count: 1
path: ../../tests/system/CodeIgniterTest.php
-
message: '#^Parameter \#2 \$mock of static method CodeIgniter\\Config\\BaseService\:\:injectMock\(\) expects object, null given\.$#'
count: 4
path: ../../tests/system/Commands/RoutesTest.php
-
message: '#^Parameter \#2 \$context of function esc expects ''attr''\|''css''\|''html''\|''js''\|''raw''\|''url'', ''0'' given\.$#'
count: 1
path: ../../tests/system/CommonFunctionsTest.php
-
message: '#^Parameter \#2 \$context of function esc expects ''attr''\|''css''\|''html''\|''js''\|''raw''\|''url'', ''bogus'' given\.$#'
count: 1
path: ../../tests/system/CommonFunctionsTest.php
-
message: '#^Parameter \#2 \$file of class CodeIgniter\\Config\\DotEnv constructor expects string, int given\.$#'
count: 1
path: ../../tests/system/Config/DotEnvTest.php
-
message: '#^Parameter \#1 \$expected of method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) expects class\-string\<Config\\TestRegistrar\>, string given\.$#'
count: 1
path: ../../tests/system/Config/FactoriesTest.php
-
message: '#^Parameter \#3 \$classname of static method CodeIgniter\\Config\\Factories\:\:define\(\) expects class\-string, string given\.$#'
count: 2
path: ../../tests/system/Config/FactoriesTest.php
-
message: '#^Parameter \#1 \$cookies of class CodeIgniter\\Cookie\\CookieStore constructor expects array\<CodeIgniter\\Cookie\\Cookie\>, array\<int, DateTimeImmutable\> given\.$#'
count: 1
path: ../../tests/system/Cookie/CookieStoreTest.php
-
message: '#^Parameter \#3 \$options of class CodeIgniter\\Cookie\\Cookie constructor expects array\<string, bool\|int\|string\>, array\<string, DateTimeImmutable\> given\.$#'
count: 1
path: ../../tests/system/Cookie/CookieTest.php
-
message: '#^Parameter \#1 \$from of method CodeIgniter\\Database\\BaseBuilder\:\:from\(\) expects array\|string, null given\.$#'
count: 1
path: ../../tests/system/Database/Builder/FromTest.php
-
message: '#^Parameter \#3 \$subject of function str_replace expects array\<string\>\|string, CodeIgniter\\Database\\ResultInterface given\.$#'
count: 10
path: ../../tests/system/Database/Builder/GetTest.php
-
message: '#^Parameter \#3 \$subject of function str_replace expects array\<string\>\|string, CodeIgniter\\Database\\ResultInterface\|false given\.$#'
count: 6
path: ../../tests/system/Database/Builder/GetTest.php
-
message: '#^Parameter \#1 \$fields of method CodeIgniter\\Database\\Forge\:\:addField\(\) expects array\<string, array\|string\>\|string, array\<int, string\> given\.$#'
count: 2
path: ../../tests/system/Database/Live/ForgeTest.php
-
message: '#^Parameter \#1 \$db of class CodeIgniter\\Database\\SQLite3\\Table constructor expects CodeIgniter\\Database\\SQLite3\\Connection, CodeIgniter\\Database\\BaseConnection given\.$#'
count: 1
path: ../../tests/system/Database/Live/SQLite3/AlterTableTest.php
-
message: '#^Parameter \#2 \$forge of class CodeIgniter\\Database\\SQLite3\\Table constructor expects CodeIgniter\\Database\\SQLite3\\Forge, CodeIgniter\\Database\\Forge given\.$#'
count: 1
path: ../../tests/system/Database/Live/SQLite3/AlterTableTest.php
-
message: '#^Parameter \#1 \$set of method CodeIgniter\\Database\\BaseBuilder\:\:updateFields\(\) expects list\<CodeIgniter\\Database\\RawSql\|string\>\|string, array\{0\: ''country'', updated_at\: CodeIgniter\\Database\\RawSql\} given\.$#'
count: 2
path: ../../tests/system/Database/Live/UpdateTest.php
-
message: '#^Parameter \#1 \$set of method CodeIgniter\\Database\\BaseBuilder\:\:updateFields\(\) expects list\<CodeIgniter\\Database\\RawSql\|string\>\|string, array\{0\: ''name'', updated_at\: CodeIgniter\\Database\\RawSql\} given\.$#'
count: 1
path: ../../tests/system/Database/Live/UpdateTest.php
-
message: '#^Parameter \#1 \$set of method CodeIgniter\\Database\\BaseBuilder\:\:updateFields\(\) expects list\<CodeIgniter\\Database\\RawSql\|string\>\|string, array\{updated_at\: CodeIgniter\\Database\\RawSql\} given\.$#'
count: 2
path: ../../tests/system/Database/Live/UpsertTest.php
-
message: '#^Parameter \#2 \$callable of method CodeIgniter\\Debug\\Timer\:\:record\(\) expects callable\(\)\: mixed, ''strlen'' given\.$#'
count: 1
path: ../../tests/system/Debug/TimerTest.php
-
message: '#^Parameter \#1 \$value of method CodeIgniter\\HTTP\\Header\:\:setValue\(\) expects array\<int\|string, array\<string, string\>\|string\>\|string\|null, array\<int, int\|string\> given\.$#'
count: 1
path: ../../tests/system/HTTP/HeaderTest.php
-
message: '#^Parameter \#2 \$value of class CodeIgniter\\HTTP\\Header constructor expects array\<int\|string, array\<string, string\>\|string\>\|string\|null, int given\.$#'
count: 1
path: ../../tests/system/HTTP/HeaderTest.php
-
message: '#^Parameter \#2 \$value of class CodeIgniter\\HTTP\\Header constructor expects array\<int\|string, array\<string, string\>\|string\>\|string\|null, stdClass given\.$#'
count: 1
path: ../../tests/system/HTTP/HeaderTest.php
-
message: '#^Parameter \#1 \$config of class CodeIgniter\\Log\\Logger constructor expects Config\\Logger, CodeIgniter\\Test\\Mock\\MockLogger given\.$#'
count: 1
path: ../../tests/system/HTTP/RedirectExceptionTest.php
-
message: '#^Parameter \#3 \$expire of method CodeIgniter\\HTTP\\Response\:\:setCookie\(\) expects int, string given\.$#'
count: 1
path: ../../tests/system/HTTP/ResponseSendTest.php
-
message: '#^Parameter \#1 \$data of method CodeIgniter\\HTTP\\Message\:\:setBody\(\) expects string, array\<string, list\<int\>\|string\> given\.$#'
count: 2
path: ../../tests/system/HTTP/ResponseTest.php
-
message: '#^Parameter \#3 \$expire of method CodeIgniter\\HTTP\\Response\:\:setCookie\(\) expects int, string given\.$#'
count: 2
path: ../../tests/system/HTTP/ResponseTest.php
-
message: '#^Parameter \#4 \$scheme of class CodeIgniter\\HTTP\\SiteURI constructor expects ''http''\|''https''\|null, '''' given\.$#'
count: 1
path: ../../tests/system/HTTP/SiteURITest.php
-
message: '#^Parameter \#2 \$value of function form_hidden expects array\|string, null given\.$#'
count: 1
path: ../../tests/system/Helpers/FormHelperTest.php
-
message: '#^Parameter \#1 \$num of function number_to_size expects int\|string, float given\.$#'
count: 1
path: ../../tests/system/Helpers/NumberHelperTest.php
-
message: '#^Parameter \#1 \$request of method CodeIgniter\\CodeIgniter\:\:setRequest\(\) expects CodeIgniter\\HTTP\\CLIRequest\|CodeIgniter\\HTTP\\IncomingRequest, CodeIgniter\\HTTP\\Request given\.$#'
count: 1
path: ../../tests/system/HomeTest.php
-
message: '#^Parameter \#1 \$config of class CodeIgniter\\Filters\\Filters constructor expects Config\\Filters, object\{aliases\: array\<string, string\>, globals\: array\<string, list\<string\>\>\}&stdClass given\.$#'
count: 2
path: ../../tests/system/Honeypot/HoneypotTest.php
-
message: '#^Parameter \#1 \$data of method CodeIgniter\\HTTP\\Message\:\:setBody\(\) expects string, null given\.$#'
count: 1
path: ../../tests/system/Honeypot/HoneypotTest.php
-
message: '#^Parameter \#1 \$image of function imagecolorat expects GdImage, resource given\.$#'
count: 2
path: ../../tests/system/Images/GDHandlerTest.php
-
message: '#^Parameter \#1 \$image of function imagecolorsforindex expects GdImage, resource given\.$#'
count: 2
path: ../../tests/system/Images/GDHandlerTest.php
-
message: '#^Parameter \#1 \$filename of function file_get_contents expects string, resource given\.$#'
count: 2
path: ../../tests/system/Images/ImageMagickHandlerTest.php
-
message: '#^Parameter \#2 \$message of method CodeIgniter\\Log\\Handlers\\ChromeLoggerHandler\:\:handle\(\) expects string, stdClass given\.$#'
count: 1
path: ../../tests/system/Log/Handlers/ChromeLoggerHandlerTest.php
-
message: '#^Parameter \#1 \$config of class CodeIgniter\\Log\\Logger constructor expects Config\\Logger, CodeIgniter\\Test\\Mock\\MockLogger given\.$#'
count: 24
path: ../../tests/system/Log/LoggerTest.php
-
message: '#^Parameter \#1 \$level of method CodeIgniter\\Log\\Logger\:\:log\(\) expects string, int given\.$#'
count: 2
path: ../../tests/system/Log/LoggerTest.php
-
message: '#^Parameter \#2 \$message of method CodeIgniter\\Log\\Logger\:\:log\(\) expects string\|Stringable, CodeIgniter\\Test\\Mock\\MockLogger given\.$#'
count: 1
path: ../../tests/system/Log/LoggerTest.php
-
message: '#^Parameter \#1 \$row of method CodeIgniter\\BaseModel\:\:save\(\) expects array\<int\|string, bool\|float\|int\|object\|string\|null\>\|object, array\<string, array\<int, string\>\> given\.$#'
count: 1
path: ../../tests/system/Models/DataConverterModelTest.php
-
message: '#^Parameter \#1 \$row of method CodeIgniter\\Model\:\:insert\(\) expects array\<int\|string, bool\|float\|int\|object\|string\|null\>\|object\|null, array\<string, list\<string\>\|string\> given\.$#'
count: 3
path: ../../tests/system/Models/DataConverterModelTest.php
-
message: '#^Parameter \#2 \$row of method CodeIgniter\\Model\:\:update\(\) expects array\<int\|string, bool\|float\|int\|object\|string\|null\>\|object\|null, array\<string, array\<int, string\>\> given\.$#'
count: 1
path: ../../tests/system/Models/DataConverterModelTest.php
-
message: '#^Parameter \#1 \$id of method CodeIgniter\\Model\:\:update\(\) expects array\|int\|string\|null, false\|null given\.$#'
count: 1
path: ../../tests/system/Models/UpdateModelTest.php
-
message: '#^Parameter \#1 \$row of method CodeIgniter\\BaseModel\:\:save\(\) expects array\<int\|string, bool\|float\|int\|object\|string\|null\>\|object, list\<array\>\|null given\.$#'
count: 1
path: ../../tests/system/Models/UpdateModelTest.php
-
message: '#^Parameter \#1 \$format of method CodeIgniter\\RESTful\\ResourceController\:\:setFormat\(\) expects ''json''\|''xml'', ''Nonsense'' given\.$#'
count: 1
path: ../../tests/system/RESTful/ResourceControllerTest.php
-
message: '#^Parameter \#1 \$config of class CodeIgniter\\Test\\Mock\\MockSecurity constructor expects Config\\Security, CodeIgniter\\Config\\BaseConfig\|null given\.$#'
count: 1
path: ../../tests/system/Security/SecurityCSRFSessionRandomizeTokenTest.php
-
message: '#^Parameter \#1 \$config of class CodeIgniter\\Log\\Logger constructor expects Config\\Logger, CodeIgniter\\Test\\Mock\\MockLogger given\.$#'
count: 15
path: ../../tests/system/Test/ControllerTestTraitTest.php
-
message: '#^Parameter \#1 \$request of method CodeIgniter\\CodeIgniter\:\:setRequest\(\) expects CodeIgniter\\HTTP\\CLIRequest\|CodeIgniter\\HTTP\\IncomingRequest, CodeIgniter\\HTTP\\Request given\.$#'
count: 1
path: ../../tests/system/Test/FeatureTestAutoRoutingImprovedTest.php
-
message: '#^Parameter \#1 \$request of method CodeIgniter\\CodeIgniter\:\:setRequest\(\) expects CodeIgniter\\HTTP\\CLIRequest\|CodeIgniter\\HTTP\\IncomingRequest, CodeIgniter\\HTTP\\Request given\.$#'
count: 1
path: ../../tests/system/Test/FeatureTestTraitTest.php
-
message: '#^Parameter \#1 \$body of method CodeIgniter\\HTTP\\Response\:\:setJSON\(\) expects array\|object\|string, false given\.$#'
count: 1
path: ../../tests/system/Test/TestResponseTest.php
-
message: '#^Parameter \#1 \$body of method CodeIgniter\\HTTP\\Response\:\:setJSON\(\) expects array\|object\|string, true given\.$#'
count: 1
path: ../../tests/system/Test/TestResponseTest.php
-
message: '#^Parameter \#1 \$config of class CodeIgniter\\Validation\\Validation constructor expects Config\\Validation, stdClass given\.$#'
count: 1
path: ../../tests/system/Validation/CreditCardRulesTest.php
-
message: '#^Parameter \#1 \$config of class CodeIgniter\\Validation\\Validation constructor expects Config\\Validation, stdClass given\.$#'
count: 1
path: ../../tests/system/Validation/FileRulesTest.php
-
message: '#^Parameter \#1 \$config of class CodeIgniter\\Validation\\Validation constructor expects Config\\Validation, stdClass given\.$#'
count: 1
path: ../../tests/system/Validation/FormatRulesTest.php
-
message: '#^Parameter \#1 \$config of class CodeIgniter\\Validation\\Validation constructor expects Config\\Validation, stdClass given\.$#'
count: 1
path: ../../tests/system/Validation/RulesTest.php
-
message: '#^Parameter \#1 \$config of class CodeIgniter\\Validation\\Validation constructor expects Config\\Validation, stdClass given\.$#'
count: 1
path: ../../tests/system/Validation/StrictRules/CreditCardRulesTest.php
-
message: '#^Parameter \#1 \$config of class CodeIgniter\\Validation\\Validation constructor expects Config\\Validation, stdClass given\.$#'
count: 1
path: ../../tests/system/Validation/StrictRules/DatabaseRelatedRulesTest.php
-
message: '#^Parameter \#1 \$config of class CodeIgniter\\Validation\\Validation constructor expects Config\\Validation, stdClass given\.$#'
count: 1
path: ../../tests/system/Validation/StrictRules/FileRulesTest.php
-
message: '#^Parameter \#1 \$config of class CodeIgniter\\Validation\\Validation constructor expects Config\\Validation, stdClass given\.$#'
count: 3
path: ../../tests/system/Validation/ValidationTest.php
-
message: '#^Parameter \#3 \$errors of method CodeIgniter\\Validation\\Validation\:\:check\(\) expects list\<string\>, array\{is_numeric\: ''Nope\. Not a number\.''\} given\.$#'
count: 1
path: ../../tests/system/Validation/ValidationTest.php
-
message: '#^Parameter \#2 \$context of method CodeIgniter\\View\\Parser\:\:setData\(\) expects ''attr''\|''css''\|''html''\|''js''\|''raw''\|''url''\|null, ''unknown'' given\.$#'
count: 3
path: ../../tests/system/View/ParserTest.php
-
message: '#^Parameter \#1 \$array of method CodeIgniter\\View\\Table\:\:makeColumns\(\) expects list\<string\>, ''invalid_junk'' given\.$#'
count: 1
path: ../../tests/system/View/TableTest.php
-
message: '#^Parameter \#1 \$connID of class CodeIgniter\\View\\DBResultDummy constructor expects mysqli, null given\.$#'
count: 2
path: ../../tests/system/View/TableTest.php
-
message: '#^Parameter \#2 \$columnLimit of method CodeIgniter\\View\\Table\:\:makeColumns\(\) expects int, string given\.$#'
count: 1
path: ../../tests/system/View/TableTest.php
-
message: '#^Parameter \#2 \$resultID of class CodeIgniter\\View\\DBResultDummy constructor expects mysqli_result, null given\.$#'
count: 2
path: ../../tests/system/View/TableTest.php

View File

@ -0,0 +1,103 @@
# total 20 errors
parameters:
ignoreErrors:
-
message: '#^Property CodeIgniter\\Controller\:\:\$request \(CodeIgniter\\HTTP\\CLIRequest\|CodeIgniter\\HTTP\\IncomingRequest\) does not accept CodeIgniter\\HTTP\\RequestInterface\.$#'
count: 1
path: ../../system/Controller.php
-
message: '#^Property class@anonymous/tests/system/API/ResponseTraitTest\.php\:639\:\:\$format \(''html''\|''json''\|''xml''\|null\) does not accept ''txt''\.$#'
count: 1
path: ../../tests/system/API/ResponseTraitTest.php
-
message: '#^Property CodeIgniter\\Commands\\Utilities\\Routes\\FilterFinderTest\:\:\$response \(CodeIgniter\\HTTP\\Response\) does not accept CodeIgniter\\HTTP\\ResponseInterface\.$#'
count: 1
path: ../../tests/system/Commands/Utilities/Routes/FilterFinderTest.php
-
message: '#^Property CodeIgniter\\Database\\Live\\SQLite3\\AlterTableTest\:\:\$forge \(CodeIgniter\\Database\\SQLite3\\Forge\) does not accept CodeIgniter\\Database\\Forge\.$#'
count: 1
path: ../../tests/system/Database/Live/SQLite3/AlterTableTest.php
-
message: '#^Property CodeIgniter\\Database\\Live\\SQLite3\\GetIndexDataTest\:\:\$db \(CodeIgniter\\Database\\SQLite3\\Connection\) does not accept CodeIgniter\\Database\\BaseConnection\.$#'
count: 2
path: ../../tests/system/Database/Live/SQLite3/GetIndexDataTest.php
-
message: '#^Property CodeIgniter\\Database\\Live\\SQLite3\\GetIndexDataTest\:\:\$forge \(CodeIgniter\\Database\\SQLite3\\Forge\) does not accept CodeIgniter\\Database\\Forge\.$#'
count: 1
path: ../../tests/system/Database/Live/SQLite3/GetIndexDataTest.php
-
message: '#^Property CodeIgniter\\Filters\\CSRFTest\:\:\$response \(CodeIgniter\\HTTP\\Response\|null\) does not accept CodeIgniter\\HTTP\\ResponseInterface\.$#'
count: 2
path: ../../tests/system/Filters/CSRFTest.php
-
message: '#^Property CodeIgniter\\Filters\\DebugToolbarTest\:\:\$response \(CodeIgniter\\HTTP\\Response\) does not accept CodeIgniter\\HTTP\\ResponseInterface\.$#'
count: 1
path: ../../tests/system/Filters/DebugToolbarTest.php
-
message: '#^Property CodeIgniter\\Filters\\FiltersTest\:\:\$response \(CodeIgniter\\HTTP\\Response\) does not accept CodeIgniter\\HTTP\\ResponseInterface\.$#'
count: 1
path: ../../tests/system/Filters/FiltersTest.php
-
message: '#^Property CodeIgniter\\Filters\\HoneypotTest\:\:\$response \(CodeIgniter\\HTTP\\Response\|null\) does not accept CodeIgniter\\HTTP\\RequestInterface\|CodeIgniter\\HTTP\\ResponseInterface\|string\|null\.$#'
count: 2
path: ../../tests/system/Filters/HoneypotTest.php
-
message: '#^Property CodeIgniter\\Filters\\HoneypotTest\:\:\$response \(CodeIgniter\\HTTP\\Response\|null\) does not accept CodeIgniter\\HTTP\\ResponseInterface\.$#'
count: 4
path: ../../tests/system/Filters/HoneypotTest.php
-
message: '#^Property Config\\App\:\:\$proxyIPs \(array\<string, string\>\) does not accept array\<int, string\>\.$#'
count: 1
path: ../../tests/system/HTTP/IncomingRequestTest.php
-
message: '#^Property Config\\App\:\:\$proxyIPs \(array\<string, string\>\) does not accept string\.$#'
count: 1
path: ../../tests/system/HTTP/IncomingRequestTest.php
-
message: '#^Property CodeIgniter\\Helpers\\CookieHelperTest\:\:\$response \(CodeIgniter\\HTTP\\Response\) does not accept CodeIgniter\\HTTP\\ResponseInterface\.$#'
count: 1
path: ../../tests/system/Helpers/CookieHelperTest.php
-
message: '#^Property CodeIgniter\\Honeypot\\HoneypotTest\:\:\$response \(CodeIgniter\\HTTP\\Response\) does not accept CodeIgniter\\HTTP\\RequestInterface\|CodeIgniter\\HTTP\\ResponseInterface\|string\|null\.$#'
count: 1
path: ../../tests/system/Honeypot/HoneypotTest.php
-
message: '#^Property CodeIgniter\\Honeypot\\HoneypotTest\:\:\$response \(CodeIgniter\\HTTP\\Response\) does not accept CodeIgniter\\HTTP\\ResponseInterface\.$#'
count: 3
path: ../../tests/system/Honeypot/HoneypotTest.php
-
message: '#^Property Config\\Cookie\:\:\$samesite \(''''\|''Lax''\|''None''\|''Strict''\) does not accept ''Invalid''\.$#'
count: 1
path: ../../tests/system/Session/SessionTest.php
-
message: '#^Property CodeIgniter\\Test\\ControllerTestTraitTest\:\:\$uri \(string\) does not accept CodeIgniter\\HTTP\\SiteURI\.$#'
count: 2
path: ../../tests/system/Test/ControllerTestTraitTest.php
-
message: '#^Property CodeIgniter\\View\\ParserPluginTest\:\:\$validator \(CodeIgniter\\Validation\\Validation\) does not accept CodeIgniter\\Validation\\ValidationInterface\.$#'
count: 1
path: ../../tests/system/View/ParserPluginTest.php
-
message: '#^Property CodeIgniter\\View\\Table\:\:\$function \(\(callable\(\)\: mixed\)\|null\) does not accept ''ticklemyfancy''\.$#'
count: 1
path: ../../tests/system/View/TableTest.php

View File

@ -0,0 +1,63 @@
# total 12 errors
parameters:
ignoreErrors:
-
message: '#^Only booleans are allowed in &&, array\|int\|string\|null given on the left side\.$#'
count: 1
path: ../../system/BaseModel.php
-
message: '#^Only booleans are allowed in &&, array\|string\|null given on the left side\.$#'
count: 1
path: ../../system/CLI/CLI.php
-
message: '#^Only booleans are allowed in &&, string given on the left side\.$#'
count: 1
path: ../../system/Cache/Handlers/BaseHandler.php
-
message: '#^Only booleans are allowed in &&, int given on the left side\.$#'
count: 1
path: ../../system/Commands/Server/Serve.php
-
message: '#^Only booleans are allowed in &&, string\|null given on the left side\.$#'
count: 3
path: ../../system/Common.php
-
message: '#^Only booleans are allowed in &&, string given on the left side\.$#'
count: 1
path: ../../system/Database/Forge.php
-
message: '#^Only booleans are allowed in &&, int given on the left side\.$#'
count: 1
path: ../../system/Database/MySQLi/Connection.php
-
message: '#^Only booleans are allowed in &&, int given on the left side\.$#'
count: 1
path: ../../system/Email/Email.php
-
message: '#^Only booleans are allowed in &&, string\|null given on the left side\.$#'
count: 1
path: ../../system/HTTP/Response.php
-
message: '#^Only booleans are allowed in &&, array given on the left side\.$#'
count: 1
path: ../../system/Model.php
-
message: '#^Only booleans are allowed in &&, string\|null given on the left side\.$#'
count: 1
path: ../../system/Model.php
-
message: '#^Only booleans are allowed in &&, array\<int\|string, array\|\(callable\)\> given on the left side\.$#'
count: 1
path: ../../system/Router/RouteCollection.php

View File

@ -0,0 +1,8 @@
# total 1 error
parameters:
ignoreErrors:
-
message: '#^Right side of && is always true\.$#'
count: 1
path: ../../system/Helpers/filesystem_helper.php

View File

@ -0,0 +1,43 @@
# total 8 errors
parameters:
ignoreErrors:
-
message: '#^Only booleans are allowed in &&, array\<string, string\> given on the right side\.$#'
count: 1
path: ../../system/BaseModel.php
-
message: '#^Only booleans are allowed in &&, list\<string\> given on the right side\.$#'
count: 1
path: ../../system/CLI/CLI.php
-
message: '#^Only booleans are allowed in &&, int\<0, max\> given on the right side\.$#'
count: 1
path: ../../system/Database/MigrationRunner.php
-
message: '#^Only booleans are allowed in &&, string given on the right side\.$#'
count: 1
path: ../../system/Email/Email.php
-
message: '#^Only booleans are allowed in &&, array\<mixed, mixed\> given on the right side\.$#'
count: 2
path: ../../system/HTTP/Files/FileCollection.php
-
message: '#^Only booleans are allowed in &&, string\|null given on the right side\.$#'
count: 1
path: ../../system/HTTP/Response.php
-
message: '#^Only booleans are allowed in &&, array\<string, string\> given on the right side\.$#'
count: 4
path: ../../system/HTTP/UserAgent.php
-
message: '#^Only booleans are allowed in &&, string given on the right side\.$#'
count: 2
path: ../../system/Model.php

View File

@ -0,0 +1,68 @@
# total 13 errors
parameters:
ignoreErrors:
-
message: '#^Only booleans are allowed in a negated boolean, mixed given\.$#'
count: 1
path: ../../system/Cache/Handlers/PredisHandler.php
-
message: '#^Only booleans are allowed in a negated boolean, TWhenNot given\.$#'
count: 1
path: ../../system/Database/BaseBuilder.php
-
message: '#^Only booleans are allowed in a negated boolean, array given\.$#'
count: 1
path: ../../system/Database/MySQLi/Connection.php
-
message: '#^Only booleans are allowed in a negated boolean, string given\.$#'
count: 1
path: ../../system/Database/SQLite3/Connection.php
-
message: '#^Only booleans are allowed in a negated boolean, array\<string, array\<string, list\<string\>\>\> given\.$#'
count: 1
path: ../../system/Filters/Filters.php
-
message: '#^Only booleans are allowed in a negated boolean, int\<0, max\> given\.$#'
count: 1
path: ../../system/Helpers/form_helper.php
-
message: '#^Only booleans are allowed in a negated boolean, CodeIgniter\\CodeIgniter given\.$#'
count: 1
path: ../../system/Test/CIUnitTestCase.php
-
message: '#^Only booleans are allowed in a negated boolean, array\|null given\.$#'
count: 6
path: ../../system/Validation/FileRules.php
-
message: '#^Only booleans are allowed in a negated boolean, mixed given\.$#'
count: 1
path: ../../tests/system/Email/EmailTest.php
-
message: '#^Only booleans are allowed in a negated boolean, CodeIgniter\\Router\\RouteCollection\|null given\.$#'
count: 1
path: ../../tests/system/HomeTest.php
-
message: '#^Only booleans are allowed in a negated boolean, mixed given\.$#'
count: 2
path: ../../tests/system/Models/FindModelTest.php
-
message: '#^Only booleans are allowed in a negated boolean, CodeIgniter\\Router\\RouteCollection\|null given\.$#'
count: 1
path: ../../tests/system/Test/FeatureTestAutoRoutingImprovedTest.php
-
message: '#^Only booleans are allowed in a negated boolean, CodeIgniter\\Router\\RouteCollection\|null given\.$#'
count: 1
path: ../../tests/system/Test/FeatureTestTraitTest.php

View File

@ -0,0 +1,13 @@
# total 2 errors
parameters:
ignoreErrors:
-
message: '#^Only booleans are allowed in \|\|, string given on the left side\.$#'
count: 1
path: ../../system/CLI/CLI.php
-
message: '#^Only booleans are allowed in \|\|, string\|null given on the left side\.$#'
count: 2
path: ../../system/CLI/CLI.php

View File

@ -0,0 +1,18 @@
# total 3 errors
parameters:
ignoreErrors:
-
message: '#^Only booleans are allowed in \|\|, string\|null given on the right side\.$#'
count: 3
path: ../../system/CLI/CLI.php
-
message: '#^Only booleans are allowed in \|\|, int given on the right side\.$#'
count: 1
path: ../../system/HotReloader/HotReloader.php
-
message: '#^Only booleans are allowed in \|\|, mixed given on the right side\.$#'
count: 1
path: ../../tests/system/Models/FindModelTest.php

View File

@ -0,0 +1,13 @@
# total 2 errors
parameters:
ignoreErrors:
-
message: '#^Class CodeIgniter\\UnexsistenceClass not found\.$#'
count: 1
path: ../../tests/system/CommonFunctionsTest.php
-
message: '#^Class App\\Controllers\\NeverHeardOfIt not found\.$#'
count: 1
path: ../../tests/system/Test/ControllerTestTraitTest.php

View File

@ -0,0 +1,33 @@
# total 6 errors
parameters:
ignoreErrors:
-
message: '#^Calling new DummyHandler\(\) directly is incomplete to get the cache instance\.$#'
count: 1
path: ../../tests/system/Cache/Handlers/DummyHandlerTest.php
-
message: '#^Calling new BaseTestFileHandler\(\) directly is incomplete to get the cache instance\.$#'
count: 1
path: ../../tests/system/Cache/Handlers/FileHandlerTest.php
-
message: '#^Calling new FileHandler\(\) directly is incomplete to get the cache instance\.$#'
count: 5
path: ../../tests/system/Cache/Handlers/FileHandlerTest.php
-
message: '#^Calling new MemcachedHandler\(\) directly is incomplete to get the cache instance\.$#'
count: 3
path: ../../tests/system/Cache/Handlers/MemcachedHandlerTest.php
-
message: '#^Calling new PredisHandler\(\) directly is incomplete to get the cache instance\.$#'
count: 2
path: ../../tests/system/Cache/Handlers/PredisHandlerTest.php
-
message: '#^Calling new RedisHandler\(\) directly is incomplete to get the cache instance\.$#'
count: 2
path: ../../tests/system/Cache/Handlers/RedisHandlerTest.php

View File

@ -0,0 +1,23 @@
# total 4 errors
parameters:
ignoreErrors:
-
message: '#^Argument \#1 \$name \(''Config\\\\Modules''\) passed to function config does not extend CodeIgniter\\\\Config\\\\BaseConfig\.$#'
count: 1
path: ../../system/Config/Services.php
-
message: '#^Argument \#1 \$name \(''Config\\\\Modules''\) passed to function config does not extend CodeIgniter\\\\Config\\\\BaseConfig\.$#'
count: 1
path: ../../system/Events/Events.php
-
message: '#^Argument \#1 \$name \(''Config\\\\Modules''\) passed to function config does not extend CodeIgniter\\\\Config\\\\BaseConfig\.$#'
count: 1
path: ../../system/Filters/Filters.php
-
message: '#^Argument \#1 \$name \(''Modules''\) passed to function config does not extend CodeIgniter\\\\Config\\\\BaseConfig\.$#'
count: 1
path: ../../tests/system/Events/EventsTest.php

View File

@ -0,0 +1,13 @@
# total 2 errors
parameters:
ignoreErrors:
-
message: '#^Instantiating CastException using new is not allowed\. Use one of its named constructors instead\.$#'
count: 1
path: ../../tests/system/Debug/ExceptionsTest.php
-
message: '#^Instantiating FrameworkException using new is not allowed\. Use one of its named constructors instead\.$#'
count: 1
path: ../../tests/system/DebugTraceableTraitTest.php

View File

@ -0,0 +1,68 @@
# total 13 errors
parameters:
ignoreErrors:
-
message: '#^Re\-assigning arrays to \$_GET directly is discouraged\.$#'
count: 3
path: ../../tests/system/Cache/ResponseCacheTest.php
-
message: '#^Re\-assigning arrays to \$_GET directly is discouraged\.$#'
count: 3
path: ../../tests/system/CommonFunctionsTest.php
-
message: '#^Re\-assigning arrays to \$_GET directly is discouraged\.$#'
count: 2
path: ../../tests/system/Filters/InvalidCharsTest.php
-
message: '#^Re\-assigning arrays to \$_GET directly is discouraged\.$#'
count: 1
path: ../../tests/system/HTTP/CLIRequestTest.php
-
message: '#^Re\-assigning arrays to \$_GET directly is discouraged\.$#'
count: 1
path: ../../tests/system/HTTP/IncomingRequestDetectingTest.php
-
message: '#^Re\-assigning arrays to \$_GET directly is discouraged\.$#'
count: 1
path: ../../tests/system/HTTP/IncomingRequestTest.php
-
message: '#^Re\-assigning arrays to \$_GET directly is discouraged\.$#'
count: 1
path: ../../tests/system/HTTP/RedirectResponseTest.php
-
message: '#^Re\-assigning arrays to \$_GET directly is discouraged\.$#'
count: 1
path: ../../tests/system/HTTP/RequestTest.php
-
message: '#^Re\-assigning arrays to \$_GET directly is discouraged\.$#'
count: 1
path: ../../tests/system/HTTP/SiteURIFactoryDetectRoutePathTest.php
-
message: '#^Re\-assigning arrays to \$_GET directly is discouraged\.$#'
count: 1
path: ../../tests/system/HTTP/SiteURIFactoryTest.php
-
message: '#^Re\-assigning arrays to \$_GET directly is discouraged\.$#'
count: 1
path: ../../tests/system/Log/LoggerTest.php
-
message: '#^Re\-assigning arrays to \$_GET directly is discouraged\.$#'
count: 1
path: ../../tests/system/Models/PaginateModelTest.php
-
message: '#^Re\-assigning arrays to \$_GET directly is discouraged\.$#'
count: 5
path: ../../tests/system/Pager/PagerTest.php

View File

@ -0,0 +1,13 @@
# total 2 errors
parameters:
ignoreErrors:
-
message: '#^Argument \#1 \$name \(class\-string\) passed to function model does not extend CodeIgniter\\\\Model\.$#'
count: 1
path: ../../system/RESTful/BaseResource.php
-
message: '#^Argument \#1 \$name \(''CodeIgniter\\\\UnexsistenceClass''\) passed to function model does not extend CodeIgniter\\\\Model\.$#'
count: 1
path: ../../tests/system/CommonFunctionsTest.php

View File

@ -0,0 +1,18 @@
# total 3 errors
parameters:
ignoreErrors:
-
message: '#^Parameter \#1 \$name of function model expects a valid class string, string given\.$#'
count: 1
path: ../../system/Test/Fabricator.php
-
message: '#^Parameter \#1 \$name of function model expects a valid class string, ''JobModel'' given\.$#'
count: 1
path: ../../tests/system/CommonFunctionsTest.php
-
message: '#^Parameter \#1 \$name of function model expects a valid class string, ''CodeIgniter\\\\Shield\\\\Models\\\\UserModel'' given\.$#'
count: 1
path: ../../tests/system/Config/FactoriesTest.php

View File

@ -0,0 +1,268 @@
# total 53 errors
parameters:
ignoreErrors:
-
message: '#^Accessing offset ''ANSICON'' directly on \$_SERVER is discouraged\.$#'
count: 1
path: ../../system/CLI/CLI.php
-
message: '#^Accessing offset ''NO_COLOR'' directly on \$_SERVER is discouraged\.$#'
count: 1
path: ../../system/CLI/CLI.php
-
message: '#^Accessing offset ''argv'' directly on \$_SERVER is discouraged\.$#'
count: 1
path: ../../system/CLI/CLI.php
-
message: '#^Accessing offset ''encryption\.key'' directly on \$_SERVER is discouraged\.$#'
count: 1
path: ../../system/Commands/Encryption/GenerateKey.php
-
message: '#^Accessing offset ''CI_ENVIRONMENT'' directly on \$_SERVER is discouraged\.$#'
count: 3
path: ../../system/Commands/Utilities/Environment.php
-
message: '#^Accessing offset ''HTTP_HOST'' directly on \$_SERVER is discouraged\.$#'
count: 1
path: ../../system/Commands/Utilities/Routes.php
-
message: '#^Accessing offset ''REMOTE_ADDR'' directly on \$_SERVER is discouraged\.$#'
count: 1
path: ../../system/Common.php
-
message: '#^Accessing offset ''REQUEST_METHOD'' directly on \$_SERVER is discouraged\.$#'
count: 1
path: ../../system/Common.php
-
message: '#^Accessing offset string directly on \$_SERVER is discouraged\.$#'
count: 1
path: ../../system/Common.php
-
message: '#^Accessing offset ''CI_ENVIRONMENT'' directly on \$_SERVER is discouraged\.$#'
count: 2
path: ../../system/Config/AutoloadConfig.php
-
message: '#^Accessing offset non\-falsy\-string directly on \$_SERVER is discouraged\.$#'
count: 4
path: ../../system/Config/BaseConfig.php
-
message: '#^Accessing offset string directly on \$_SERVER is discouraged\.$#'
count: 2
path: ../../system/Config/DotEnv.php
-
message: '#^Accessing offset ''SERVER_PROTOCOL'' directly on \$_SERVER is discouraged\.$#'
count: 1
path: ../../system/Config/Services.php
-
message: '#^Accessing offset ''SERVER_ADDR'' directly on \$_SERVER is discouraged\.$#'
count: 2
path: ../../system/Email/Email.php
-
message: '#^Accessing offset ''SERVER_NAME'' directly on \$_SERVER is discouraged\.$#'
count: 2
path: ../../system/Email/Email.php
-
message: '#^Accessing offset ''HTTP_USER_AGENT'' directly on \$_SERVER is discouraged\.$#'
count: 2
path: ../../system/HTTP/DownloadResponse.php
-
message: '#^Accessing offset ''HTTPS'' directly on \$_SERVER is discouraged\.$#'
count: 2
path: ../../system/HTTP/IncomingRequest.php
-
message: '#^Accessing offset ''QUERY_STRING'' directly on \$_SERVER is discouraged\.$#'
count: 3
path: ../../system/HTTP/IncomingRequest.php
-
message: '#^Accessing offset ''REQUEST_URI'' directly on \$_SERVER is discouraged\.$#'
count: 2
path: ../../system/HTTP/IncomingRequest.php
-
message: '#^Accessing offset ''SCRIPT_NAME'' directly on \$_SERVER is discouraged\.$#'
count: 4
path: ../../system/HTTP/IncomingRequest.php
-
message: '#^Accessing offset array\|string directly on \$_GET is discouraged\.$#'
count: 2
path: ../../system/HTTP/IncomingRequest.php
-
message: '#^Accessing offset ''CONTENT_TYPE'' directly on \$_SERVER is discouraged\.$#'
count: 1
path: ../../system/HTTP/Message.php
-
message: '#^Accessing offset \(int\|string\) directly on \$_SERVER is discouraged\.$#'
count: 1
path: ../../system/HTTP/Message.php
-
message: '#^Accessing offset ''REQUEST_METHOD'' directly on \$_SERVER is discouraged\.$#'
count: 3
path: ../../system/HTTP/Response.php
-
message: '#^Accessing offset ''SERVER_PROTOCOL'' directly on \$_SERVER is discouraged\.$#'
count: 1
path: ../../system/HTTP/Response.php
-
message: '#^Accessing offset ''SERVER_SOFTWARE'' directly on \$_SERVER is discouraged\.$#'
count: 2
path: ../../system/HTTP/Response.php
-
message: '#^Accessing offset ''HTTP_REFERER'' directly on \$_SERVER is discouraged\.$#'
count: 4
path: ../../system/HTTP/UserAgent.php
-
message: '#^Accessing offset ''HTTP_USER_AGENT'' directly on \$_SERVER is discouraged\.$#'
count: 2
path: ../../system/HTTP/UserAgent.php
-
message: '#^Accessing offset mixed directly on \$_GET is discouraged\.$#'
count: 1
path: ../../system/Pager/Pager.php
-
message: '#^Accessing offset ''REQUEST_METHOD'' directly on \$_SERVER is discouraged\.$#'
count: 1
path: ../../system/Router/Router.php
-
message: '#^Accessing offset ''HTTP_X_REQUESTED_WITH'' directly on \$_SERVER is discouraged\.$#'
count: 2
path: ../../system/Session/Session.php
-
message: '#^Accessing offset ''app\.baseURL'' directly on \$_SERVER is discouraged\.$#'
count: 1
path: ../../tests/system/CLI/ConsoleTest.php
-
message: '#^Accessing offset ''argv'' directly on \$_SERVER is discouraged\.$#'
count: 1
path: ../../tests/system/CLI/ConsoleTest.php
-
message: '#^Accessing offset ''encryption\.key'' directly on \$_SERVER is discouraged\.$#'
count: 1
path: ../../tests/system/Commands/GenerateKeyTest.php
-
message: '#^Accessing offset ''foo'' directly on \$_SERVER is discouraged\.$#'
count: 1
path: ../../tests/system/CommonFunctionsSendTest.php
-
message: '#^Accessing offset ''foo'' directly on \$_SERVER is discouraged\.$#'
count: 1
path: ../../tests/system/CommonFunctionsTest.php
-
message: '#^Accessing offset ''BAR'' directly on \$_SERVER is discouraged\.$#'
count: 1
path: ../../tests/system/Config/DotEnvTest.php
-
message: '#^Accessing offset ''FOO'' directly on \$_SERVER is discouraged\.$#'
count: 1
path: ../../tests/system/Config/DotEnvTest.php
-
message: '#^Accessing offset ''NULL'' directly on \$_SERVER is discouraged\.$#'
count: 1
path: ../../tests/system/Config/DotEnvTest.php
-
message: '#^Accessing offset ''SPACED'' directly on \$_SERVER is discouraged\.$#'
count: 1
path: ../../tests/system/Config/DotEnvTest.php
-
message: '#^Accessing offset ''SimpleConfig_simple_name'' directly on \$_SERVER is discouraged\.$#'
count: 1
path: ../../tests/system/Config/DotEnvTest.php
-
message: '#^Accessing offset ''CODEIGNITER_SCREAM_DEPRECATIONS'' directly on \$_SERVER is discouraged\.$#'
count: 1
path: ../../tests/system/Debug/ExceptionsTest.php
-
message: '#^Accessing offset ''encryption\.key'' directly on \$_SERVER is discouraged\.$#'
count: 1
path: ../../tests/system/Encryption/EncryptionTest.php
-
message: '#^Accessing offset ''HTTP_USER_AGENT'' directly on \$_SERVER is discouraged\.$#'
count: 2
path: ../../tests/system/HTTP/DownloadResponseTest.php
-
message: '#^Accessing offset ''SERVER_SOFTWARE'' directly on \$_SERVER is discouraged\.$#'
count: 1
path: ../../tests/system/HTTP/ResponseTest.php
-
message: '#^Accessing offset ''QUERY_STRING'' directly on \$_SERVER is discouraged\.$#'
count: 1
path: ../../tests/system/HTTP/SiteURIFactoryDetectRoutePathTest.php
-
message: '#^Accessing offset ''HTTP_REFERER'' directly on \$_SERVER is discouraged\.$#'
count: 1
path: ../../tests/system/HTTP/UserAgentTest.php
-
message: '#^Accessing offset ''HTTP_USER_AGENT'' directly on \$_SERVER is discouraged\.$#'
count: 2
path: ../../tests/system/HTTP/UserAgentTest.php
-
message: '#^Accessing offset ''HTTP_HOST'' directly on \$_SERVER is discouraged\.$#'
count: 1
path: ../../tests/system/Helpers/URLHelper/SiteUrlTest.php
-
message: '#^Accessing offset ''REQUEST_URI'' directly on \$_SERVER is discouraged\.$#'
count: 1
path: ../../tests/system/Helpers/URLHelper/SiteUrlTest.php
-
message: '#^Accessing offset ''page'' directly on \$_GET is discouraged\.$#'
count: 1
path: ../../tests/system/Pager/PagerTest.php
-
message: '#^Accessing offset ''page_foo'' directly on \$_GET is discouraged\.$#'
count: 2
path: ../../tests/system/Pager/PagerTest.php
-
message: '#^Accessing offset ''CONTENT_TYPE'' directly on \$_SERVER is discouraged\.$#'
count: 2
path: ../../tests/system/Validation/ValidationTest.php

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,33 @@
# total 6 errors
parameters:
ignoreErrors:
-
message: '#^Call to unknown service method ''bar''\.$#'
count: 1
path: ../../tests/system/CommonSingleServiceTest.php
-
message: '#^Call to unknown service method ''baz''\.$#'
count: 1
path: ../../tests/system/CommonSingleServiceTest.php
-
message: '#^Call to unknown service method ''caches''\.$#'
count: 1
path: ../../tests/system/CommonSingleServiceTest.php
-
message: '#^Call to unknown service method ''foo''\.$#'
count: 1
path: ../../tests/system/CommonSingleServiceTest.php
-
message: '#^Call to unknown service method ''timers''\.$#'
count: 1
path: ../../tests/system/CommonSingleServiceTest.php
-
message: '#^Call to unknown service method string\.$#'
count: 4
path: ../../tests/system/CommonSingleServiceTest.php

View File

@ -0,0 +1,8 @@
# total 1 error
parameters:
ignoreErrors:
-
message: '#^Unreachable statement \- code above always terminates\.$#'
count: 1
path: ../../tests/system/Models/UpdateModelTest.php

View File

@ -0,0 +1,8 @@
# total 1 error
parameters:
ignoreErrors:
-
message: '#^Only booleans are allowed in an elseif condition, \(callable\)\|null given\.$#'
count: 2
path: ../../system/Database/BaseBuilder.php

View File

@ -0,0 +1,388 @@
# total 77 errors
parameters:
ignoreErrors:
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 1
path: ../../system/Cache/Handlers/FileHandler.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 1
path: ../../system/Commands/Database/CreateDatabase.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 1
path: ../../system/Commands/Database/MigrateStatus.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 1
path: ../../system/Commands/Database/Seed.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 2
path: ../../system/Config/BaseService.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 2
path: ../../system/Config/DotEnv.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 1
path: ../../system/Config/Services.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 29
path: ../../system/Database/BaseBuilder.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 13
path: ../../system/Database/BaseConnection.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 3
path: ../../system/Database/BasePreparedQuery.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 2
path: ../../system/Database/BaseResult.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 4
path: ../../system/Database/BaseUtils.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 2
path: ../../system/Database/Database.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 12
path: ../../system/Database/Forge.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 5
path: ../../system/Database/MigrationRunner.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 11
path: ../../system/Database/MySQLi/Connection.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 4
path: ../../system/Database/MySQLi/Forge.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 1
path: ../../system/Database/MySQLi/Result.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 3
path: ../../system/Database/OCI8/Builder.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 2
path: ../../system/Database/OCI8/Connection.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 3
path: ../../system/Database/OCI8/Forge.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 7
path: ../../system/Database/Postgre/Builder.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 2
path: ../../system/Database/Postgre/Connection.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 4
path: ../../system/Database/Postgre/Forge.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 1
path: ../../system/Database/Postgre/Result.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 3
path: ../../system/Database/Query.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 9
path: ../../system/Database/SQLSRV/Builder.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 6
path: ../../system/Database/SQLSRV/Connection.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 5
path: ../../system/Database/SQLSRV/Forge.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 1
path: ../../system/Database/SQLSRV/Result.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 2
path: ../../system/Database/SQLite3/Builder.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 1
path: ../../system/Database/SQLite3/Connection.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 2
path: ../../system/Database/SQLite3/Forge.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 2
path: ../../system/Database/SQLite3/Table.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 5
path: ../../system/Debug/Timer.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 2
path: ../../system/Debug/Toolbar.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 2
path: ../../system/Debug/Toolbar/Collectors/Logs.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 12
path: ../../system/Email/Email.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 2
path: ../../system/Encryption/Encryption.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 2
path: ../../system/Encryption/Handlers/OpenSSLHandler.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 2
path: ../../system/Encryption/Handlers/SodiumHandler.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 1
path: ../../system/Entity/Entity.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 1
path: ../../system/Files/File.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 1
path: ../../system/Filters/Filters.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 10
path: ../../system/HTTP/CURLRequest.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 6
path: ../../system/HTTP/ContentSecurityPolicy.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 2
path: ../../system/HTTP/IncomingRequest.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 2
path: ../../system/HTTP/Message.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 3
path: ../../system/HTTP/Request.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 2
path: ../../system/HTTP/Response.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 4
path: ../../system/HTTP/SiteURI.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 10
path: ../../system/HTTP/URI.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 2
path: ../../system/HTTP/UserAgent.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 1
path: ../../system/Helpers/form_helper.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 2
path: ../../system/Helpers/test_helper.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 1
path: ../../system/Helpers/url_helper.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 1
path: ../../system/Honeypot/Honeypot.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 3
path: ../../system/Images/Handlers/BaseHandler.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 8
path: ../../system/Images/Handlers/ImageMagickHandler.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 1
path: ../../system/Images/Image.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 2
path: ../../system/Log/Handlers/FileHandler.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 1
path: ../../system/Pager/Pager.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 4
path: ../../system/RESTful/BaseResource.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 6
path: ../../system/Router/RouteCollection.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 2
path: ../../system/Router/Router.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 2
path: ../../system/Session/Handlers/DatabaseHandler.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 1
path: ../../system/Session/Handlers/FileHandler.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 1
path: ../../system/Session/Handlers/MemcachedHandler.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 2
path: ../../system/Session/Handlers/RedisHandler.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 4
path: ../../system/Validation/Rules.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 1
path: ../../system/View/Filters.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 1
path: ../../tests/system/HomeTest.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 1
path: ../../tests/system/Session/SessionTest.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 4
path: ../../tests/system/Test/ControllerTestTraitTest.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 1
path: ../../tests/system/Test/FeatureTestAutoRoutingImprovedTest.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 1
path: ../../tests/system/Test/FeatureTestTraitTest.php
-
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
count: 1
path: ../../tests/system/Test/FilterTestTraitTest.php

View File

@ -0,0 +1,33 @@
# total 6 errors
parameters:
ignoreErrors:
-
message: '#^Property CodeIgniter\\Database\\BaseBuilder\:\:\$db \(CodeIgniter\\Database\\BaseConnection\) in empty\(\) is not falsy\.$#'
count: 1
path: ../../system/Database/BaseBuilder.php
-
message: '#^Property CodeIgniter\\Images\\Handlers\\BaseHandler\:\:\$image \(CodeIgniter\\Images\\Image\) in empty\(\) is not falsy\.$#'
count: 1
path: ../../system/Images/Handlers/BaseHandler.php
-
message: '#^Property CodeIgniter\\Test\\ControllerTestTraitTest\:\:\$appConfig \(Config\\App\) in empty\(\) is not falsy\.$#'
count: 1
path: ../../tests/system/Test/ControllerTestTraitTest.php
-
message: '#^Property CodeIgniter\\Test\\ControllerTestTraitTest\:\:\$logger \(Psr\\Log\\LoggerInterface\) in empty\(\) is not falsy\.$#'
count: 1
path: ../../tests/system/Test/ControllerTestTraitTest.php
-
message: '#^Property CodeIgniter\\Test\\ControllerTestTraitTest\:\:\$request \(CodeIgniter\\HTTP\\IncomingRequest\) in empty\(\) is not falsy\.$#'
count: 1
path: ../../tests/system/Test/ControllerTestTraitTest.php
-
message: '#^Property CodeIgniter\\Test\\ControllerTestTraitTest\:\:\$response \(CodeIgniter\\HTTP\\ResponseInterface\) in empty\(\) is not falsy\.$#'
count: 1
path: ../../tests/system/Test/ControllerTestTraitTest.php

View File

@ -0,0 +1,13 @@
# total 2 errors
parameters:
ignoreErrors:
-
message: '#^Expression "\$cookie\[''expiry''\]" on a separate line does not do anything\.$#'
count: 1
path: ../../tests/system/Cookie/CookieTest.php
-
message: '#^Expression "\$entity\-\>ninth" on a separate line does not do anything\.$#'
count: 1
path: ../../tests/system/Entity/EntityTest.php

View File

@ -0,0 +1,18 @@
# total 3 errors
parameters:
ignoreErrors:
-
message: '#^Call to function property_exists\(\) with Config\\Cache and ''file'' will always evaluate to true\.$#'
count: 1
path: ../../system/Cache/Handlers/FileHandler.php
-
message: '#^Call to function is_array\(\) with array will always evaluate to true\.$#'
count: 1
path: ../../system/HTTP/Files/FileCollection.php
-
message: '#^Call to function is_array\(\) with non\-empty\-array will always evaluate to true\.$#'
count: 1
path: ../../system/Test/DOMParser.php

View File

@ -0,0 +1,8 @@
# total 1 error
parameters:
ignoreErrors:
-
message: '#^Inner named functions are not supported by PHPStan\. Consider refactoring to an anonymous function, class method, or a top\-level\-defined function\. See issue \#165 \(https\://github\.com/phpstan/phpstan/issues/165\) for more details\.$#'
count: 1
path: ../../tests/system/CommonHelperTest.php

View File

@ -0,0 +1,8 @@
# total 1 error
parameters:
ignoreErrors:
-
message: '#^Function foo_bar_baz not found\.$#'
count: 1
path: ../../tests/system/CommonHelperTest.php

View File

@ -0,0 +1,8 @@
# total 1 error
parameters:
ignoreErrors:
-
message: '#^Yield can be used only with these return types\: Generator, Iterator, Traversable, iterable\.$#'
count: 1
path: ../../tests/system/Database/Builder/SelectTest.php

View File

@ -0,0 +1,8 @@
# total 1 error
parameters:
ignoreErrors:
-
message: '#^Generator expects value type list\<CodeIgniter\\Database\\RawSql\|string\>\|string, array\{array\{''employee_id'', CodeIgniter\\Database\\RawSql\}, ''SELECT "employee_id…''\}\|array\{array\{0\: CodeIgniter\\Database\\RawSql, 1\: ''employee_id'', 2\?\: CodeIgniter\\Database\\RawSql\}, ''SELECT CONCAT\(first…''\|''SELECT IF\(salary \>…''\}\|array\{array\{CodeIgniter\\Database\\RawSql, CodeIgniter\\Database\\RawSql\}, ''SELECT CONCAT\(first…''\} given\.$#'
count: 1
path: ../../tests/system/Database/Builder/SelectTest.php

View File

@ -0,0 +1,8 @@
# total 1 error
parameters:
ignoreErrors:
-
message: '#^Comparison operation "\>\=" between \(array\|float\|int\) and 0 results in an error\.$#'
count: 2
path: ../../system/Images/Handlers/ImageMagickHandler.php

View File

@ -0,0 +1,88 @@
# total 17 errors
parameters:
ignoreErrors:
-
message: '#^Only booleans are allowed in an if condition, mixed given\.$#'
count: 1
path: ../../system/CLI/CLI.php
-
message: '#^Only booleans are allowed in an if condition, Config\\Routing given\.$#'
count: 1
path: ../../system/Commands/Utilities/Routes.php
-
message: '#^Only booleans are allowed in an if condition, string\|null given\.$#'
count: 3
path: ../../system/Commands/Utilities/Routes.php
-
message: '#^Only booleans are allowed in an if condition, TWhen given\.$#'
count: 1
path: ../../system/Database/BaseBuilder.php
-
message: '#^Only booleans are allowed in an if condition, string\|null given\.$#'
count: 1
path: ../../system/Database/MigrationRunner.php
-
message: '#^Only booleans are allowed in an if condition, string\|null given\.$#'
count: 1
path: ../../system/Email/Email.php
-
message: '#^Only booleans are allowed in an if condition, array\|string\|null given\.$#'
count: 2
path: ../../system/Encryption/Handlers/OpenSSLHandler.php
-
message: '#^Only booleans are allowed in an if condition, array\<string, string\> given\.$#'
count: 1
path: ../../system/HTTP/RedirectResponse.php
-
message: '#^Only booleans are allowed in an if condition, string given\.$#'
count: 1
path: ../../system/HTTP/Request.php
-
message: '#^Only booleans are allowed in an if condition, string\|null given\.$#'
count: 2
path: ../../system/HTTP/Response.php
-
message: '#^Only booleans are allowed in an if condition, array\|int\|string\|null given\.$#'
count: 2
path: ../../system/Model.php
-
message: '#^Only booleans are allowed in an if condition, object\|string\|null given\.$#'
count: 1
path: ../../system/RESTful/BaseResource.php
-
message: '#^Only booleans are allowed in an if condition, mixed given\.$#'
count: 2
path: ../../system/Session/Handlers/Database/PostgreHandler.php
-
message: '#^Only booleans are allowed in an if condition, mixed given\.$#'
count: 1
path: ../../system/Session/Handlers/MemcachedHandler.php
-
message: '#^Only booleans are allowed in an if condition, string\|null given\.$#'
count: 1
path: ../../system/View/Table.php
-
message: '#^Only booleans are allowed in an if condition, mixed given\.$#'
count: 5
path: ../../tests/system/Models/FindModelTest.php
-
message: '#^Only booleans are allowed in an if condition, list\<string\> given\.$#'
count: 1
path: ../../tests/system/Test/FilterTestTraitTest.php

View File

@ -0,0 +1,8 @@
# total 1 error
parameters:
ignoreErrors:
-
message: '#^Offset 4 on array\{string, string, string, string, string, string\} in isset\(\) always exists and is not nullable\.$#'
count: 1
path: ../../system/Database/BaseBuilder.php

View File

@ -0,0 +1,18 @@
# total 3 errors
parameters:
ignoreErrors:
-
message: '#^Property Config\\Autoload\:\:\$helpers \(list\<string\>\) in isset\(\) is not nullable\.$#'
count: 1
path: ../../system/Autoloader/Autoloader.php
-
message: '#^Static property CodeIgniter\\Email\\Email\:\:\$func_overload \(bool\) in isset\(\) is not nullable\.$#'
count: 1
path: ../../system/Email/Email.php
-
message: '#^Property CodeIgniter\\I18n\\TimeDifference\:\:\$days \(int\) in isset\(\) is not nullable\.$#'
count: 1
path: ../../tests/system/I18n/TimeDifferenceTest.php

View File

@ -0,0 +1,69 @@
includes:
- argument.type.neon
- assign.propertyType.neon
- booleanAnd.leftNotBoolean.neon
- booleanAnd.rightAlwaysTrue.neon
- booleanAnd.rightNotBoolean.neon
- booleanNot.exprNotBoolean.neon
- booleanOr.leftNotBoolean.neon
- booleanOr.rightNotBoolean.neon
- class.notFound.neon
- codeigniter.cacheHandlerInstance.neon
- codeigniter.configArgumentInstanceof.neon
- codeigniter.frameworkExceptionInstance.neon
- codeigniter.getReassignArray.neon
- codeigniter.modelArgumentInstanceof.neon
- codeigniter.modelArgumentType.neon
- codeigniter.superglobalAccess.neon
- codeigniter.superglobalAccessAssign.neon
- codeigniter.unknownServiceMethod.neon
- deadCode.unreachable.neon
- elseif.condNotBoolean.neon
- empty.notAllowed.neon
- empty.property.neon
- expr.resultUnused.neon
- function.alreadyNarrowedType.neon
- function.inner.neon
- function.notFound.neon
- generator.returnType.neon
- generator.valueType.neon
- greaterOrEqual.invalid.neon
- if.condNotBoolean.neon
- isset.offset.neon
- isset.property.neon
- method.alreadyNarrowedType.neon
- method.childParameterType.neon
- method.childReturnType.neon
- method.impossibleType.neon
- method.notFound.neon
- method.unused.neon
- method.void.neon
- missingType.callable.neon
- missingType.iterableValue.neon
- missingType.parameter.neon
- missingType.property.neon
- missingType.return.neon
- new.static.neon
- notIdentical.alwaysTrue.neon
- nullCoalesce.expr.neon
- nullCoalesce.property.neon
- nullCoalesce.variable.neon
- offsetAccess.notFound.neon
- parameterByRef.unusedType.neon
- property.defaultValue.neon
- property.nonObject.neon
- property.notFound.neon
- property.phpDocType.neon
- property.protected.neon
- property.readOnlyByPhpDocAssignOutOfClass.neon
- property.readOnlyByPhpDocDefaultValue.neon
- property.unusedType.neon
- return.missing.neon
- return.type.neon
- return.unusedType.neon
- staticMethod.notFound.neon
- ternary.condNotBoolean.neon
- ternary.shortNotAllowed.neon
- unset.offset.neon
- varTag.type.neon
- variable.undefined.neon

View File

@ -0,0 +1,88 @@
# total 17 errors
parameters:
ignoreErrors:
-
message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertIsBool\(\) with bool will always evaluate to true\.$#'
count: 1
path: ../../tests/system/CLI/CLITest.php
-
message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertIsInt\(\) with int will always evaluate to true\.$#'
count: 2
path: ../../tests/system/CLI/CLITest.php
-
message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertTrue\(\) with true will always evaluate to true\.$#'
count: 1
path: ../../tests/system/Cache/CacheFactoryTest.php
-
message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertTrue\(\) with true will always evaluate to true\.$#'
count: 1
path: ../../tests/system/CodeIgniterTest.php
-
message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertIsBool\(\) with bool will always evaluate to true\.$#'
count: 1
path: ../../tests/system/CommonFunctionsTest.php
-
message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertIsArray\(\) with array will always evaluate to true\.$#'
count: 2
path: ../../tests/system/Config/FactoriesTest.php
-
message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertTrue\(\) with true will always evaluate to true\.$#'
count: 2
path: ../../tests/system/Database/Live/UpdateTest.php
-
message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertIsArray\(\) with array\{1\: array\{DETAIL\: ''asdf''\}, 2\: array\{DETAIL\: ''sdfg''\}\} will always evaluate to true\.$#'
count: 1
path: ../../tests/system/HTTP/CLIRequestTest.php
-
message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertIsArray\(\) with array\{1\: array\{DETAIL\: ''asdf''\}, 2\: array\{DETAIL\: ''sdfg''\}\} will always evaluate to true\.$#'
count: 1
path: ../../tests/system/HTTP/RequestTest.php
-
message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertTrue\(\) with true will always evaluate to true\.$#'
count: 1
path: ../../tests/system/HTTP/URITest.php
-
message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertIsString\(\) with string will always evaluate to true\.$#'
count: 2
path: ../../tests/system/Helpers/TextHelperTest.php
-
message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertIsArray\(\) with array will always evaluate to true\.$#'
count: 1
path: ../../tests/system/HotReloader/DirectoryHasherTest.php
-
message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertIsString\(\) with string will always evaluate to true\.$#'
count: 1
path: ../../tests/system/Publisher/PublisherSupportTest.php
-
message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertIsBool\(\) with bool will always evaluate to true\.$#'
count: 1
path: ../../tests/system/Security/SecurityTest.php
-
message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertIsString\(\) with string will always evaluate to true\.$#'
count: 3
path: ../../tests/system/Security/SecurityTest.php
-
message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertIsNumeric\(\) with int will always evaluate to true\.$#'
count: 1
path: ../../tests/system/Test/FabricatorTest.php
-
message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertIsCallable\(\) with Closure will always evaluate to true\.$#'
count: 1
path: ../../tests/system/Test/FilterTestTraitTest.php

View File

@ -0,0 +1,88 @@
# total 17 errors
parameters:
ignoreErrors:
-
message: '#^Parameter \#1 \$params \(array\<string, mixed\>\) of method CodeIgniter\\Commands\\Database\\MigrateStatus\:\:run\(\) should be contravariant with parameter \$params \(array\<int\|string, string\|null\>\) of method CodeIgniter\\CLI\\BaseCommand\:\:run\(\)$#'
count: 1
path: ../../system/Commands/Database/MigrateStatus.php
-
message: '#^Parameter \#1 \$offset \(string\) of method CodeIgniter\\Cookie\\Cookie\:\:offsetSet\(\) should be contravariant with parameter \$offset \(string\|null\) of method ArrayAccess\<string,bool\|int\|string\>\:\:offsetSet\(\)$#'
count: 1
path: ../../system/Cookie/Cookie.php
-
message: '#^Parameter \#1 \$className \(class\-string\) of method CodeIgniter\\Database\\BaseResult\:\:getCustomResultObject\(\) should be contravariant with parameter \$className \(string\) of method CodeIgniter\\Database\\ResultInterface\<TConnection,TResult\>\:\:getCustomResultObject\(\)$#'
count: 1
path: ../../system/Database/BaseResult.php
-
message: '#^Parameter \#1 \$selectOverride \(bool\) of method CodeIgniter\\Database\\SQLSRV\\Builder\:\:compileSelect\(\) should be contravariant with parameter \$selectOverride \(mixed\) of method CodeIgniter\\Database\\BaseBuilder\:\:compileSelect\(\)$#'
count: 1
path: ../../system/Database/SQLSRV/Builder.php
-
message: '#^Parameter \#1 \$value \(bool\|int\|string\) of method CodeIgniter\\Entity\\Cast\\IntBoolCast\:\:set\(\) should be contravariant with parameter \$value \(array\|bool\|float\|int\|object\|string\|null\) of method CodeIgniter\\Entity\\Cast\\BaseCast\:\:set\(\)$#'
count: 1
path: ../../system/Entity/Cast/IntBoolCast.php
-
message: '#^Parameter \#1 \$value \(bool\|int\|string\) of method CodeIgniter\\Entity\\Cast\\IntBoolCast\:\:set\(\) should be contravariant with parameter \$value \(array\|bool\|float\|int\|object\|string\|null\) of method CodeIgniter\\Entity\\Cast\\CastInterface\:\:set\(\)$#'
count: 1
path: ../../system/Entity/Cast/IntBoolCast.php
-
message: '#^Parameter \#1 \$value \(int\) of method CodeIgniter\\Entity\\Cast\\IntBoolCast\:\:get\(\) should be contravariant with parameter \$value \(array\|bool\|float\|int\|object\|string\|null\) of method CodeIgniter\\Entity\\Cast\\BaseCast\:\:get\(\)$#'
count: 1
path: ../../system/Entity/Cast/IntBoolCast.php
-
message: '#^Parameter \#1 \$value \(int\) of method CodeIgniter\\Entity\\Cast\\IntBoolCast\:\:get\(\) should be contravariant with parameter \$value \(array\|bool\|float\|int\|object\|string\|null\) of method CodeIgniter\\Entity\\Cast\\CastInterface\:\:get\(\)$#'
count: 1
path: ../../system/Entity/Cast/IntBoolCast.php
-
message: '#^Parameter \#1 \$level \(string\) of method CodeIgniter\\Log\\Logger\:\:log\(\) should be contravariant with parameter \$level \(mixed\) of method Psr\\Log\\LoggerInterface\:\:log\(\)$#'
count: 1
path: ../../system/Log/Logger.php
-
message: '#^Parameter \#1 \$value \(string\) of method Tests\\Support\\Entity\\Cast\\CastBase64\:\:get\(\) should be contravariant with parameter \$value \(array\|bool\|float\|int\|object\|string\|null\) of method CodeIgniter\\Entity\\Cast\\BaseCast\:\:get\(\)$#'
count: 1
path: ../../tests/_support/Entity/Cast/CastBase64.php
-
message: '#^Parameter \#1 \$value \(string\) of method Tests\\Support\\Entity\\Cast\\CastBase64\:\:get\(\) should be contravariant with parameter \$value \(array\|bool\|float\|int\|object\|string\|null\) of method CodeIgniter\\Entity\\Cast\\CastInterface\:\:get\(\)$#'
count: 1
path: ../../tests/_support/Entity/Cast/CastBase64.php
-
message: '#^Parameter \#1 \$value \(string\) of method Tests\\Support\\Entity\\Cast\\CastBase64\:\:set\(\) should be contravariant with parameter \$value \(array\|bool\|float\|int\|object\|string\|null\) of method CodeIgniter\\Entity\\Cast\\BaseCast\:\:set\(\)$#'
count: 1
path: ../../tests/_support/Entity/Cast/CastBase64.php
-
message: '#^Parameter \#1 \$value \(string\) of method Tests\\Support\\Entity\\Cast\\CastBase64\:\:set\(\) should be contravariant with parameter \$value \(array\|bool\|float\|int\|object\|string\|null\) of method CodeIgniter\\Entity\\Cast\\CastInterface\:\:set\(\)$#'
count: 1
path: ../../tests/_support/Entity/Cast/CastBase64.php
-
message: '#^Parameter \#1 \$binary \(string\) of method Tests\\Support\\Entity\\Cast\\CastBinaryUUID\:\:get\(\) should be contravariant with parameter \$value \(array\|bool\|float\|int\|object\|string\|null\) of method CodeIgniter\\Entity\\Cast\\BaseCast\:\:get\(\)$#'
count: 1
path: ../../tests/_support/Entity/Cast/CastBinaryUUID.php
-
message: '#^Parameter \#1 \$binary \(string\) of method Tests\\Support\\Entity\\Cast\\CastBinaryUUID\:\:get\(\) should be contravariant with parameter \$value \(array\|bool\|float\|int\|object\|string\|null\) of method CodeIgniter\\Entity\\Cast\\CastInterface\:\:get\(\)$#'
count: 1
path: ../../tests/_support/Entity/Cast/CastBinaryUUID.php
-
message: '#^Parameter \#1 \$string \(string\) of method Tests\\Support\\Entity\\Cast\\CastBinaryUUID\:\:set\(\) should be contravariant with parameter \$value \(array\|bool\|float\|int\|object\|string\|null\) of method CodeIgniter\\Entity\\Cast\\BaseCast\:\:set\(\)$#'
count: 1
path: ../../tests/_support/Entity/Cast/CastBinaryUUID.php
-
message: '#^Parameter \#1 \$string \(string\) of method Tests\\Support\\Entity\\Cast\\CastBinaryUUID\:\:set\(\) should be contravariant with parameter \$value \(array\|bool\|float\|int\|object\|string\|null\) of method CodeIgniter\\Entity\\Cast\\CastInterface\:\:set\(\)$#'
count: 1
path: ../../tests/_support/Entity/Cast/CastBinaryUUID.php

View File

@ -0,0 +1,218 @@
# total 43 errors
parameters:
ignoreErrors:
-
message: '#^Return type \(array\{code\: int\|string\|null, message\: string\|null\}\) of method CodeIgniter\\Database\\BaseConnection\:\:error\(\) should be covariant with return type \(array\<string, int\|string\>\) of method CodeIgniter\\Database\\ConnectionInterface\<TConnection,TResult\>\:\:error\(\)$#'
count: 1
path: ../../system/Database/BaseConnection.php
-
message: '#^Return type \(array\<string, int\|string\>\) of method CodeIgniter\\Database\\MySQLi\\Connection\:\:error\(\) should be covariant with return type \(array\{code\: int\|string\|null, message\: string\|null\}\) of method CodeIgniter\\Database\\BaseConnection\<mysqli,mysqli_result\>\:\:error\(\)$#'
count: 1
path: ../../system/Database/MySQLi/Connection.php
-
message: '#^Return type \(mysqli_result\|false\) of method CodeIgniter\\Database\\MySQLi\\PreparedQuery\:\:_getResult\(\) should be covariant with return type \(object\|resource\|null\) of method CodeIgniter\\Database\\BasePreparedQuery\<mysqli,mysqli_stmt,mysqli_result\>\:\:_getResult\(\)$#'
count: 1
path: ../../system/Database/MySQLi/PreparedQuery.php
-
message: '#^Return type \(mixed\) of method CodeIgniter\\Database\\OCI8\\Builder\:\:delete\(\) should be covariant with return type \(bool\|string\) of method CodeIgniter\\Database\\BaseBuilder\:\:delete\(\)$#'
count: 1
path: ../../system/Database/OCI8/Builder.php
-
message: '#^Return type \(array\{code\: int\|string\|null, message\: string\|null\}\) of method CodeIgniter\\Database\\OCI8\\Connection\:\:error\(\) should be covariant with return type \(array\<string, int\|string\>\) of method CodeIgniter\\Database\\ConnectionInterface\<resource,resource\>\:\:error\(\)$#'
count: 1
path: ../../system/Database/OCI8/Connection.php
-
message: '#^Return type \(CodeIgniter\\Database\\BaseBuilder\) of method CodeIgniter\\Database\\Postgre\\Builder\:\:join\(\) should be covariant with return type \(\$this\(CodeIgniter\\Database\\BaseBuilder\)\) of method CodeIgniter\\Database\\BaseBuilder\:\:join\(\)$#'
count: 1
path: ../../system/Database/Postgre/Builder.php
-
message: '#^Return type \(CodeIgniter\\Database\\BaseBuilder\) of method CodeIgniter\\Database\\Postgre\\Builder\:\:orderBy\(\) should be covariant with return type \(\$this\(CodeIgniter\\Database\\BaseBuilder\)\) of method CodeIgniter\\Database\\BaseBuilder\:\:orderBy\(\)$#'
count: 1
path: ../../system/Database/Postgre/Builder.php
-
message: '#^Return type \(mixed\) of method CodeIgniter\\Database\\Postgre\\Builder\:\:decrement\(\) should be covariant with return type \(bool\) of method CodeIgniter\\Database\\BaseBuilder\:\:decrement\(\)$#'
count: 1
path: ../../system/Database/Postgre/Builder.php
-
message: '#^Return type \(mixed\) of method CodeIgniter\\Database\\Postgre\\Builder\:\:delete\(\) should be covariant with return type \(bool\|string\) of method CodeIgniter\\Database\\BaseBuilder\:\:delete\(\)$#'
count: 1
path: ../../system/Database/Postgre/Builder.php
-
message: '#^Return type \(mixed\) of method CodeIgniter\\Database\\Postgre\\Builder\:\:increment\(\) should be covariant with return type \(bool\) of method CodeIgniter\\Database\\BaseBuilder\:\:increment\(\)$#'
count: 1
path: ../../system/Database/Postgre/Builder.php
-
message: '#^Return type \(mixed\) of method CodeIgniter\\Database\\Postgre\\Builder\:\:replace\(\) should be covariant with return type \(CodeIgniter\\Database\\BaseResult\|CodeIgniter\\Database\\Query\|string\|false\) of method CodeIgniter\\Database\\BaseBuilder\:\:replace\(\)$#'
count: 1
path: ../../system/Database/Postgre/Builder.php
-
message: '#^Return type \(array\<string, int\|string\>\) of method CodeIgniter\\Database\\Postgre\\Connection\:\:error\(\) should be covariant with return type \(array\{code\: int\|string\|null, message\: string\|null\}\) of method CodeIgniter\\Database\\BaseConnection\<PgSql\\Connection,PgSql\\Result\>\:\:error\(\)$#'
count: 1
path: ../../system/Database/Postgre/Connection.php
-
message: '#^Return type \(CodeIgniter\\Database\\BaseBuilder\) of method CodeIgniter\\Database\\SQLSRV\\Builder\:\:maxMinAvgSum\(\) should be covariant with return type \(\$this\(CodeIgniter\\Database\\BaseBuilder\)\) of method CodeIgniter\\Database\\BaseBuilder\:\:maxMinAvgSum\(\)$#'
count: 1
path: ../../system/Database/SQLSRV/Builder.php
-
message: '#^Return type \(mixed\) of method CodeIgniter\\Database\\SQLSRV\\Builder\:\:delete\(\) should be covariant with return type \(bool\|string\) of method CodeIgniter\\Database\\BaseBuilder\:\:delete\(\)$#'
count: 1
path: ../../system/Database/SQLSRV/Builder.php
-
message: '#^Return type \(mixed\) of method CodeIgniter\\Database\\SQLSRV\\Builder\:\:replace\(\) should be covariant with return type \(CodeIgniter\\Database\\BaseResult\|CodeIgniter\\Database\\Query\|string\|false\) of method CodeIgniter\\Database\\BaseBuilder\:\:replace\(\)$#'
count: 1
path: ../../system/Database/SQLSRV/Builder.php
-
message: '#^Return type \(array\<string, int\|string\>\) of method CodeIgniter\\Database\\SQLSRV\\Connection\:\:error\(\) should be covariant with return type \(array\{code\: int\|string\|null, message\: string\|null\}\) of method CodeIgniter\\Database\\BaseConnection\<resource,resource\>\:\:error\(\)$#'
count: 1
path: ../../system/Database/SQLSRV/Connection.php
-
message: '#^Return type \(array\<string, int\|string\>\) of method CodeIgniter\\Database\\SQLite3\\Connection\:\:error\(\) should be covariant with return type \(array\{code\: int\|string\|null, message\: string\|null\}\) of method CodeIgniter\\Database\\BaseConnection\<SQLite3,SQLite3Result\>\:\:error\(\)$#'
count: 1
path: ../../system/Database/SQLite3/Connection.php
-
message: '#^Return type \(SQLite3Result\|false\) of method CodeIgniter\\Database\\SQLite3\\PreparedQuery\:\:_getResult\(\) should be covariant with return type \(object\|resource\|null\) of method CodeIgniter\\Database\\BasePreparedQuery\<SQLite3,SQLite3Stmt,SQLite3Result\>\:\:_getResult\(\)$#'
count: 1
path: ../../system/Database/SQLite3/PreparedQuery.php
-
message: '#^Return type \(CodeIgniter\\HTTP\\DownloadResponse\) of method CodeIgniter\\HTTP\\DownloadResponse\:\:sendBody\(\) should be covariant with return type \(\$this\(CodeIgniter\\HTTP\\Response\)\) of method CodeIgniter\\HTTP\\Response\:\:sendBody\(\)$#'
count: 1
path: ../../system/HTTP/DownloadResponse.php
-
message: '#^Return type \(CodeIgniter\\HTTP\\DownloadResponse\) of method CodeIgniter\\HTTP\\DownloadResponse\:\:sendBody\(\) should be covariant with return type \(\$this\(CodeIgniter\\HTTP\\ResponseInterface\)\) of method CodeIgniter\\HTTP\\ResponseInterface\:\:sendBody\(\)$#'
count: 1
path: ../../system/HTTP/DownloadResponse.php
-
message: '#^Return type \(CodeIgniter\\HTTP\\ResponseInterface\) of method CodeIgniter\\HTTP\\DownloadResponse\:\:setContentType\(\) should be covariant with return type \(\$this\(CodeIgniter\\HTTP\\Response\)\) of method CodeIgniter\\HTTP\\Response\:\:setContentType\(\)$#'
count: 1
path: ../../system/HTTP/DownloadResponse.php
-
message: '#^Return type \(CodeIgniter\\HTTP\\ResponseInterface\) of method CodeIgniter\\HTTP\\DownloadResponse\:\:setContentType\(\) should be covariant with return type \(\$this\(CodeIgniter\\HTTP\\ResponseInterface\)\) of method CodeIgniter\\HTTP\\ResponseInterface\:\:setContentType\(\)$#'
count: 1
path: ../../system/HTTP/DownloadResponse.php
-
message: '#^Return type \(CodeIgniter\\HTTP\\Exceptions\\HTTPException\) of method CodeIgniter\\HTTP\\Exceptions\\HTTPException\:\:forInvalidFile\(\) should be covariant with return type \(static\(CodeIgniter\\Exceptions\\FrameworkException\)\) of method CodeIgniter\\Exceptions\\FrameworkException\:\:forInvalidFile\(\)$#'
count: 1
path: ../../system/HTTP/Exceptions/HTTPException.php
-
message: '#^Return type \(bool\) of method CodeIgniter\\HTTP\\Files\\UploadedFile\:\:move\(\) should be compatible with return type \(CodeIgniter\\Files\\File\) of method CodeIgniter\\Files\\File\:\:move\(\)$#'
count: 1
path: ../../system/HTTP/Files/UploadedFile.php
-
message: '#^Return type \(CodeIgniter\\HTTP\\URI\|null\) of method CodeIgniter\\HTTP\\OutgoingRequest\:\:getUri\(\) should be covariant with return type \(CodeIgniter\\HTTP\\URI\) of method CodeIgniter\\HTTP\\OutgoingRequestInterface\:\:getUri\(\)$#'
count: 1
path: ../../system/HTTP/OutgoingRequest.php
-
message: '#^Return type \(CodeIgniter\\I18n\\Time\) of method CodeIgniter\\I18n\\Time\:\:setTimestamp\(\) should be covariant with return type \(static\(DateTimeImmutable\)\) of method DateTimeImmutable\:\:setTimestamp\(\)$#'
count: 1
path: ../../system/I18n/Time.php
-
message: '#^Return type \(CodeIgniter\\I18n\\Time\) of method CodeIgniter\\I18n\\Time\:\:setTimezone\(\) should be covariant with return type \(static\(DateTimeImmutable\)\) of method DateTimeImmutable\:\:setTimezone\(\)$#'
count: 1
path: ../../system/I18n/Time.php
-
message: '#^Return type \(CodeIgniter\\I18n\\TimeLegacy\) of method CodeIgniter\\I18n\\TimeLegacy\:\:setTimestamp\(\) should be covariant with return type \(static\(DateTime\)\) of method DateTime\:\:setTimestamp\(\)$#'
count: 1
path: ../../system/I18n/TimeLegacy.php
-
message: '#^Return type \(CodeIgniter\\I18n\\TimeLegacy\) of method CodeIgniter\\I18n\\TimeLegacy\:\:setTimezone\(\) should be covariant with return type \(static\(DateTime\)\) of method DateTime\:\:setTimezone\(\)$#'
count: 1
path: ../../system/I18n/TimeLegacy.php
-
message: '#^Return type \(CodeIgniter\\Images\\Handlers\\BaseHandler\) of method CodeIgniter\\Images\\Handlers\\BaseHandler\:\:fit\(\) should be covariant with return type \(\$this\(CodeIgniter\\Images\\ImageHandlerInterface\)\) of method CodeIgniter\\Images\\ImageHandlerInterface\:\:fit\(\)$#'
count: 1
path: ../../system/Images/Handlers/BaseHandler.php
-
message: '#^Return type \(CodeIgniter\\Images\\Handlers\\BaseHandler\) of method CodeIgniter\\Images\\Handlers\\BaseHandler\:\:resize\(\) should be covariant with return type \(\$this\(CodeIgniter\\Images\\ImageHandlerInterface\)\) of method CodeIgniter\\Images\\ImageHandlerInterface\:\:resize\(\)$#'
count: 1
path: ../../system/Images/Handlers/BaseHandler.php
-
message: '#^Return type \(CodeIgniter\\Images\\Handlers\\ImageMagickHandler\) of method CodeIgniter\\Images\\Handlers\\ImageMagickHandler\:\:_resize\(\) should be covariant with return type \(\$this\(CodeIgniter\\Images\\Handlers\\BaseHandler\)\) of method CodeIgniter\\Images\\Handlers\\BaseHandler\:\:_resize\(\)$#'
count: 1
path: ../../system/Images/Handlers/ImageMagickHandler.php
-
message: '#^Return type \(bool\|CodeIgniter\\Images\\Handlers\\ImageMagickHandler\) of method CodeIgniter\\Images\\Handlers\\ImageMagickHandler\:\:_crop\(\) should be covariant with return type \(\$this\(CodeIgniter\\Images\\Handlers\\BaseHandler\)\) of method CodeIgniter\\Images\\Handlers\\BaseHandler\:\:_crop\(\)$#'
count: 1
path: ../../system/Images/Handlers/ImageMagickHandler.php
-
message: '#^Return type \(array\|bool\|float\|int\|object\|string\|null\) of method CodeIgniter\\Model\:\:__call\(\) should be covariant with return type \(\$this\(CodeIgniter\\BaseModel\)\|null\) of method CodeIgniter\\BaseModel\:\:__call\(\)$#'
count: 1
path: ../../system/Model.php
-
message: '#^Return type \(bool\) of method CodeIgniter\\Session\\Session\:\:markAsFlashdata\(\) should be covariant with return type \(false\) of method CodeIgniter\\Session\\SessionInterface\:\:markAsFlashdata\(\)$#'
count: 1
path: ../../system/Session/Session.php
-
message: '#^Return type \(array\{code\: int\|string\|null, message\: string\|null\}\) of method CodeIgniter\\Test\\Mock\\MockConnection\:\:error\(\) should be covariant with return type \(array\<string, int\|string\>\) of method CodeIgniter\\Database\\ConnectionInterface\<object\|resource,object\|resource\>\:\:error\(\)$#'
count: 1
path: ../../system/Test/Mock/MockConnection.php
-
message: '#^Return type \(bool\|CodeIgniter\\Database\\BaseResult\|CodeIgniter\\Database\\Query\) of method CodeIgniter\\Test\\Mock\\MockConnection\:\:query\(\) should be covariant with return type \(bool\|CodeIgniter\\Database\\BaseResult\<object\|resource, object\|resource\>\|CodeIgniter\\Database\\Query\) of method CodeIgniter\\Database\\BaseConnection\<object\|resource,object\|resource\>\:\:query\(\)$#'
count: 1
path: ../../system/Test/Mock/MockConnection.php
-
message: '#^Return type \(bool\|CodeIgniter\\Database\\BaseResult\|CodeIgniter\\Database\\Query\) of method CodeIgniter\\Test\\Mock\\MockConnection\:\:query\(\) should be covariant with return type \(bool\|CodeIgniter\\Database\\BaseResult\<object\|resource, object\|resource\>\|CodeIgniter\\Database\\Query\) of method CodeIgniter\\Database\\ConnectionInterface\<object\|resource,object\|resource\>\:\:query\(\)$#'
count: 1
path: ../../system/Test/Mock/MockConnection.php
-
message: '#^Return type \(bool\|object\) of method CodeIgniter\\Test\\Mock\\MockConnection\:\:execute\(\) should be covariant with return type \(object\|resource\|false\) of method CodeIgniter\\Database\\BaseConnection\<object\|resource,object\|resource\>\:\:execute\(\)$#'
count: 1
path: ../../system/Test/Mock/MockConnection.php
-
message: '#^Return type \(mixed\) of method CodeIgniter\\Test\\Mock\\MockConnection\:\:connect\(\) should be covariant with return type \(object\|resource\|false\) of method CodeIgniter\\Database\\ConnectionInterface\<object\|resource,object\|resource\>\:\:connect\(\)$#'
count: 2
path: ../../system/Test/Mock/MockConnection.php
-
message: '#^Return type \(mixed\) of method CodeIgniter\\Test\\Mock\\MockResult\:\:fetchAssoc\(\) should be covariant with return type \(array\|false\|null\) of method CodeIgniter\\Database\\BaseResult\<object\|resource,object\|resource\>\:\:fetchAssoc\(\)$#'
count: 1
path: ../../system/Test/Mock/MockResult.php
-
message: '#^Return type \(mixed\) of method Tests\\Support\\Entity\\Cast\\CastPassParameters\:\:set\(\) should be covariant with return type \(array\|bool\|float\|int\|object\|string\|null\) of method CodeIgniter\\Entity\\Cast\\BaseCast\:\:set\(\)$#'
count: 1
path: ../../tests/_support/Entity/Cast/CastPassParameters.php
-
message: '#^Return type \(mixed\) of method Tests\\Support\\Entity\\Cast\\CastPassParameters\:\:set\(\) should be covariant with return type \(array\|bool\|float\|int\|object\|string\|null\) of method CodeIgniter\\Entity\\Cast\\CastInterface\:\:set\(\)$#'
count: 1
path: ../../tests/_support/Entity/Cast/CastPassParameters.php

View File

@ -0,0 +1,13 @@
# total 2 errors
parameters:
ignoreErrors:
-
message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertFalse\(\) with false will always evaluate to false\.$#'
count: 2
path: ../../tests/system/Events/EventsTest.php
-
message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertTrue\(\) with false will always evaluate to false\.$#'
count: 1
path: ../../tests/system/Events/EventsTest.php

View File

@ -0,0 +1,238 @@
# total 47 errors
parameters:
ignoreErrors:
-
message: '#^Call to an undefined method CodeIgniter\\Database\\QueryInterface\:\:getOriginalQuery\(\)\.$#'
count: 1
path: ../../system/Database/BaseConnection.php
-
message: '#^Call to an undefined method CodeIgniter\\View\\RendererInterface\:\:getData\(\)\.$#'
count: 1
path: ../../system/Debug/Toolbar/Collectors/Views.php
-
message: '#^Call to an undefined method CodeIgniter\\View\\RendererInterface\:\:getPerformanceData\(\)\.$#'
count: 2
path: ../../system/Debug/Toolbar/Collectors/Views.php
-
message: '#^Call to an undefined method CodeIgniter\\Router\\RouteCollectionInterface\:\:getDefaultNamespace\(\)\.$#'
count: 2
path: ../../system/Router/Router.php
-
message: '#^Call to an undefined method CodeIgniter\\Router\\RouteCollectionInterface\:\:getFiltersForRoute\(\)\.$#'
count: 1
path: ../../system/Router/Router.php
-
message: '#^Call to an undefined method CodeIgniter\\Router\\RouteCollectionInterface\:\:getRegisteredControllers\(\)\.$#'
count: 1
path: ../../system/Router/Router.php
-
message: '#^Call to an undefined method CodeIgniter\\Router\\RouteCollectionInterface\:\:getRoutesOptions\(\)\.$#'
count: 1
path: ../../system/Router/Router.php
-
message: '#^Call to an undefined method CodeIgniter\\Router\\RouteCollectionInterface\:\:isFiltered\(\)\.$#'
count: 1
path: ../../system/Router/Router.php
-
message: '#^Call to an undefined method CodeIgniter\\Router\\RouteCollectionInterface\:\:setHTTPVerb\(\)\.$#'
count: 1
path: ../../system/Router/Router.php
-
message: '#^Call to an undefined method CodeIgniter\\Database\\ConnectionInterface\:\:tableExists\(\)\.$#'
count: 1
path: ../../tests/_support/MigrationTestMigrations/Database/Migrations/2018-01-24-102302_Another_migration.php
-
message: '#^Call to an undefined method CodeIgniter\\HTTP\\ResponseInterface\:\:pretend\(\)\.$#'
count: 1
path: ../../tests/system/CodeIgniterTest.php
-
message: '#^Call to an undefined method CodeIgniter\\Database\\BaseConnection\:\:escapeLikeStringDirect\(\)\.$#'
count: 1
path: ../../tests/system/Database/Live/EscapeTest.php
-
message: '#^Call to an undefined method CodeIgniter\\Database\\BaseConnection\:\:getCursor\(\)\.$#'
count: 1
path: ../../tests/system/Database/Live/OCI8/CallStoredProcedureTest.php
-
message: '#^Call to an undefined method CodeIgniter\\Database\\BaseConnection\:\:storedProcedure\(\)\.$#'
count: 3
path: ../../tests/system/Database/Live/OCI8/CallStoredProcedureTest.php
-
message: '#^Call to an undefined method CodeIgniter\\HTTP\\ResponseInterface\:\:pretend\(\)\.$#'
count: 3
path: ../../tests/system/Debug/ExceptionHandlerTest.php
-
message: '#^Call to an undefined method CodeIgniter\\Events\\Events\:\:unInitialize\(\)\.$#'
count: 1
path: ../../tests/system/Events/EventsTest.php
-
message: '#^Call to an undefined method CodeIgniter\\HTTP\\Request\:\:getCookie\(\)\.$#'
count: 2
path: ../../tests/system/HTTP/IncomingRequestTest.php
-
message: '#^Call to an undefined method CodeIgniter\\HTTP\\Request\:\:getDefaultLocale\(\)\.$#'
count: 1
path: ../../tests/system/HTTP/IncomingRequestTest.php
-
message: '#^Call to an undefined method CodeIgniter\\HTTP\\Request\:\:getFile\(\)\.$#'
count: 1
path: ../../tests/system/HTTP/IncomingRequestTest.php
-
message: '#^Call to an undefined method CodeIgniter\\HTTP\\Request\:\:getFileMultiple\(\)\.$#'
count: 1
path: ../../tests/system/HTTP/IncomingRequestTest.php
-
message: '#^Call to an undefined method CodeIgniter\\HTTP\\Request\:\:getFiles\(\)\.$#'
count: 1
path: ../../tests/system/HTTP/IncomingRequestTest.php
-
message: '#^Call to an undefined method CodeIgniter\\HTTP\\Request\:\:getGet\(\)\.$#'
count: 2
path: ../../tests/system/HTTP/IncomingRequestTest.php
-
message: '#^Call to an undefined method CodeIgniter\\HTTP\\Request\:\:getGetPost\(\)\.$#'
count: 5
path: ../../tests/system/HTTP/IncomingRequestTest.php
-
message: '#^Call to an undefined method CodeIgniter\\HTTP\\Request\:\:getLocale\(\)\.$#'
count: 1
path: ../../tests/system/HTTP/IncomingRequestTest.php
-
message: '#^Call to an undefined method CodeIgniter\\HTTP\\Request\:\:getOldInput\(\)\.$#'
count: 9
path: ../../tests/system/HTTP/IncomingRequestTest.php
-
message: '#^Call to an undefined method CodeIgniter\\HTTP\\Request\:\:getPost\(\)\.$#'
count: 2
path: ../../tests/system/HTTP/IncomingRequestTest.php
-
message: '#^Call to an undefined method CodeIgniter\\HTTP\\Request\:\:getPostGet\(\)\.$#'
count: 5
path: ../../tests/system/HTTP/IncomingRequestTest.php
-
message: '#^Call to an undefined method CodeIgniter\\HTTP\\Request\:\:getVar\(\)\.$#'
count: 2
path: ../../tests/system/HTTP/IncomingRequestTest.php
-
message: '#^Call to an undefined method CodeIgniter\\HTTP\\Request\:\:is\(\)\.$#'
count: 5
path: ../../tests/system/HTTP/IncomingRequestTest.php
-
message: '#^Call to an undefined method CodeIgniter\\HTTP\\Request\:\:isAJAX\(\)\.$#'
count: 1
path: ../../tests/system/HTTP/IncomingRequestTest.php
-
message: '#^Call to an undefined method CodeIgniter\\HTTP\\Request\:\:isCLI\(\)\.$#'
count: 1
path: ../../tests/system/HTTP/IncomingRequestTest.php
-
message: '#^Call to an undefined method CodeIgniter\\HTTP\\Request\:\:isSecure\(\)\.$#'
count: 3
path: ../../tests/system/HTTP/IncomingRequestTest.php
-
message: '#^Call to an undefined method CodeIgniter\\HTTP\\Request\:\:negotiate\(\)\.$#'
count: 5
path: ../../tests/system/HTTP/IncomingRequestTest.php
-
message: '#^Call to an undefined method CodeIgniter\\HTTP\\URI\:\:getRoutePath\(\)\.$#'
count: 1
path: ../../tests/system/HTTP/URITest.php
-
message: '#^Call to an undefined method org\\bovigo\\vfs\\visitor\\vfsStreamVisitor\:\:getStructure\(\)\.$#'
count: 2
path: ../../tests/system/Helpers/FilesystemHelperTest.php
-
message: '#^Call to an undefined method CodeIgniter\\Images\\Handlers\\BaseHandler\:\:getPathname\(\)\.$#'
count: 1
path: ../../tests/system/Images/BaseHandlerTest.php
-
message: '#^Call to an undefined method org\\bovigo\\vfs\\vfsStreamContent\:\:getContent\(\)\.$#'
count: 3
path: ../../tests/system/Images/GDHandlerTest.php
-
message: '#^Call to an undefined method CodeIgniter\\Model\:\:affectedRows\(\)\.$#'
count: 1
path: ../../tests/system/Models/AffectedRowsTest.php
-
message: '#^Call to an undefined method CodeIgniter\\Model\:\:getLastQuery\(\)\.$#'
count: 1
path: ../../tests/system/Models/FindModelTest.php
-
message: '#^Call to an undefined method CodeIgniter\\Model\:\:undefinedMethodCall\(\)\.$#'
count: 1
path: ../../tests/system/Models/GeneralModelTest.php
-
message: '#^Call to an undefined method CodeIgniter\\HTTP\\ResponseInterface\:\:pretend\(\)\.$#'
count: 1
path: ../../tests/system/RESTful/ResourceControllerTest.php
-
message: '#^Call to an undefined method CodeIgniter\\Test\\TestResponse\:\:ohno\(\)\.$#'
count: 1
path: ../../tests/system/Test/ControllerTestTraitTest.php
-
message: '#^Call to an undefined method CodeIgniter\\View\\Table\:\:compileTemplate\(\)\.$#'
count: 2
path: ../../tests/system/View/TableTest.php
-
message: '#^Call to an undefined method CodeIgniter\\View\\Table\:\:defaultTemplate\(\)\.$#'
count: 1
path: ../../tests/system/View/TableTest.php
-
message: '#^Call to an undefined method CodeIgniter\\View\\Table\:\:prepArgs\(\)\.$#'
count: 2
path: ../../tests/system/View/TableTest.php
-
message: '#^Call to an undefined method CodeIgniter\\View\\Table\:\:setFromArray\(\)\.$#'
count: 2
path: ../../tests/system/View/TableTest.php
-
message: '#^Call to an undefined method CodeIgniter\\View\\Table\:\:setFromDBResult\(\)\.$#'
count: 1
path: ../../tests/system/View/TableTest.php

View File

@ -0,0 +1,13 @@
# total 2 errors
parameters:
ignoreErrors:
-
message: '#^Method Tests\\Support\\Test\\TestForReflectionHelper\:\:privateMethod\(\) is unused\.$#'
count: 1
path: ../../tests/_support/Test/TestForReflectionHelper.php
-
message: '#^Static method Tests\\Support\\Test\\TestForReflectionHelper\:\:privateStaticMethod\(\) is unused\.$#'
count: 1
path: ../../tests/_support/Test/TestForReflectionHelper.php

View File

@ -0,0 +1,18 @@
# total 3 errors
parameters:
ignoreErrors:
-
message: '#^Result of method CodeIgniter\\Commands\\ListCommands\:\:listFull\(\) \(void\) is used\.$#'
count: 1
path: ../../system/Commands/ListCommands.php
-
message: '#^Result of method CodeIgniter\\Commands\\ListCommands\:\:listSimple\(\) \(void\) is used\.$#'
count: 1
path: ../../system/Commands/ListCommands.php
-
message: '#^Result of method CodeIgniter\\Log\\Logger\:\:log\(\) \(void\) is used\.$#'
count: 1
path: ../../tests/system/Log/LoggerTest.php

View File

@ -0,0 +1,73 @@
# total 14 errors
parameters:
ignoreErrors:
-
message: '#^Method CodeIgniter\\Events\\Events\:\:on\(\) has parameter \$callback with no signature specified for callable\.$#'
count: 1
path: ../../system/Events/Events.php
-
message: '#^Method CodeIgniter\\Events\\Events\:\:removeListener\(\) has parameter \$listener with no signature specified for callable\.$#'
count: 1
path: ../../system/Events/Events.php
-
message: '#^Class CodeIgniter\\Model has PHPDoc tag @method for method when\(\) parameter \#2 \$callback with no signature specified for callable\.$#'
count: 1
path: ../../system/Model.php
-
message: '#^Class CodeIgniter\\Model has PHPDoc tag @method for method when\(\) parameter \#3 \$defaultCallback with no signature specified for callable\.$#'
count: 1
path: ../../system/Model.php
-
message: '#^Class CodeIgniter\\Model has PHPDoc tag @method for method whenNot\(\) parameter \#2 \$callback with no signature specified for callable\.$#'
count: 1
path: ../../system/Model.php
-
message: '#^Class CodeIgniter\\Model has PHPDoc tag @method for method whenNot\(\) parameter \#3 \$defaultCallback with no signature specified for callable\.$#'
count: 1
path: ../../system/Model.php
-
message: '#^Method CodeIgniter\\Router\\RouteCollection\:\:group\(\) has parameter \$params with no signature specified for callable\.$#'
count: 1
path: ../../system/Router/RouteCollection.php
-
message: '#^Method CodeIgniter\\Router\\RouteCollection\:\:set404Override\(\) has parameter \$callable with no signature specified for callable\.$#'
count: 1
path: ../../system/Router/RouteCollection.php
-
message: '#^Method CodeIgniter\\Router\\RouteCollectionInterface\:\:set404Override\(\) has parameter \$callable with no signature specified for callable\.$#'
count: 1
path: ../../system/Router/RouteCollectionInterface.php
-
message: '#^Method CodeIgniter\\Router\\Router\:\:setMatchedRoute\(\) has parameter \$handler with no signature specified for callable\.$#'
count: 1
path: ../../system/Router/Router.php
-
message: '#^Method CodeIgniter\\View\\Parser\:\:addPlugin\(\) has parameter \$callback with no signature specified for callable\.$#'
count: 1
path: ../../system/View/Parser.php
-
message: '#^Property CodeIgniter\\View\\Table\:\:\$function type has no signature specified for callable\.$#'
count: 1
path: ../../system/View/Table.php
-
message: '#^Method CodeIgniter\\DataConverter\\DataConverterTest\:\:createDataConverter\(\) has parameter \$extractor with no signature specified for Closure\.$#'
count: 1
path: ../../tests/system/DataConverter/DataConverterTest.php
-
message: '#^Method CodeIgniter\\DataConverter\\DataConverterTest\:\:createDataConverter\(\) has parameter \$reconstructor with no signature specified for Closure\.$#'
count: 1
path: ../../tests/system/DataConverter/DataConverterTest.php

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More