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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 29 additions & 1 deletion .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,35 @@
__DIR__ . '/spark',
]);

$overrides = [];
$overrides = [
'phpdoc_no_alias_tag' => [
'replacements' => [
'type' => 'var',
'link' => 'see',
],
],
'phpdoc_align' => [
'align' => 'vertical',
'spacing' => 1,
'tags' => [
'method',
'param',
'phpstan-assert',
'phpstan-assert-if-true',
'phpstan-assert-if-false',
'phpstan-param',
'phpstan-property',
'phpstan-return',
'property',
'property-read',
'property-write',
'return',
'throws',
'type',
'var',
],
],
];

$options = [
'cacheFile' => 'build/.php-cs-fixer.cache',
Expand Down
10 changes: 0 additions & 10 deletions phpstan-baseline.php
Original file line number Diff line number Diff line change
Expand Up @@ -1026,16 +1026,6 @@
'count' => 1,
'path' => __DIR__ . '/system/Database/Config.php',
];
$ignoreErrors[] = [
'message' => '#^Access to an undefined property CodeIgniter\\\\Database\\\\ConnectionInterface\\:\\:\\$DBDriver\\.$#',
'count' => 2,
'path' => __DIR__ . '/system/Database/Database.php',
];
$ignoreErrors[] = [
'message' => '#^Access to an undefined property CodeIgniter\\\\Database\\\\ConnectionInterface\\:\\:\\$connID\\.$#',
'count' => 2,
'path' => __DIR__ . '/system/Database/Database.php',
];
$ignoreErrors[] = [
'message' => '#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#',
'count' => 2,
Expand Down
54 changes: 27 additions & 27 deletions system/Database/BaseConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,33 +18,33 @@
use Throwable;

/**
* @property array $aliasedTables
* @property string $charset
* @property bool $compress
* @property float $connectDuration
* @property float $connectTime
* @property string $database
* @property string $DBCollat
* @property bool $DBDebug
* @property string $DBDriver
* @property string $DBPrefix
* @property string $DSN
* @property array|bool $encrypt
* @property array $failover
* @property string $hostname
* @property Query $lastQuery
* @property string $password
* @property bool $pConnect
* @property int|string $port
* @property bool $pretend
* @property string $queryClass
* @property array $reservedIdentifiers
* @property bool $strictOn
* @property string $subdriver
* @property string $swapPre
* @property int $transDepth
* @property bool $transFailure
* @property bool $transStatus
* @property-read array $aliasedTables
* @property-read string $charset
* @property-read bool $compress
* @property-read float $connectDuration
* @property-read float $connectTime
* @property-read string $database
* @property-read string $DBCollat
* @property-read bool $DBDebug
* @property-read string $DBDriver
* @property-read string $DBPrefix
* @property-read string $DSN
* @property-read array|bool $encrypt
* @property-read array $failover
* @property-read string $hostname
* @property-read Query $lastQuery
* @property-read string $password
* @property-read bool $pConnect
* @property-read int|string $port
* @property-read bool $pretend
* @property-read string $queryClass
* @property-read array $reservedIdentifiers
* @property-read bool $strictOn
* @property-read string $subdriver
* @property-read string $swapPre
* @property-read int $transDepth
* @property-read bool $transFailure
* @property-read bool $transStatus
*
* @template TConnection
* @template TResult
Expand Down
3 changes: 3 additions & 0 deletions system/Database/ConnectionInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
/**
* @template TConnection
* @template TResult
*
* @property false|object|resource $connID
* @property-read string $DBDriver
*/
interface ConnectionInterface
{
Expand Down