Add extra fields to products #150
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/Exports/OrdersExport.php#L23
Escaped Mutant for Mutator "UnwrapArrayUnique":
--- Original
+++ New
@@ @@
foreach ($this->orders as $order) {
$this->keys = array_merge($this->keys, array_keys($order));
}
- $this->keys = array_unique($this->keys);
+ $this->keys = $this->keys;
}
public function collection()
{
|
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/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#L28
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#L29
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#L35
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];
}
}
|