Skip to content

Commit 36bdd3c

Browse files
authored
IBX-9727: Added missing strict types (#188)
1 parent 0b71586 commit 36bdd3c

File tree

401 files changed

+991
-3793
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

401 files changed

+991
-3793
lines changed

phpstan-baseline.neon

Lines changed: 10 additions & 1024 deletions
Large diffs are not rendered by default.

src/bundle/ApiLoader/Factory.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@ class Factory
2424

2525
protected Repository $repository;
2626

27-
/**
28-
* @param \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface $configResolver
29-
* @param \Ibexa\Contracts\Core\Repository\Repository $repository
30-
*/
3127
public function __construct(ConfigResolverInterface $configResolver, Repository $repository)
3228
{
3329
$this->configResolver = $configResolver;
@@ -49,10 +45,6 @@ public function getMediaFieldTypeProcessor(): MediaProcessor
4945

5046
/**
5147
* Factory for ezpublish_rest.field_type_processor.ibexa_image.
52-
*
53-
* @param \Symfony\Component\Routing\RouterInterface $router
54-
*
55-
* @return \Ibexa\Rest\FieldTypeProcessor\ImageProcessor
5648
*/
5749
public function getImageFieldTypeProcessor(RouterInterface $router): ImageProcessor
5850
{

src/bundle/ApiPlatform/Head.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ public function __construct(
106106
?bool $forceEager = null,
107107
?int $priority = null,
108108
?string $name = null,
109-
$provider = null,
110-
$processor = null,
109+
callable|string|null $provider = null,
110+
callable|string|null $processor = null,
111111
?OptionsInterface $stateOptions = null,
112112
array|Parameters|null $parameters = null,
113113
array $extraProperties = [],

src/bundle/DependencyInjection/Compiler/FieldTypeProcessorPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
class FieldTypeProcessorPass implements CompilerPassInterface
1717
{
18-
private const FIELD_TYPE_PROCESSOR_SERVICE_TAG = 'ibexa.rest.field_type.processor';
18+
private const string FIELD_TYPE_PROCESSOR_SERVICE_TAG = 'ibexa.rest.field_type.processor';
1919

2020
public function process(ContainerBuilder $container): void
2121
{

src/bundle/DependencyInjection/Compiler/InputHandlerPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*/
2121
class InputHandlerPass implements CompilerPassInterface
2222
{
23-
public const INPUT_HANDLER_SERVICE_TAG = 'ibexa.rest.input.handler';
23+
public const string INPUT_HANDLER_SERVICE_TAG = 'ibexa.rest.input.handler';
2424

2525
public function process(ContainerBuilder $container): void
2626
{

src/bundle/DependencyInjection/Compiler/InputParserPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*/
2121
class InputParserPass implements CompilerPassInterface
2222
{
23-
public const INPUT_PARSER_SERVICE_TAG = 'ibexa.rest.input.parser';
23+
public const string INPUT_PARSER_SERVICE_TAG = 'ibexa.rest.input.parser';
2424

2525
public function process(ContainerBuilder $container): void
2626
{

src/bundle/DependencyInjection/Compiler/OutputVisitorPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
*/
2323
class OutputVisitorPass implements CompilerPassInterface
2424
{
25-
public const OUTPUT_VISITOR_SERVICE_TAG = 'ibexa.rest.output.visitor';
25+
public const string OUTPUT_VISITOR_SERVICE_TAG = 'ibexa.rest.output.visitor';
2626

2727
public function process(ContainerBuilder $container): void
2828
{

src/bundle/DependencyInjection/IbexaRestExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
*/
2828
class IbexaRestExtension extends ConfigurableExtension implements PrependExtensionInterface
2929
{
30-
public const EXTENSION_NAME = 'ibexa_rest';
30+
public const string EXTENSION_NAME = 'ibexa_rest';
3131

3232
public function getAlias(): string
3333
{

src/bundle/RestEvents.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ final class RestEvents
1212
/**
1313
* The REST_CSRF_TOKEN_VALIDATED event occurs after CSRF token has been validated as correct.
1414
*/
15-
public const REST_CSRF_TOKEN_VALIDATED = 'ezpublish.rest.csrf_token_validated';
15+
public const string REST_CSRF_TOKEN_VALIDATED = 'ezpublish.rest.csrf_token_validated';
1616
}

src/bundle/Routing/OptionsLoader/Mapper.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,8 @@ public function mapRoute(Route $route): Route
3333

3434
/**
3535
* Merges the methods from $restRoute into the _method default of $optionsRoute.
36-
*
37-
* @param \Symfony\Component\Routing\Route $restRoute
38-
* @param \Symfony\Component\Routing\Route $optionsRoute
39-
*
40-
* @return \Symfony\Component\Routing\Route $optionsRoute with the methods from $restRoute in the _methods default
4136
*/
42-
public function mergeMethodsDefault(Route $optionsRoute, Route $restRoute)
37+
public function mergeMethodsDefault(Route $optionsRoute, Route $restRoute): Route
4338
{
4439
$mergedRoute = clone $optionsRoute;
4540
$mergedRoute->setDefault(

0 commit comments

Comments
 (0)