mirror of
https://github.com/danog/psalm-plugin-laravel.git
synced 2024-11-26 12:24:50 +01:00
Psalm 5 support
This commit is contained in:
parent
39e4241061
commit
d142df6cf7
@ -22,7 +22,7 @@
|
||||
"illuminate/routing": "^8.0 || ^9.0",
|
||||
"illuminate/support": "^8.0 || ^9.0",
|
||||
"illuminate/view": "^8.0 || ^9.0",
|
||||
"vimeo/psalm": "^4.8.1",
|
||||
"vimeo/psalm": "^4.8.1|^5",
|
||||
"orchestra/testbench": "^6.22 || ^7.0",
|
||||
"barryvdh/laravel-ide-helper": "^2.10"
|
||||
},
|
||||
|
@ -118,10 +118,7 @@ class ModelRelationshipPropertyHandler implements
|
||||
|
||||
$relationType = $atomicType;
|
||||
|
||||
foreach ($atomicType->getChildNodes() as $childNode) {
|
||||
if (!$childNode instanceof Union) {
|
||||
continue;
|
||||
}
|
||||
foreach ($atomicType->type_params as $childNode) {
|
||||
foreach ($childNode->getAtomicTypes() as $atomicType) {
|
||||
if (!$atomicType instanceof Type\Atomic\TNamedObject) {
|
||||
continue;
|
||||
|
@ -15,9 +15,6 @@ use function strtolower;
|
||||
|
||||
class SuppressHandler implements AfterClassLikeVisitInterface
|
||||
{
|
||||
/**
|
||||
* @var array<string, list<class-string>>
|
||||
*/
|
||||
private const BY_CLASS = [
|
||||
'UnusedClass' => [
|
||||
'App\Console\Kernel',
|
||||
@ -33,18 +30,12 @@ class SuppressHandler implements AfterClassLikeVisitInterface
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
* @var array<string, array<class-string, list<string>>>
|
||||
*/
|
||||
private const BY_CLASS_METHOD = [
|
||||
'PossiblyUnusedMethod' => [
|
||||
'App\Http\Middleware\RedirectIfAuthenticated' => ['handle'],
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
* @var array<string, list<class-string>>
|
||||
*/
|
||||
private const BY_NAMESPACE = [
|
||||
'PropertyNotSetInConstructor' => [
|
||||
'App\Jobs',
|
||||
@ -55,9 +46,6 @@ class SuppressHandler implements AfterClassLikeVisitInterface
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
* @var array<string, array<class-string, list<string>>>
|
||||
*/
|
||||
private const BY_NAMESPACE_METHOD = [
|
||||
'PossiblyUnusedMethod' => [
|
||||
'App\Events' => ['broadcastOn'],
|
||||
@ -67,9 +55,6 @@ class SuppressHandler implements AfterClassLikeVisitInterface
|
||||
]
|
||||
];
|
||||
|
||||
/**
|
||||
* @var array<string, list<class-string>>
|
||||
*/
|
||||
private const BY_PARENT_CLASS = [
|
||||
'PropertyNotSetInConstructor' => [
|
||||
'Illuminate\Console\Command',
|
||||
@ -79,18 +64,12 @@ class SuppressHandler implements AfterClassLikeVisitInterface
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
* @var array<string, array<class-string, list<string>>>
|
||||
*/
|
||||
private const BY_PARENT_CLASS_PROPERTY = [
|
||||
'NonInvariantDocblockPropertyType' => [
|
||||
'Illuminate\Console\Command' => ['description'],
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
* @var array<string, array<class-string, list<string>>>
|
||||
*/
|
||||
private const BY_USED_TRAITS = [
|
||||
'PropertyNotSetInConstructor' => [
|
||||
'Illuminate\Queue\InteractsWithQueue',
|
||||
|
Loading…
Reference in New Issue
Block a user