Skip to content

Commit

Permalink
dev: PHPStan updated to v1.12.11
Browse files Browse the repository at this point in the history
  • Loading branch information
LastDragon-ru committed Nov 23, 2024
1 parent ebc708f commit dd89d91
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 5 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
"illuminate/config": "^10.34.0|^11.0.0",
"laravel/scout": "^9.8.0|^10.0.0",
"orchestra/testbench": "^8.0.0|^9.0.0",
"phpstan/phpstan": "1.12.7",
"phpstan/phpstan": "1.12.11",
"phpstan/phpstan-mockery": "^1.1",
"phpstan/phpstan-phpunit": "^1.3",
"phpstan/phpstan-strict-rules": "^1.5",
Expand Down
3 changes: 3 additions & 0 deletions packages/documentator/src/Markdown/Nodes/Generated/Block.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
*/
class Block extends AbstractBlock {
public function __construct(
/**
* @var non-empty-string
*/
public readonly string $id,
) {
parent::__construct();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ class ParserContinue implements BlockContinueParserInterface {
*/
private array $lines;

/**
* @param non-empty-string $line
* @param non-empty-string $id
*/
public function __construct(string $line, string $id, private int $padding) {
$this->block = new Block($id);
$this->lines = [$line];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ public function tryStart(Cursor $cursor, MarkdownParserStateInterface $parserSta

if (
!(preg_match('!^\[//]: # \(start: ([^)]+)\)($|\R)!u', $cursor->getRemainder(), $matches) > 0)
|| !isset($matches[0])
|| !isset($matches[1])
|| $matches[0] === ''
) {
return BlockStart::none();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ public function create(string $string, ?Closure $resolver = null): ?Link {
$string = trim($string);

if (preg_match($regexp, $string, $matches, PREG_UNMATCHED_AS_NULL) > 0) {
$class = $matches['class'] ?? null;
$class = $class !== null && $resolver !== null
$class = $matches['class'];
$class = $resolver !== null
? $resolver($class)
: $class;

Expand Down
15 changes: 15 additions & 0 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,21 @@ parameters:
count: 1
path: packages/graphql/src/Stream/Directives/DirectiveTest.php

-
message: "#^Method LastDragon_ru\\\\LaraASP\\\\GraphQL\\\\Stream\\\\Streams\\\\Database\\:\\:getCollection\\(\\) should return Illuminate\\\\Support\\\\Collection\\<\\(int\\|string\\), Illuminate\\\\Database\\\\Eloquent\\\\Model\\|stdClass\\> but returns Illuminate\\\\Database\\\\Eloquent\\\\Collection\\<int, Illuminate\\\\Database\\\\Eloquent\\\\Model\\>\\|Illuminate\\\\Support\\\\Collection\\<\\(int\\|string\\), Illuminate\\\\Database\\\\Eloquent\\\\Model\\|stdClass\\>\\.$#"
count: 1
path: packages/graphql/src/Stream/Streams/Database.php

-
message: "#^Property LastDragon_ru\\\\LaraASP\\\\GraphQL\\\\Stream\\\\Streams\\\\Database\\:\\:\\$collection \\(Illuminate\\\\Support\\\\Collection\\<\\(int\\|string\\), Illuminate\\\\Database\\\\Eloquent\\\\Model\\|stdClass\\>\\|null\\) does not accept Illuminate\\\\Database\\\\Eloquent\\\\Collection\\<int, Illuminate\\\\Database\\\\Eloquent\\\\Model\\>\\.$#"
count: 1
path: packages/graphql/src/Stream/Streams/Database.php

-
message: "#^Property LastDragon_ru\\\\LaraASP\\\\GraphQL\\\\Stream\\\\Streams\\\\Database\\:\\:\\$collection \\(Illuminate\\\\Support\\\\Collection\\<\\(int\\|string\\), Illuminate\\\\Database\\\\Eloquent\\\\Model\\|stdClass\\>\\|null\\) is never assigned Illuminate\\\\Support\\\\Collection\\<\\(int\\|string\\), Illuminate\\\\Database\\\\Eloquent\\\\Model\\|stdClass\\> so it can be removed from the property type\\.$#"
count: 1
path: packages/graphql/src/Stream/Streams/Database.php

-
message: "#^Static property LastDragon_ru\\\\LaraASP\\\\GraphQL\\\\Testing\\\\Package\\\\Directives\\\\ExposeBuilderDirective\\:\\:\\$result \\(Illuminate\\\\Database\\\\Eloquent\\\\Builder\\<Illuminate\\\\Database\\\\Eloquent\\\\Model\\>\\|Illuminate\\\\Database\\\\Eloquent\\\\Relations\\\\Relation\\<Illuminate\\\\Database\\\\Eloquent\\\\Model, covariant Illuminate\\\\Database\\\\Eloquent\\\\Model, mixed\\>\\|Illuminate\\\\Database\\\\Query\\\\Builder\\|Laravel\\\\Scout\\\\Builder\\<Illuminate\\\\Database\\\\Eloquent\\\\Model\\>\\|null\\) does not accept Illuminate\\\\Database\\\\Eloquent\\\\Builder\\<Illuminate\\\\Database\\\\Eloquent\\\\Model\\>\\|Illuminate\\\\Database\\\\Eloquent\\\\Relations\\\\Relation\\<Illuminate\\\\Database\\\\Eloquent\\\\Model\\>\\|Illuminate\\\\Database\\\\Query\\\\Builder\\|Laravel\\\\Scout\\\\Builder\\.$#"
count: 1
Expand Down

0 comments on commit dd89d91

Please sign in to comment.