Skip to content

Update mutation.yml #145

Update mutation.yml

Update mutation.yml #145

Triggered via pull request March 22, 2024 09:17
Status Success
Total duration 4m 54s
Artifacts

mutation.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

12 warnings
php81-mysql
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
php81-mysql
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/
php81-mysql: src/Console/Commands/AbandonedCart.php#L26
Escaped Mutant for Mutator "DecrementInteger": --- Original +++ New @@ @@ } public function handle() { - $abandonedCarts = $this->shopService->getAbandonedCarts(Carbon::now()->subHours(24), Carbon::now()); + $abandonedCarts = $this->shopService->getAbandonedCarts(Carbon::now()->subHours(23), Carbon::now()); foreach ($abandonedCarts as $abandonedCart) { event(new AbandonedCartEvent($abandonedCart)); } } }
php81-mysql: src/Enums/ExportFormatEnum.php#L25
Escaped Mutant for Mutator "MatchArmRemoval": --- Original +++ New @@ @@ { return match ($this->value) { self::XLS => Excel::XLS, - self::XLSX => Excel::XLSX, default => Excel::CSV, }; } }
php81-mysql: src/Http/Requests/Admin/OrderExportRequest.php#L19
Escaped Mutant for Mutator "ArrayItemRemoval": --- Original +++ New @@ @@ } public function rules() { - return array_merge(parent::rules(), ['format' => ['sometimes', 'string', Rule::in(ExportFormatEnum::getValues())]]); + return array_merge(parent::rules(), ['format' => ['string', Rule::in(ExportFormatEnum::getValues())]]); } }
php81-mysql: src/Http/Resources/OrderExportResource.php#L30
Escaped Mutant for Mutator "ArrayItem": --- Original +++ New @@ @@ } public function toArray($request) : array { - return ['id' => $this->resource->getKey(), 'status' => OrderStatus::getName($this->status), 'items' => OrderItemExportResource::collection($this->getOrder()->items), 'total' => $this->total, 'subtotal' => $this->subtotal, 'tax' => $this->tax, 'created_at' => $this->created_at, 'user_id' => $this->user_id, 'client_name' => $this->client_name, 'client_email' => $this->client_email, 'client_street' => $this->client_street, 'client_street_number' => $this->client_street_number, 'client_postal' => $this->client_postal, 'client_city' => $this->client_city, 'client_country' => $this->client_country, 'client_company' => $this->client_company, 'client_taxid' => $this->client_taxid]; + return ['id' => $this->resource->getKey(), 'status' => OrderStatus::getName($this->status), 'items' => OrderItemExportResource::collection($this->getOrder()->items), 'total' => $this->total, 'subtotal' => $this->subtotal, 'tax' => $this->tax, 'created_at' > $this->created_at, 'user_id' => $this->user_id, 'client_name' => $this->client_name, 'client_email' => $this->client_email, 'client_street' => $this->client_street, 'client_street_number' => $this->client_street_number, 'client_postal' => $this->client_postal, 'client_city' => $this->client_city, 'client_country' => $this->client_country, 'client_company' => $this->client_company, 'client_taxid' => $this->client_taxid]; } }
php81-mysql: src/Http/Resources/OrderExportResource.php#L31
Escaped Mutant for Mutator "ArrayItem": --- Original +++ New @@ @@ } public function toArray($request) : array { - return ['id' => $this->resource->getKey(), 'status' => OrderStatus::getName($this->status), 'items' => OrderItemExportResource::collection($this->getOrder()->items), 'total' => $this->total, 'subtotal' => $this->subtotal, 'tax' => $this->tax, 'created_at' => $this->created_at, 'user_id' => $this->user_id, 'client_name' => $this->client_name, 'client_email' => $this->client_email, 'client_street' => $this->client_street, 'client_street_number' => $this->client_street_number, 'client_postal' => $this->client_postal, 'client_city' => $this->client_city, 'client_country' => $this->client_country, 'client_company' => $this->client_company, 'client_taxid' => $this->client_taxid]; + return ['id' => $this->resource->getKey(), 'status' => OrderStatus::getName($this->status), 'items' => OrderItemExportResource::collection($this->getOrder()->items), 'total' => $this->total, 'subtotal' => $this->subtotal, 'tax' => $this->tax, 'created_at' => $this->created_at, 'user_id' > $this->user_id, 'client_name' => $this->client_name, 'client_email' => $this->client_email, 'client_street' => $this->client_street, 'client_street_number' => $this->client_street_number, 'client_postal' => $this->client_postal, 'client_city' => $this->client_city, 'client_country' => $this->client_country, 'client_company' => $this->client_company, 'client_taxid' => $this->client_taxid]; } }
php81-mysql: src/Http/Resources/OrderExportResource.php#L33
Escaped Mutant for Mutator "ArrayItem": --- Original +++ New @@ @@ } public function toArray($request) : array { - return ['id' => $this->resource->getKey(), 'status' => OrderStatus::getName($this->status), 'items' => OrderItemExportResource::collection($this->getOrder()->items), 'total' => $this->total, 'subtotal' => $this->subtotal, 'tax' => $this->tax, 'created_at' => $this->created_at, 'user_id' => $this->user_id, 'client_name' => $this->client_name, 'client_email' => $this->client_email, 'client_street' => $this->client_street, 'client_street_number' => $this->client_street_number, 'client_postal' => $this->client_postal, 'client_city' => $this->client_city, 'client_country' => $this->client_country, 'client_company' => $this->client_company, 'client_taxid' => $this->client_taxid]; + return ['id' => $this->resource->getKey(), 'status' => OrderStatus::getName($this->status), 'items' => OrderItemExportResource::collection($this->getOrder()->items), 'total' => $this->total, 'subtotal' => $this->subtotal, 'tax' => $this->tax, 'created_at' => $this->created_at, 'user_id' => $this->user_id, 'client_name' => $this->client_name, 'client_email' > $this->client_email, 'client_street' => $this->client_street, 'client_street_number' => $this->client_street_number, 'client_postal' => $this->client_postal, 'client_city' => $this->client_city, 'client_country' => $this->client_country, 'client_company' => $this->client_company, 'client_taxid' => $this->client_taxid]; } }
php81-mysql: src/Http/Resources/OrderExportResource.php#L34
Escaped Mutant for Mutator "ArrayItem": --- Original +++ New @@ @@ } public function toArray($request) : array { - return ['id' => $this->resource->getKey(), 'status' => OrderStatus::getName($this->status), 'items' => OrderItemExportResource::collection($this->getOrder()->items), 'total' => $this->total, 'subtotal' => $this->subtotal, 'tax' => $this->tax, 'created_at' => $this->created_at, 'user_id' => $this->user_id, 'client_name' => $this->client_name, 'client_email' => $this->client_email, 'client_street' => $this->client_street, 'client_street_number' => $this->client_street_number, 'client_postal' => $this->client_postal, 'client_city' => $this->client_city, 'client_country' => $this->client_country, 'client_company' => $this->client_company, 'client_taxid' => $this->client_taxid]; + return ['id' => $this->resource->getKey(), 'status' => OrderStatus::getName($this->status), 'items' => OrderItemExportResource::collection($this->getOrder()->items), 'total' => $this->total, 'subtotal' => $this->subtotal, 'tax' => $this->tax, 'created_at' => $this->created_at, 'user_id' => $this->user_id, 'client_name' => $this->client_name, 'client_email' => $this->client_email, 'client_street' > $this->client_street, 'client_street_number' => $this->client_street_number, 'client_postal' => $this->client_postal, 'client_city' => $this->client_city, 'client_country' => $this->client_country, 'client_company' => $this->client_company, 'client_taxid' => $this->client_taxid]; } }
php81-mysql: src/Http/Resources/OrderExportResource.php#L39
Escaped Mutant for Mutator "ArrayItem": --- Original +++ New @@ @@ } public function toArray($request) : array { - return ['id' => $this->resource->getKey(), 'status' => OrderStatus::getName($this->status), 'items' => OrderItemExportResource::collection($this->getOrder()->items), 'total' => $this->total, 'subtotal' => $this->subtotal, 'tax' => $this->tax, 'created_at' => $this->created_at, 'user_id' => $this->user_id, 'client_name' => $this->client_name, 'client_email' => $this->client_email, 'client_street' => $this->client_street, 'client_street_number' => $this->client_street_number, 'client_postal' => $this->client_postal, 'client_city' => $this->client_city, 'client_country' => $this->client_country, 'client_company' => $this->client_company, 'client_taxid' => $this->client_taxid]; + return ['id' => $this->resource->getKey(), 'status' => OrderStatus::getName($this->status), 'items' => OrderItemExportResource::collection($this->getOrder()->items), 'total' => $this->total, 'subtotal' => $this->subtotal, 'tax' => $this->tax, 'created_at' => $this->created_at, 'user_id' => $this->user_id, 'client_name' => $this->client_name, 'client_email' => $this->client_email, 'client_street' => $this->client_street, 'client_street_number' => $this->client_street_number, 'client_postal' => $this->client_postal, 'client_city' => $this->client_city, 'client_country' => $this->client_country, 'client_company' > $this->client_company, 'client_taxid' => $this->client_taxid]; } }
php81-mysql: src/Jobs/RenewRecursiveProductUser.php#L47
Escaped Mutant for Mutator "ArrayItemRemoval": --- Original +++ New @@ @@ $product = Product::find($this->productUser->product_id); $user = User::find($this->productUser->user_id); /** @var Order $order */ - $order = $user->orders()->whereIn('status', [OrderStatus::PAID, OrderStatus::TRIAL_PAID])->whereRelation('items', fn(Builder $query) => $query->whereMorphRelation('buyable', [Product::class], 'buyable_id', '=', $product->getKey()))->orderBy('created_at', 'desc')->first(); + $order = $user->orders()->whereIn('status', [OrderStatus::PAID, OrderStatus::TRIAL_PAID])->whereRelation('items', fn(Builder $query) => $query->whereMorphRelation('buyable', [], 'buyable_id', '=', $product->getKey()))->orderBy('created_at', 'desc')->first(); $prevPayment = $order->payments()->whereIn('status', [PaymentStatus::PAID(), PaymentStatus::REFUNDED()])->orderBy('created_at', 'desc')->first(); $newOrder = $orderService->createOrderFromProduct($product, $user->getKey(), $this->getClientDetailsDto($order)); $paymentProcessor = $newOrder->process();
php81-mysql: src/Jobs/RenewRecursiveProductUser.php#L61
Escaped Mutant for Mutator "ArrayItemRemoval": --- Original +++ New @@ @@ $prevPayment = $order->payments()->whereIn('status', [PaymentStatus::PAID(), PaymentStatus::REFUNDED()])->orderBy('created_at', 'desc')->first(); $newOrder = $orderService->createOrderFromProduct($product, $user->getKey(), $this->getClientDetailsDto($order)); $paymentProcessor = $newOrder->process(); - $parameters = ['return_url' => url('/'), 'email' => $user->email, 'type' => $product->type, 'gateway' => $prevPayment->driver, 'gateway_order_id' => $prevPayment->gateway_order_id]; + $parameters = ['email' => $user->email, 'type' => $product->type, 'gateway' => $prevPayment->driver, 'gateway_order_id' => $prevPayment->gateway_order_id]; if (ProductType::isSubscriptionType($product->type)) { $parameters += $product->getSubscriptionParameters(); }