Skip to content

Update mutation.yml (#143) #146

Update mutation.yml (#143)

Update mutation.yml (#143) #146

Triggered via push March 22, 2024 09:32
Status Success
Total duration 4m 55s
Artifacts

mutation.yml

on: push
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/Exceptions/OrderNotFoundException.php#L9
Escaped Mutant for Mutator "DecrementInteger": --- Original +++ New @@ @@ use Throwable; class OrderNotFoundException extends UnprocessableEntityHttpException { - public function __construct($message = "Order Not Found", $code = 422, ?Throwable $previous = null) + public function __construct($message = "Order Not Found", $code = 421, ?Throwable $previous = null) { parent::__construct($message, $previous, $code); } }
php81-mysql: src/Exports/OrdersExport.php#L20
Escaped Mutant for Mutator "UnwrapArrayMerge": --- Original +++ New @@ @@ { $this->orders = json_decode(OrderExportResource::collection($orders)->toJson(), true); foreach ($this->orders as $order) { - $this->keys = array_merge($this->keys, array_keys($order)); + $this->keys = $this->keys; } $this->keys = array_unique($this->keys); }
php81-mysql: src/Exports/OrdersExport.php#L31
Escaped Mutant for Mutator "Coalesce": --- Original +++ New @@ @@ return collect($this->orders)->map(function ($order) { $result = []; foreach ($this->keys as $key) { - $result[$key] = $order[$key] ?? ''; + $result[$key] = '' ?? $order[$key]; } return $result; });
php81-mysql: src/Http/Requests/Admin/OrderExportRequest.php#L13
Escaped Mutant for Mutator "LogicalAnd": --- Original +++ New @@ @@ { public function authorize() { - return $this->user('api') && $this->user('api')->can('export', Order::class); + return $this->user('api') || $this->user('api')->can('export', Order::class); } public function rules() {
php81-mysql: src/Http/Resources/OrderExportResource.php#L16
Escaped Mutant for Mutator "ProtectedVisibility": --- Original +++ New @@ @@ { parent::__construct($order); } - protected function getOrder() : Order + private function getOrder() : Order { return $this->resource; }
php81-mysql: src/Http/Resources/OrderExportResource.php#L27
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#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#L36
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/Http/Resources/OrderExportResource.php#L40
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]; } }