yaroslawww /
laravel-quick-checkout
| 1 | <?php |
||
| 2 | |||
| 3 | namespace QuickCheckout; |
||
| 4 | |||
| 5 | use Illuminate\Contracts\Foundation\Application; |
||
| 6 | use Illuminate\Session\Store; |
||
| 7 | use QuickCheckout\Contracts\ProductInterface; |
||
| 8 | |||
| 9 | class CheckoutManager |
||
| 10 | { |
||
| 11 | |||
| 12 | /** |
||
| 13 | * The application instance. |
||
| 14 | */ |
||
| 15 | protected Application $app; |
||
| 16 | |||
| 17 | protected ?Cart $cart = null; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Create a new instance. |
||
| 21 | * |
||
| 22 | * @param Application $app |
||
| 23 | */ |
||
| 24 | 5 | public function __construct(Application $app) |
|
| 25 | { |
||
| 26 | 5 | $this->app = $app; |
|
| 27 | 5 | } |
|
| 28 | |||
| 29 | 5 | public function cart(): Cart |
|
| 30 | { |
||
| 31 | 5 | if ($this->cart) { |
|
| 32 | 1 | return $this->cart; |
|
| 33 | } |
||
| 34 | |||
| 35 | 5 | return $this->cart = $this->app->make($this->app['config']->get('quick-checkout.cart'), [ |
|
| 36 | 5 | 'session' => $this->app->make(Store::class), |
|
| 37 | 5 | 'sessionKey' => $this->app['config']->get('quick-checkout.session_key'), |
|
| 38 | 5 | 'validator' => $this->app->make($this->app['config']->get('quick-checkout.validator')), |
|
| 39 | ]); |
||
| 40 | } |
||
| 41 | |||
| 42 | 4 | public function makeLineItem(array|ProductInterface $product, int $quantity = 1, ?string $id = null): LineItem |
|
|
0 ignored issues
–
show
|
|||
| 43 | { |
||
| 44 | 4 | return $this->app->make($this->app['config']->get('quick-checkout.line_item'), [ |
|
| 45 | 4 | 'product' => $product, |
|
| 46 | 4 | 'quantity' => $quantity, |
|
| 47 | 4 | 'id' => $id, |
|
| 48 | ]); |
||
| 49 | } |
||
| 50 | } |
||
| 51 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths