Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix linting errors #250

Merged
merged 2 commits into from
Jun 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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