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 App\Form\DataMapper; | |
use Symfony\Component\Form\DataMapperInterface; | |
use Symfony\Component\Form\Exception\UnexpectedTypeException; | |
use Symfony\Component\Form\FormInterface; |
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 | |
final class RandomImageSource implements ImageSourceInterface | |
{ | |
/** {@inheritDoc} */ | |
public function __invoke(string $imageId, string $imageFormat): ImageInterface | |
{ | |
return new ImmutableImage($imageId, $imageFormat, static function () use ($imageId): string { | |
$randomImageUrl = \sprintf('https://picsum.photos/seed/%s/1000/1000', \sha1($imageId)); | |
$randomImageData = \file_get_contents($randomImageUrl); |
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 | |
final class IndexAction | |
{ | |
private const YEAR = 31536000; | |
public function __construct( | |
private readonly ChecksumValidatorInterface $checksumValidator, | |
private readonly SupportedImagesInterface $supportedFormats, | |
private readonly SizeFactoryInterface $sizeFactory, |
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 | |
final class UrlGenerateCommand extends Command | |
{ | |
private readonly RouterInterface $router; | |
public function __construct( | |
RouterInterface $router, | |
) { | |
parent::__construct(); |
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
ARG USER_UID=82 | |
ARG USER_GID=82 | |
# Recreate www-data user with user id matching the host | |
RUN deluser --remove-home www-data && \ | |
addgroup -S -g ${USER_GID} www-data && \ | |
adduser -u ${USER_UID} -D -S -G www-data www-data |
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 App\Notification\Impl; | |
use App\Notification\EmailAddress; | |
use App\Notification\EmailNotificationInterface; | |
final class EmailNotification implements EmailNotificationInterface |
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 App\User\Notification; | |
use App\Notification\EmailNotificationInterface; | |
use App\Notification\NotificationManagerInterface; | |
use App\Events\PostRegistrationEvent; | |
use App\User\Notification\WelcomeGreetingEmailNotificationFactory; |
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 App\Notification\Implementation; | |
use App\Notification\NotificationInterface; | |
use App\Notification\TransportInterface; | |
/** |
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 App\User\Notification; | |
use App\Notification\EmailAdddress; | |
use App\Notification\EmailNotificationInterface; | |
use App\Notification\Impl\EmailNotification; | |
use App\Template\TemplateEngine; |
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 App\Notification; | |
/** | |
* E-mail notification | |
*/ | |
interface EmailNotificationInterface extends NotificationInterface |
NewerOlder