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
<?php | |
/** | |
* @psalm-pure | |
* @template T | |
* @template TArray of array<T> | |
* @param TArray $values | |
* @return (TArray is non-empty-array<T> ? T : ?T) | |
*/ | |
function array_value_first(array $values): mixed |
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
framework: | |
php_errors: | |
log: | |
!php/const E_ERROR: !php/const Psr\Log\LogLevel::CRITICAL | |
!php/const E_WARNING: !php/const Psr\Log\LogLevel::CRITICAL | |
!php/const E_PARSE: !php/const Psr\Log\LogLevel::CRITICAL | |
!php/const E_NOTICE: !php/const Psr\Log\LogLevel::CRITICAL | |
!php/const E_CORE_ERROR: !php/const Psr\Log\LogLevel::CRITICAL | |
!php/const E_CORE_WARNING: !php/const Psr\Log\LogLevel::CRITICAL | |
!php/const E_COMPILE_ERROR: !php/const Psr\Log\LogLevel::CRITICAL |
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
<?php | |
declare(strict_types=1); | |
namespace HappyInc\Infrastructure\Migrations; | |
use Symfony\Component\Console\Command\Command; | |
use Symfony\Component\Console\Input\InputArgument; | |
use Symfony\Component\Console\Input\InputInterface; | |
use Symfony\Component\Console\Output\OutputInterface; |
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
<?php | |
declare(strict_types=1); | |
final class Interpolator | |
{ | |
public function __construct( | |
private string $format = '%s', | |
) { | |
} |
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
<?php | |
declare(strict_types=1); | |
require_once __DIR__.'/vendor/autoload.php'; | |
const ITERATIONS = 10_000; | |
$stopwatch = new \Symfony\Component\Stopwatch\Stopwatch(); | |
$event = $stopwatch->start('db'); |
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
<?php | |
/** | |
* @return array<string, mixed> | |
*/ | |
function objectToArray(object $object): array | |
{ | |
return (fn (): array => get_object_vars($this))->call($object); | |
} |
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
MAILER_DSN=insmtp://0.0.0.0 |
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
<?php | |
declare(strict_types=1); | |
/** | |
* Computes the difference between two dates in milliseconds. | |
* | |
* @psalm-pure | |
* | |
* @return int $a - $b |
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
<?php | |
declare(strict_types=1); | |
namespace Infrastructure\Uuid; | |
use Ramsey\Uuid\Nonstandard\UuidV6; | |
use Ramsey\Uuid\Rfc4122\UuidV1; | |
use Ramsey\Uuid\Uuid; |