mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-24 16:04:21 +00:00
PHP had no regression coverage. Adds a php-app fixture (Composer + Pest) with language, run and debug smoke cases, and a php entry in the Language smoke workflow: PHP 8.5 with Xdebug via setup-php, Intelephense pinned like the other servers. Other languages' selectors are unchanged. Co-authored-by: lleviathe <95321986+lleviathe@users.noreply.github.com>
24 lines
396 B
PHP
24 lines
396 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Shipping;
|
|
|
|
final readonly class Charges
|
|
{
|
|
public function __construct(
|
|
public int $vatCents,
|
|
public int $feeCents,
|
|
) {}
|
|
|
|
public static function dutyFree(): self
|
|
{
|
|
return new self(0, 0);
|
|
}
|
|
|
|
public function isDutyFree(): bool
|
|
{
|
|
return $this->vatCents === 0 && $this->feeCents === 0;
|
|
}
|
|
}
|