for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\Models\Concerns\Order;
use App\Enum\OrderStatus;
/**
* @property string $code
* @property \App\Enum\OrderStatus $status
* @property \Illuminate\Support\Carbon $schedule_date
* @property-read mixed $item_total_bundle_quantity
* @property-read mixed $item_total
*
* @see \App\Models\Order
*/
trait Attribute
{
* Return "status" attribute value.
* @return \App\Enum\OrderStatus
public function getStatusAttribute(): OrderStatus
return $this->latestStatus->status;
}
* Return "item_total_bundle_quantity" attribute value.
* @return int
public function getItemTotalBundleQuantityAttribute($value): int
$value
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public function getItemTotalBundleQuantityAttribute(/** @scrutinizer ignore-unused */ $value): int
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
return $this->items->sum->bundle_quantity;
* Return "item_total" attribute value.
* @return float
public function getItemTotalAttribute($value): float
public function getItemTotalAttribute(/** @scrutinizer ignore-unused */ $value): float
return $this->items->sum->total;
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.