Skip to content

Commit

Permalink
Update ECS & dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
BenMorel committed Apr 1, 2024
1 parent 052b0f2 commit f01ca66
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 22 deletions.
12 changes: 6 additions & 6 deletions src/LocalDate.php
Original file line number Diff line number Diff line change
Expand Up @@ -786,13 +786,13 @@ public function toISOString(): string
{
// This code is optimized for high performance
return ($this->year < 1000 && $this->year > -1000
? (
$this->year < 0
? '-' . str_pad((string) -$this->year, 4, '0', STR_PAD_LEFT)
: str_pad((string) $this->year, 4, '0', STR_PAD_LEFT)
)
: $this->year
? (
$this->year < 0
? '-' . str_pad((string) -$this->year, 4, '0', STR_PAD_LEFT)
: str_pad((string) $this->year, 4, '0', STR_PAD_LEFT)
)
: $this->year
)
. '-'
. ($this->month < 10 ? '0' . $this->month : $this->month)
. '-'
Expand Down
2 changes: 1 addition & 1 deletion src/Month.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/**
* Represents a month-of-year such as January.
*/
enum Month : int implements JsonSerializable
enum Month: int implements JsonSerializable
{
case JANUARY = 1;
case FEBRUARY = 2;
Expand Down
12 changes: 6 additions & 6 deletions src/YearMonth.php
Original file line number Diff line number Diff line change
Expand Up @@ -320,13 +320,13 @@ public function toISOString(): string
{
// This code is optimized for high performance
return ($this->year < 1000 && $this->year > -1000
? (
$this->year < 0
? '-' . str_pad((string) -$this->year, 4, '0', STR_PAD_LEFT)
: str_pad((string) $this->year, 4, '0', STR_PAD_LEFT)
)
: $this->year
? (
$this->year < 0
? '-' . str_pad((string) -$this->year, 4, '0', STR_PAD_LEFT)
: str_pad((string) $this->year, 4, '0', STR_PAD_LEFT)
)
: $this->year
)
. '-'
. ($this->month < 10 ? '0' . $this->month : $this->month);
}
Expand Down
12 changes: 6 additions & 6 deletions src/YearWeek.php
Original file line number Diff line number Diff line change
Expand Up @@ -314,13 +314,13 @@ public function toISOString(): string
{
// This code is optimized for high performance
return ($this->year < 1000 && $this->year > -1000
? (
$this->year < 0
? '-' . str_pad((string) -$this->year, 4, '0', STR_PAD_LEFT)
: str_pad((string) $this->year, 4, '0', STR_PAD_LEFT)
)
: $this->year
? (
$this->year < 0
? '-' . str_pad((string) -$this->year, 4, '0', STR_PAD_LEFT)
: str_pad((string) $this->year, 4, '0', STR_PAD_LEFT)
)
: $this->year
)
. '-W'
. ($this->week < 10 ? '0' . $this->week : $this->week);
}
Expand Down
6 changes: 3 additions & 3 deletions tools/ecs/composer.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"require": {
"symplify/easy-coding-standard": "^10.3",
"slevomat/coding-standard": "^7.2",
"squizlabs/php_codesniffer": "^3.7"
"symplify/easy-coding-standard": "^12.1",
"slevomat/coding-standard": "^8.15",
"squizlabs/php_codesniffer": "^3.9"
},
"config": {
"allow-plugins": {
Expand Down

0 comments on commit f01ca66

Please sign in to comment.