- Add friendsofphp/php-cs-fixer to require-dev - Create .php-cs-fixer.dist.php configured for @PSR12 ruleset - Add php-cs-fixer dry-run step to CI pipeline - Auto-fix existing PSR-12 violations - Document code style tooling in readme.md
20 lines
331 B
PHP
20 lines
331 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Trait;
|
|
|
|
use Psr\Log\LoggerInterface;
|
|
use Symfony\Contracts\Service\Attribute\Required;
|
|
|
|
trait HasLoggerTrait
|
|
{
|
|
protected readonly LoggerInterface $logger;
|
|
|
|
#[Required]
|
|
public function setLogger(LoggerInterface $logger): void
|
|
{
|
|
$this->logger = $logger;
|
|
}
|
|
}
|