Skip to content

Commit

Permalink
Fix linting errors (#250)
Browse files Browse the repository at this point in the history
  • Loading branch information
Prokyonn authored Jun 1, 2023
1 parent 890f158 commit d5a6cdf
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
'single_line_throw' => false,
'strict_comparison' => true,
'strict_param' => true,
'get_class_to_class_keyword' => false, // should be enabled as soon as support for php < 8 is dropped
'nullable_type_declaration_for_default_null_value' => true,
])
->setFinder(
PhpCsFixer\Finder::create()
Expand Down
2 changes: 1 addition & 1 deletion Content/Domain/Model/ShadowTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ trait ShadowTrait
/**
* @var string[]|null
*/
protected $shadowLocales = null;
protected $shadowLocales;

/**
* @internal should only be set by content bundle services not from outside
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class ContentReindexProvider implements LocalizedReindexProviderInterface
/**
* @var class-string<B>|null
*/
private $dimensionContentClass = null;
private $dimensionContentClass;

/**
* @param class-string<T> $contentRichEntityClass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class ContentSearchMetadataProvider implements ProviderInterface
/**
* @var class-string<B>|null
*/
private $dimensionContentClass = null;
private $dimensionContentClass;

/**
* @param class-string<T> $contentRichEntityClass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function __construct(
DataProviderRepositoryInterface $repository,
ArraySerializerInterface $arraySerializer,
ContentManagerInterface $contentManager,
ReferenceStoreInterface $referenceStore = null
?ReferenceStoreInterface $referenceStore = null
) {
parent::__construct($repository, $arraySerializer);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class ExampleNotFoundException extends \Exception
/**
* @param mixed[] $filters
*/
public function __construct(array $filters, int $code = 0, \Throwable $previous = null)
public function __construct(array $filters, int $code = 0, ?\Throwable $previous = null)
{
$this->model = Example::class;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public function testFindENNoRoute(): void
}

/**
* @param Teaser[]$teasers
* @param Teaser[] $teasers
*
* @return array<string, mixed>
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class ContentViewBuilderFactoryTest extends TestCase
protected function createContentViewBuilder(
ContentMetadataInspectorInterface $contentMetadataInspector,
SecurityCheckerInterface $securityChecker,
PreviewObjectProviderRegistryInterface $previewObjectProviderRegistry = null,
?PreviewObjectProviderRegistryInterface $previewObjectProviderRegistry = null,
array $settingsForms = []
): ContentViewBuilderFactoryInterface {
if (null === $previewObjectProviderRegistry) {
Expand Down

0 comments on commit d5a6cdf

Please sign in to comment.