-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Artem Henvald <[email protected]>
- Loading branch information
Showing
7 changed files
with
43 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -94,7 +94,6 @@ jobs: | |
fail-fast: false | ||
matrix: | ||
php-version: | ||
- '8.1' | ||
- '8.2' | ||
steps: | ||
- name: 'Checkout Code' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
preset: recommended | ||
|
||
version: 8.1 | ||
version: 8.2 | ||
|
||
enabled: | ||
- combine_consecutive_unsets | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,12 +12,14 @@ | |
|
||
namespace Fresh\DateTime; | ||
|
||
use Psr\Clock\ClockInterface; | ||
|
||
/** | ||
* DateTimeHelper. | ||
* | ||
* @author Artem Henvald <[email protected]> | ||
*/ | ||
class DateTimeHelper implements DateTimeHelperInterface | ||
class DateTimeHelper implements ClockInterface, DateTimeHelperInterface | ||
{ | ||
private const INTERNAL_DATE_FORMAT = 'Y-m-d'; | ||
|
||
|
@@ -26,6 +28,14 @@ class DateTimeHelper implements DateTimeHelperInterface | |
|
||
private ?\DateTimeZone $timeZoneUtc = null; | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function now(): \DateTimeImmutable | ||
{ | ||
return $this->getCurrentDatetimeImmutableUtc(); | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters