Update composer dependencies #147
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/Enums/ExportFormatEnum.php#L25
Escaped Mutant for Mutator "MatchArmRemoval":
--- Original
+++ New
@@ @@
public function getWriterType() : string
{
return match ($this->value) {
- self::XLS => Excel::XLS,
self::XLSX => Excel::XLSX,
default => Excel::CSV,
};
}
}
|
php81-mysql:
src/Events/AbstractCartEvent.php#L20
Escaped Mutant for Mutator "Coalesce":
--- Original
+++ New
@@ @@
public function __construct(Cart $cart, ?User $user = null)
{
$this->cart = $cart;
- $this->user = $user ?? $cart->user;
+ $this->user = $cart->user ?? $user;
}
public function getCart() : Cart
{
|
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#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#L18
Escaped Mutant for Mutator "UnwrapArrayMerge":
--- Original
+++ New
@@ @@
}
public function rules()
{
- return array_merge(parent::rules(), ['format' => ['sometimes', 'string', Rule::in(ExportFormatEnum::getValues())]]);
+ return parent::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];
}
}
|