Skip to content

Commit

Permalink
Fix PHPStan errors
Browse files Browse the repository at this point in the history
  • Loading branch information
bennothommo committed Oct 16, 2023
1 parent 5bd69b1 commit 6eda8af
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 18 deletions.
20 changes: 5 additions & 15 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ parameters:
count: 1
path: src/Database/Model.php

-
message: "#^Static property Illuminate\\\\Database\\\\Eloquent\\\\Model\\:\\:\\$dispatcher \\(Illuminate\\\\Contracts\\\\Events\\\\Dispatcher\\) in isset\\(\\) is not nullable\\.$#"
count: 1
path: src/Database/Model.php

-
message: "#^Call to an undefined method Winter\\\\Storm\\\\Database\\\\Model\\:\\:errors\\(\\)\\.$#"
count: 1
Expand Down Expand Up @@ -710,21 +715,6 @@ parameters:
count: 1
path: src/Database/TreeCollection.php

-
message: "#^Winter\\\\Storm\\\\Extension\\\\Extendable\\:\\:extendableCall\\(\\) calls parent\\:\\:__call\\(\\) but Winter\\\\Storm\\\\Extension\\\\Extendable does not extend any class\\.$#"
count: 1
path: src/Extension/Extendable.php

-
message: "#^Winter\\\\Storm\\\\Extension\\\\Extendable\\:\\:extendableGet\\(\\) calls parent\\:\\:__get\\(\\) but Winter\\\\Storm\\\\Extension\\\\Extendable does not extend any class\\.$#"
count: 1
path: src/Extension/Extendable.php

-
message: "#^Winter\\\\Storm\\\\Extension\\\\Extendable\\:\\:extendableSet\\(\\) calls parent\\:\\:__set\\(\\) but Winter\\\\Storm\\\\Extension\\\\Extendable does not extend any class\\.$#"
count: 1
path: src/Extension/Extendable.php

-
message: "#^Parameter \\#2 \\$data \\(array\\) of method Winter\\\\Storm\\\\Mail\\\\Mailer\\:\\:queue\\(\\) should be compatible with parameter \\$queue \\(string\\|null\\) of method Illuminate\\\\Contracts\\\\Mail\\\\MailQueue\\:\\:queue\\(\\)$#"
count: 1
Expand Down
3 changes: 1 addition & 2 deletions src/Database/Model.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php namespace Winter\Storm\Database;

use Cache;
use Illuminate\Support\Facades\Cache;
use Closure;
use DateTimeInterface;
use Exception;
Expand All @@ -18,7 +18,6 @@
*
* @author Alexey Bobkov, Samuel Georges
*
* @phpstan-property \Illuminate\Contracts\Events\Dispatcher|null $dispatcher
* @method static mixed extend(callable $callback, bool $scoped = false, ?object $outerScope = null)
*/
class Model extends EloquentModel implements ModelInterface
Expand Down
2 changes: 1 addition & 1 deletion src/Extension/ExtendableTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ public function extendableSet($name, $value)
*/
$parent = $this->extensionGetParentClass();
if ($parent !== false && $this->extensionMethodExists($parent, '__set')) {
return $this->extensionCallMethod($parent, '__set', [$name, $value]);
$this->extensionCallMethod($parent, '__set', [$name, $value]);
}

/*
Expand Down

0 comments on commit 6eda8af

Please sign in to comment.