Файловый менеджер - Редактировать - /home/pimjdymy/public_html/safrandsi/lcobucci.tar
Назад
clock/LICENSE 0000644 00000002056 15141212362 0006644 0 ustar 00 MIT License Copyright (c) 2017 Luís Cobucci Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. clock/src/SystemClock.php 0000644 00000001217 15141212362 0011375 0 ustar 00 <?php declare(strict_types=1); namespace Lcobucci\Clock; use DateTimeImmutable; use DateTimeZone; use function date_default_timezone_get; /** @immutable */ final class SystemClock implements Clock { public function __construct(private readonly DateTimeZone $timezone) { } public static function fromUTC(): self { return new self(new DateTimeZone('UTC')); } public static function fromSystemTimezone(): self { return new self(new DateTimeZone(date_default_timezone_get())); } public function now(): DateTimeImmutable { return new DateTimeImmutable('now', $this->timezone); } } clock/src/FrozenClock.php 0000644 00000002452 15141212362 0011356 0 ustar 00 <?php declare(strict_types=1); namespace Lcobucci\Clock; use DateMalformedStringException; use DateTimeImmutable; use DateTimeZone; use InvalidArgumentException; final class FrozenClock implements Clock { public function __construct(private DateTimeImmutable $now) { } public static function fromUTC(): self { return new self(new DateTimeImmutable('now', new DateTimeZone('UTC'))); } public function setTo(DateTimeImmutable $now): void { $this->now = $now; } /** * Adjusts the current time by a given modifier. * * @param string $modifier @see https://www.php.net/manual/en/datetime.formats.php * * @throws InvalidArgumentException When an invalid format string is passed (PHP < 8.3). * @throws DateMalformedStringException When an invalid date/time string is passed (PHP 8.3+). */ public function adjustTime(string $modifier): void { $modifiedTime = @$this->now->modify($modifier); // PHP < 8.3 won't throw exceptions on invalid modifiers if ($modifiedTime === false) { throw new InvalidArgumentException('The given modifier is invalid'); } $this->now = $modifiedTime; } public function now(): DateTimeImmutable { return $this->now; } } clock/src/Clock.php 0000644 00000000312 15141212362 0010163 0 ustar 00 <?php declare(strict_types=1); namespace Lcobucci\Clock; use DateTimeImmutable; use Psr\Clock\ClockInterface; interface Clock extends ClockInterface { public function now(): DateTimeImmutable; } clock/composer.json 0000644 00000002415 15141212362 0010360 0 ustar 00 { "name": "lcobucci/clock", "description": "Yet another clock abstraction", "license": "MIT", "type": "library", "authors": [ { "name": "Luís Cobucci", "email": "lcobucci@gmail.com" } ], "require": { "php": "~8.2.0 || ~8.3.0 || ~8.4.0", "psr/clock": "^1.0" }, "require-dev": { "infection/infection": "^0.29", "lcobucci/coding-standard": "^11.1.0", "phpstan/extension-installer": "^1.3.1", "phpstan/phpstan": "^1.10.25", "phpstan/phpstan-deprecation-rules": "^1.1.3", "phpstan/phpstan-phpunit": "^1.3.13", "phpstan/phpstan-strict-rules": "^1.5.1", "phpunit/phpunit": "^11.3.6" }, "provide": { "psr/clock-implementation": "1.0" }, "autoload": { "psr-4": { "Lcobucci\\Clock\\": "src" } }, "autoload-dev": { "psr-4": { "Lcobucci\\Clock\\": "test" } }, "config": { "allow-plugins": { "dealerdirect/phpcodesniffer-composer-installer": true, "infection/extension-installer": true, "phpstan/extension-installer": true }, "preferred-install": "dist", "sort-packages": true } }
| ver. 1.4 |
Github
|
.
| PHP 8.2.30 | Генерация страницы: 0.01 |
proxy
|
phpinfo
|
Настройка