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
2 changes: 1 addition & 1 deletion system/Cache/Handlers/RedisHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ public function deleteMatching(string $pattern)
$iterator = null;

do {
/** @var false|list<string>|Redis $keys */
/** @var false|list<string> $keys */
$keys = $this->redis->scan($iterator, $pattern);

if (is_array($keys)) {
Expand Down
5 changes: 1 addition & 4 deletions system/Commands/Generators/MigrationGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,7 @@ protected function prepare(string $class): string
$data['DBGroup'] = is_string($DBGroup) ? $DBGroup : 'default';
$data['DBDriver'] = config(Database::class)->{$data['DBGroup']}['DBDriver'];

/** @var SessionConfig|null $session */
$session = config(SessionConfig::class);

$data['matchIP'] = $session->matchIP;
$data['matchIP'] = config(SessionConfig::class)->matchIP;
}

return $this->parseTemplate($class, [], [], $data);
Expand Down
4 changes: 1 addition & 3 deletions system/HTTP/CURLRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,7 @@ public function __construct(App $config, URI $uri, ?ResponseInterface $response
$this->baseURI = $uri->useRawQueryString();
$this->defaultOptions = $options;

/** @var ConfigCURLRequest|null $configCURLRequest */
$configCURLRequest = config(ConfigCURLRequest::class);
$this->shareOptions = $configCURLRequest->shareOptions ?? true;
$this->shareOptions = config(ConfigCURLRequest::class)->shareOptions ?? true;

$this->config = $this->defaultConfig;
$this->parseOptions($options);
Expand Down
2 changes: 1 addition & 1 deletion system/I18n/TimeTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
trait TimeTrait
{
/**
* @var DateTimeZone
* @var DateTimeZone|string
*/
protected $timezone;

Expand Down
3 changes: 1 addition & 2 deletions system/Test/ReflectionHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ trait ReflectionHelper
* @param object|string $obj object or class name
* @param string $method method name
*
* @return Closure
* @phpstan-return Closure(mixed ...$args): mixed
* @return Closure(mixed ...$args): mixed
*
* @throws ReflectionException
*/
Expand Down
8 changes: 6 additions & 2 deletions tests/system/Commands/Utilities/ConfigCheckTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ public function testCommandConfigCheckNonexistentClass(): void

public function testConfigCheckWithKintEnabledUsesKintD(): void
{
/** @var Closure(object): string $command */
/**
* @var Closure(mixed...): string
*/
$command = $this->getPrivateMethodInvoker(
new ConfigCheck(service('logger'), service('commands')),
'getKintD',
Expand All @@ -105,7 +107,9 @@ public function testConfigCheckWithKintEnabledUsesKintD(): void

public function testConfigCheckWithKintDisabledUsesVarDump(): void
{
/** @var Closure(object): string $command */
/**
* @var Closure(mixed...): string
*/
$command = $this->getPrivateMethodInvoker(
new ConfigCheck(service('logger'), service('commands')),
'getVarDump',
Expand Down
32 changes: 1 addition & 31 deletions utils/phpstan-baseline/varTag.type.neon
Original file line number Diff line number Diff line change
@@ -1,37 +1,7 @@
# total 9 errors
# total 2 errors

parameters:
ignoreErrors:
-
message: '#^PHPDoc tag @var with type list\<string\>\|Redis\|false is not subtype of type array\<int, string\>\|false\.$#'
count: 1
path: ../../system/Cache/Handlers/RedisHandler.php

-
message: '#^PHPDoc tag @var with type Config\\Session\|null is not subtype of type Config\\Session\.$#'
count: 1
path: ../../system/Commands/Generators/MigrationGenerator.php

-
message: '#^PHPDoc tag @var with type Config\\CURLRequest\|null is not subtype of type Config\\CURLRequest\.$#'
count: 1
path: ../../system/HTTP/CURLRequest.php

-
message: '#^PHPDoc tag @var with type string is not subtype of type DateTimeZone\.$#'
count: 1
path: ../../system/I18n/Time.php

-
message: '#^PHPDoc tag @var with type string is not subtype of type DateTimeZone\.$#'
count: 1
path: ../../system/I18n/TimeLegacy.php

-
message: '#^PHPDoc tag @var with type Closure\(object\)\: string is not subtype of type Closure\(mixed \.\.\.\)\: mixed\.$#'
count: 2
path: ../../tests/system/Commands/Utilities/ConfigCheckTest.php

-
message: '#^PHPDoc tag @var with type Tests\\Support\\Entity\\UserWithCasts is not subtype of type list\<array\{\}\>\|null\.$#'
count: 1
Expand Down
Loading