Commit 353bf027 authored by Anton Smirnov's avatar Anton Smirnov
Browse files

Update code style

parent 1052a8b0
Loading
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -41,8 +41,8 @@
    "require-dev": {
        "phpunit/phpunit": "^10.5.10",
        "psy/psysh": "*",
        "sandfox.dev/code-standard": "^1.2024.07.05",
        "sandfox.dev/code-standard": "^1.2025.05.07",
        "squizlabs/php_codesniffer": "*",
        "vimeo/psalm": "^5.22"
        "vimeo/psalm": "^5.22 || ^6"
    }
}
+2 −2
Original line number Diff line number Diff line
@@ -79,7 +79,7 @@ final readonly class Calendar
    public static function fromString(string $string): Date
    {
        if (!preg_match('/^(-?\d+)-(\d+)-(\d+)$/', $string, $matches)) {
            throw new UnexpectedValueException(sprintf('Unable to parse the date string: "%s"', $string));
            throw new UnexpectedValueException(\sprintf('Unable to parse the date string: "%s"', $string));
        }

        [/* $_ */, $y, $m, $d] = $matches;
@@ -88,7 +88,7 @@ final readonly class Calendar
            return self::create(\intval($y), \intval($m), \intval($d));
        } catch (DomainException $e) {
            throw new UnexpectedValueException(
                sprintf('Unable to parse the date string: "%s". %s', $string, $e->getMessage()),
                \sprintf('Unable to parse the date string: "%s". %s', $string, $e->getMessage()),
                previous: $e,
            );
        }
+1 −1
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@ final readonly class CivilDate
        public int $switchDay,
    ) {
        if ($switchDay < CivilCalendar::MIN) {
            throw new DomainException(sprintf(
            throw new DomainException(\sprintf(
                'Switch day cannot be earlier than "200-03-01", "%s" (Julian day %d) given',
                new Date($switchDay),
                $switchDay,
+1 −1
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ trait GregorianLikeDate
    public function toString(): string
    {
        $ymd = $this->getDateArray();
        return sprintf("%d-%02d-%02d", $ymd[0], $ymd[1], $ymd[2]);
        return \sprintf('%d-%02d-%02d', $ymd[0], $ymd[1], $ymd[2]);
    }

    public function __toString(): string
+1 −1
Original line number Diff line number Diff line
@@ -92,7 +92,7 @@ final readonly class IsoWeekDate implements Stringable
    public function toString(): string
    {
        $ywd = $this->getDateArray();
        return sprintf("%d-W%02d-%d", $ywd[0], $ywd[1], $ywd[2]);
        return \sprintf('%d-W%02d-%d', $ywd[0], $ywd[1], $ywd[2]);
    }

    public function __toString(): string
Loading