Added phpstan #3
phpstan.yml
on: pull_request
php82-laravel-latest-phpstan-postgres
1m 21s
Annotations
10 errors and 2 warnings
php82-laravel-latest-phpstan-postgres:
src/Services/CouponService.php#L254
Method EscolaLms\Vouchers\Services\CouponService::cartItemsIncludedInCoupon() should return Illuminate\Support\Collection<int, Treestoneit\ShoppingCart\Models\CartItem> but returns iterable<EscolaLms\Vouchers\Models\CartItem>&Treestoneit\ShoppingCart\Models\CartItemCollection.
|
php82-laravel-latest-phpstan-postgres:
src/Services/CouponService.php#L254
Parameter #1 $callback of method Illuminate\Support\Collection<(int|string),Illuminate\Database\Eloquent\Model>::filter() expects (callable(Illuminate\Database\Eloquent\Model, int|string): bool)|null, Closure(Treestoneit\ShoppingCart\Models\CartItem): bool given.
|
php82-laravel-latest-phpstan-postgres:
src/Services/CouponService.php#L282
Return type (Illuminate\Support\Collection<int, Treestoneit\ShoppingCart\Models\CartItem>) of method EscolaLms\Vouchers\Services\CouponService::cartItemsWithoutExcludedFromCoupon() should be compatible with return type (Illuminate\Support\Collection<int, EscolaLms\Vouchers\Models\CartItem>) of method EscolaLms\Vouchers\Services\Contracts\CouponServiceContract::cartItemsWithoutExcludedFromCoupon()
|
php82-laravel-latest-phpstan-postgres:
src/Services/CouponService.php#L284
Method EscolaLms\Vouchers\Services\CouponService::cartItemsWithoutExcludedFromCoupon() should return Illuminate\Support\Collection<int, Treestoneit\ShoppingCart\Models\CartItem> but returns iterable<EscolaLms\Vouchers\Models\CartItem>&Treestoneit\ShoppingCart\Models\CartItemCollection.
|
php82-laravel-latest-phpstan-postgres:
src/Services/CouponService.php#L284
Parameter #1 $callback of method Illuminate\Support\Collection<(int|string),Illuminate\Database\Eloquent\Model>::filter() expects (callable(Illuminate\Database\Eloquent\Model, int|string): bool)|null, Closure(Treestoneit\ShoppingCart\Models\CartItem): bool given.
|
php82-laravel-latest-phpstan-postgres:
src/Services/CouponService.php#L294
Parameter #1 $callback of method Illuminate\Support\Collection<(int|string),Illuminate\Database\Eloquent\Model>::filter() expects (callable(Illuminate\Database\Eloquent\Model, int|string): bool)|null, Closure(Treestoneit\ShoppingCart\Models\CartItem): bool given.
|
php82-laravel-latest-phpstan-postgres:
src/Services/OrderService.php#L18
Method EscolaLms\Vouchers\Services\OrderService::find() has parameter $id with no type specified.
|
php82-laravel-latest-phpstan-postgres:
src/Services/OrderService.php#L20
Method EscolaLms\Vouchers\Services\OrderService::find() should return EscolaLms\Vouchers\Models\Order but returns Illuminate\Database\Eloquent\Collection<int, Illuminate\Database\Eloquent\Model>|Illuminate\Database\Eloquent\Model.
|
php82-laravel-latest-phpstan-postgres:
src/Services/OrderService.php#L31
Parameter #1 $cart of class EscolaLms\Vouchers\Services\CartManager constructor expects EscolaLms\Cart\Models\Cart, Treestoneit\ShoppingCart\Models\Cart given.
|
php82-laravel-latest-phpstan-postgres:
src/Services/OrderService.php#L35
Access to an undefined property Illuminate\Database\Eloquent\Collection<int, Illuminate\Database\Eloquent\Model>|Illuminate\Database\Eloquent\Model::$coupon_id.
|
php82-laravel-latest-phpstan-postgres
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
php82-laravel-latest-phpstan-postgres
The following actions uses Node.js version which is deprecated and will be forced to run on node20: actions/checkout@v2. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|