-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpstan.neon
More file actions
48 lines (41 loc) · 2.06 KB
/
phpstan.neon
File metadata and controls
48 lines (41 loc) · 2.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
includes:
- vendor/larastan/larastan/extension.neon
# - phpstan-baseline.neon
parameters:
level: 6
paths:
- src
excludePaths:
- vendor
reportUnmatchedIgnoredErrors: false
ignoreErrors:
# Traits used via "use" statements aren't directly instantiated
- '#^Trait .+ is used zero times and is not analysed\.$#'
# BillableInterface is from external package, getMorphClass() is Laravel magic
- '#^Call to an undefined method Vatly\\Fluent\\Contracts\\BillableInterface::getMorphClass\(\)\.$#'
# Static factory methods on exceptions are safe
-
message: '#^Unsafe usage of new static\(\)\.$#'
path: src/Exceptions/*
-
message: '#^Unsafe usage of new static\(\)\.$#'
path: src/VatlyApiActions/*Response.php
# API package returns BaseResource, runtime type is correct
-
message: '#^Parameter .+ expects .+, Vatly\\API\\Resources\\BaseResource.* given\.$#'
path: src/VatlyApiActions/*
# MorphTo covariance is a known Larastan limitation
-
message: '#^Method Vatly\\Laravel\\Models\\Order::owner\(\) should return Illuminate\\Database\\Eloquent\\Relations\\MorphTo.+ but returns .+\.$#'
path: src/Models/Order.php
-
message: '#^Method Vatly\\Laravel\\Models\\Subscription::owner\(\) should return Illuminate\\Database\\Eloquent\\Relations\\MorphTo.+ but returns .+\.$#'
path: src/Models/Subscription.php
# Model uses Billable trait which adds vatlyId() method
-
message: '#^Call to an undefined method Illuminate\\Database\\Eloquent\\Model::vatlyId\(\)\.$#'
path: src/Builders/CheckoutBuilder.php
# getOwner() returns Model with Billable trait (implements BillableInterface at runtime)
-
message: '#^Method .+::getOwner\(\) should return Vatly\\Fluent\\Contracts\\BillableInterface but returns Illuminate\\Database\\Eloquent\\Model\|null\.$#'
path: src/Models/Order.php