We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ee85576 commit 16e4e3eCopy full SHA for 16e4e3e
src/SpatieLaravelData/Rules/ValidTypeRule.php
@@ -60,6 +60,8 @@ public function processNode(Node $node, Scope $scope): array
60
// Flatten from a list of calls pr. file, to just a list of calls.
61
->flatten(1)
62
->map(Call::unserialize(...))
63
+ // Make sure the rule does not crash in case a specific data class has not been analyzed - This can happen with data classes in the vendor folder
64
+ ->filter(fn (Call $call) => isset($classCollector[$call->target]))
65
// Check each call for errors
66
->map(fn (Call $call) => $this->compareTypes($call, $castCollector, $classCollector[$call->target]))
67
// Flatten from a list of errors pr. call, to just a list of errors.
0 commit comments