Skip to content
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
90 changes: 0 additions & 90 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -3216,24 +3216,6 @@ parameters:
count: 1
path: src/bundle/Core/Features/Context/FieldTypeContext.php

-
message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\FieldTypeContext\:\:createAndPublishContent\(\) has no return type specified\.$#'
identifier: missingType.return
count: 1
path: src/bundle/Core/Features/Context/FieldTypeContext.php

-
message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\FieldTypeContext\:\:createAndPublishContent\(\) has parameter \$field with no type specified\.$#'
identifier: missingType.parameter
count: 1
path: src/bundle/Core/Features/Context/FieldTypeContext.php

-
message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\FieldTypeContext\:\:createAndPublishContent\(\) has parameter \$value with no type specified\.$#'
identifier: missingType.parameter
count: 1
path: src/bundle/Core/Features/Context/FieldTypeContext.php

-
message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\FieldTypeContext\:\:createContent\(\) has no return type specified\.$#'
identifier: missingType.return
Expand Down Expand Up @@ -3348,18 +3330,6 @@ parameters:
count: 1
path: src/bundle/Core/Features/Context/FieldTypeContext.php

-
message: '#^PHPDoc tag @param has invalid value \(mixed The field value\)\: Unexpected token "The", expected variable at offset 173 on line 6$#'
identifier: phpDoc.parseError
count: 1
path: src/bundle/Core/Features/Context/FieldTypeContext.php

-
message: '#^PHPDoc tag @param has invalid value \(string The field name\)\: Unexpected token "The", expected variable at offset 138 on line 5$#'
identifier: phpDoc.parseError
count: 1
path: src/bundle/Core/Features/Context/FieldTypeContext.php

-
message: '#^Parameter \#1 \$parentLocationId of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:newLocationCreateStruct\(\) expects int, string given\.$#'
identifier: argument.type
Expand Down Expand Up @@ -5220,24 +5190,12 @@ parameters:
count: 2
path: src/bundle/IO/DependencyInjection/Compiler/IOConfigurationPass.php

-
message: '#^Property Ibexa\\Bundle\\IO\\DependencyInjection\\Compiler\\IOConfigurationPass\:\:\$binarydataHandlerFactories \(ArrayObject&iterable\<Ibexa\\Bundle\\IO\\DependencyInjection\\ConfigurationFactory\>\) does not accept ArrayObject\|null\.$#'
identifier: assign.propertyType
count: 1
path: src/bundle/IO/DependencyInjection/Compiler/IOConfigurationPass.php

-
message: '#^Property Ibexa\\Bundle\\IO\\DependencyInjection\\Compiler\\IOConfigurationPass\:\:\$binarydataHandlerFactories with generic class ArrayObject does not specify its types\: TKey, TValue$#'
identifier: missingType.generics
count: 1
path: src/bundle/IO/DependencyInjection/Compiler/IOConfigurationPass.php

-
message: '#^Property Ibexa\\Bundle\\IO\\DependencyInjection\\Compiler\\IOConfigurationPass\:\:\$metadataHandlerFactories \(ArrayObject&iterable\<Ibexa\\Bundle\\IO\\DependencyInjection\\ConfigurationFactory\>\) does not accept ArrayObject\|null\.$#'
identifier: assign.propertyType
count: 1
path: src/bundle/IO/DependencyInjection/Compiler/IOConfigurationPass.php

-
message: '#^Property Ibexa\\Bundle\\IO\\DependencyInjection\\Compiler\\IOConfigurationPass\:\:\$metadataHandlerFactories with generic class ArrayObject does not specify its types\: TKey, TValue$#'
identifier: missingType.generics
Expand Down Expand Up @@ -14166,12 +14124,6 @@ parameters:
count: 1
path: src/lib/MVC/Symfony/Locale/UserLanguagePreferenceProvider.php

-
message: '#^PHPDoc tag @param has invalid value \(\\Symfony\\Component\\HttpFoundation\\Request request to retrieve information from, use current if null\)\: Unexpected token "request", expected variable at offset 162 on line 4$#'
identifier: phpDoc.parseError
count: 1
path: src/lib/MVC/Symfony/Locale/UserLanguagePreferenceProviderInterface.php

-
message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Matcher\\ClassNameMatcherFactory\:\:__construct\(\) has parameter \$matchConfig with no value type specified in iterable type array\.$#'
identifier: missingType.iterableValue
Expand Down Expand Up @@ -14934,12 +14886,6 @@ parameters:
count: 1
path: src/lib/MVC/Symfony/Security/HttpUtils.php

-
message: '#^Property Ibexa\\Core\\MVC\\Symfony\\Security\\HttpUtils\:\:\$siteAccess \(Ibexa\\Core\\MVC\\Symfony\\SiteAccess\) does not accept Ibexa\\Core\\MVC\\Symfony\\SiteAccess\|null\.$#'
identifier: assign.propertyType
count: 1
path: src/lib/MVC/Symfony/Security/HttpUtils.php

-
message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Security\\InteractiveLoginToken\:\:__construct\(\) has parameter \$credentials with no type specified\.$#'
identifier: missingType.parameter
Expand Down Expand Up @@ -24264,12 +24210,6 @@ parameters:
count: 1
path: src/lib/Repository/ContentService.php

-
message: '#^PHPDoc tag @param has invalid value \(\\Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Language\|null if not set the draft is created with the initialLanguage code of the source version or if not present with the main language\.\)\: Unexpected token "if", expected variable at offset 565 on line 9$#'
identifier: phpDoc.parseError
count: 1
path: src/lib/Repository/ContentService.php

-
message: '#^PHPDoc tag @var has invalid value \(\$content \\Ibexa\\Core\\Repository\\Values\\Content\\Content\)\: Unexpected token "\$content", expected type at offset 9 on line 1$#'
identifier: phpDoc.parseError
Expand Down Expand Up @@ -47328,12 +47268,6 @@ parameters:
count: 1
path: tests/integration/Core/Repository/URLAliasServiceTest.php

-
message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:testCreateGlobalUrlAliasForLocationPropertyValues\(\) has parameter \$testData with no type specified\.$#'
identifier: missingType.parameter
count: 1
path: tests/integration/Core/Repository/URLAliasServiceTest.php

-
message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:testCreateGlobalUrlAliasForLocationVariation\(\) has no return type specified\.$#'
identifier: missingType.return
Expand All @@ -47346,12 +47280,6 @@ parameters:
count: 1
path: tests/integration/Core/Repository/URLAliasServiceTest.php

-
message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:testCreateGlobalUrlAliasForLocationVariationPropertyValues\(\) has parameter \$testData with no type specified\.$#'
identifier: missingType.parameter
count: 1
path: tests/integration/Core/Repository/URLAliasServiceTest.php

-
message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:testCreateGlobalUrlAliasPropertyValues\(\) has no return type specified\.$#'
identifier: missingType.return
Expand Down Expand Up @@ -47610,12 +47538,6 @@ parameters:
count: 1
path: tests/integration/Core/Repository/URLAliasServiceTest.php

-
message: '#^PHPDoc tag @param has invalid value \(\\Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\URLAlias\)\: Unexpected token "\\n \*", expected variable at offset 74 on line 2$#'
identifier: phpDoc.parseError
count: 5
path: tests/integration/Core/Repository/URLAliasServiceTest.php

-
message: '#^Parameter \#1 \$aliasList of method Ibexa\\Contracts\\Core\\Repository\\URLAliasService\:\:removeAliases\(\) expects array\<Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\URLAlias\>, iterable\<Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\URLAlias\> given\.$#'
identifier: argument.type
Expand Down Expand Up @@ -69990,18 +69912,6 @@ parameters:
count: 2
path: tests/lib/Repository/Mapper/ContentLocationMapper/DecoratedLocationServiceTest.php

-
message: '#^Method Ibexa\\Tests\\Core\\Repository\\PHPUnitConstraint\\AllValidationErrorsOccur\:\:extractTranslatable\(\) has parameter \$fieldErrors with no value type specified in iterable type array\.$#'
identifier: missingType.iterableValue
count: 1
path: tests/lib/Repository/PHPUnitConstraint/AllValidationErrorsOccur.php

-
message: '#^PHPDoc tag @param has invalid value \(array\<int, \<string, array\<\\Ibexa\\Contracts\\Core\\FieldType\\ValidationError\>\>\> \$fieldErrors\)\: Unexpected token "\<", expected type at offset 29 on line 2$#'
identifier: phpDoc.parseError
count: 1
path: tests/lib/Repository/PHPUnitConstraint/AllValidationErrorsOccur.php

-
message: '#^Method Ibexa\\Tests\\Core\\Repository\\PHPUnitConstraint\\ContentItemEquals\:\:compareArrays\(\) has parameter \$actual with no value type specified in iterable type array\.$#'
identifier: missingType.iterableValue
Expand Down
2 changes: 1 addition & 1 deletion src/bundle/Core/ApiLoader/RepositoryFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function __construct(
$repositoryClass,
array $policyMap,
LanguageResolver $languageResolver,
LoggerInterface $logger = null
?LoggerInterface $logger = null
) {
$this->configResolver = $configResolver;
$this->repositoryClass = $repositoryClass;
Expand Down
2 changes: 1 addition & 1 deletion src/bundle/Core/Command/RegenerateUrlAliasesCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class RegenerateUrlAliasesCommand extends Command implements BackwardCompatibleC
* @param \Ibexa\Contracts\Core\Repository\Repository $repository
* @param \Psr\Log\LoggerInterface $logger
*/
public function __construct(Repository $repository, LoggerInterface $logger = null)
public function __construct(Repository $repository, ?LoggerInterface $logger = null)
{
parent::__construct();

Expand Down
2 changes: 1 addition & 1 deletion src/bundle/Core/Command/ReindexCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function __construct(
bool $isDebug,
string $projectDir,
ContentIdListGeneratorStrategyInterface $contentIdListGeneratorStrategy,
string $phpPath = null
?string $phpPath = null
) {
$this->gateway = $gateway;
$this->searchIndexer = $searchIndexer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function __construct(
$this->undefinedStrategy = $undefinedStrategy;
}

public function setSiteAccess(SiteAccess $siteAccess = null)
public function setSiteAccess(?SiteAccess $siteAccess = null)
{
$this->siteAccess = $siteAccess;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ public function setDefaultNamespace(string $defaultNamespace): void
$this->defaultNamespace = $defaultNamespace;
}

private function resolveScopeRelativeParamName(string $paramName, string $namespace = null, string $scope = null): string
private function resolveScopeRelativeParamName(string $paramName, ?string $namespace = null, ?string $scope = null): string
{
return $this->getScopeRelativeParamName($paramName, ...$this->resolveNamespaceAndScope($namespace, $scope));
}

private function resolveNamespaceAndScope(string $namespace = null, string $scope = null): array
private function resolveNamespaceAndScope(?string $namespace = null, ?string $scope = null): array
{
return [$namespace ?: $this->getDefaultNamespace(), $scope ?? $this->scope];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public function setDefaultScope(string $scope): void
$this->defaultScope = $scope;
}

public function setSiteAccess(SiteAccess $siteAccess = null): void
public function setSiteAccess(?SiteAccess $siteAccess = null): void
{
$this->currentSiteAccess = $siteAccess;
}
Expand Down
2 changes: 1 addition & 1 deletion src/bundle/Core/EventListener/ConsoleCommandListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function onConsoleCommand(ConsoleCommandEvent $event)
$this->eventDispatcher->dispatch(new ScopeChangeEvent($this->siteAccess), MVCEvents::CONFIG_SCOPE_CHANGE);
}

public function setSiteAccess(SiteAccess $siteAccess = null)
public function setSiteAccess(?SiteAccess $siteAccess = null)
{
$this->siteAccess = $siteAccess;
}
Expand Down
2 changes: 1 addition & 1 deletion src/bundle/Core/EventListener/RequestEventListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class RequestEventListener implements EventSubscriberInterface
/** @var \Symfony\Component\Routing\RouterInterface */
private $router;

public function __construct(ConfigResolverInterface $configResolver, RouterInterface $router, $defaultSiteAccess, LoggerInterface $logger = null)
public function __construct(ConfigResolverInterface $configResolver, RouterInterface $router, $defaultSiteAccess, ?LoggerInterface $logger = null)
{
$this->configResolver = $configResolver;
$this->defaultSiteAccess = $defaultSiteAccess;
Expand Down
8 changes: 2 additions & 6 deletions src/bundle/Core/Features/Context/FieldTypeContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,13 +201,9 @@ public function getFieldContentState()
}

/**
* Creates and publishes the content with a given field and
* based on the internal ContentType.
*
* @param string The field name
* @param mixed The field value
* @param mixed $value
*/
private function createAndPublishContent($field, $value)
private function createAndPublishContent(?string $field, $value): void
{
$languageCode = self::DEFAULT_LANGUAGE;

Expand Down
2 changes: 1 addition & 1 deletion src/bundle/Core/Fragment/DecoratedFragmentRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function __construct(
/**
* @param \Ibexa\Core\MVC\Symfony\SiteAccess|null $siteAccess
*/
public function setSiteAccess(SiteAccess $siteAccess = null)
public function setSiteAccess(?SiteAccess $siteAccess = null)
{
$this->siteAccess = $siteAccess;
}
Expand Down
2 changes: 1 addition & 1 deletion src/bundle/Core/Fragment/InlineFragmentRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function setFragmentPath($path)
}
}

public function setSiteAccess(SiteAccess $siteAccess = null)
public function setSiteAccess(?SiteAccess $siteAccess = null)
{
$this->siteAccess = $siteAccess;
}
Expand Down
2 changes: 1 addition & 1 deletion src/bundle/Core/Imagine/AliasGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function __construct(
FilterManager $filterManager,
ResolverInterface $ioResolver,
FilterConfiguration $filterConfiguration,
LoggerInterface $logger = null
?LoggerInterface $logger = null
) {
$this->dataLoader = $dataLoader;
$this->filterManager = $filterManager;
Expand Down
2 changes: 1 addition & 1 deletion src/bundle/Core/Imagine/Cache/AliasGeneratorDecorator.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public function getVariation(Field $field, VersionInfo $versionInfo, $variationN
/**
* @param \Ibexa\Core\MVC\Symfony\SiteAccess|null $siteAccess
*/
public function setSiteAccess(SiteAccess $siteAccess = null)
public function setSiteAccess(?SiteAccess $siteAccess = null)
{
$this->siteAccess = $siteAccess;
}
Expand Down
2 changes: 1 addition & 1 deletion src/bundle/Core/Routing/DefaultRouter.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function setConfigResolver(ConfigResolverInterface $configResolver)
$this->configResolver = $configResolver;
}

public function setSiteAccess(SiteAccess $siteAccess = null)
public function setSiteAccess(?SiteAccess $siteAccess = null)
{
$this->siteAccess = $siteAccess;
}
Expand Down
2 changes: 1 addition & 1 deletion src/bundle/Core/View/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Manager extends BaseManager implements SiteAccessAware
*
* @param \Ibexa\Core\MVC\Symfony\SiteAccess $siteAccess
*/
public function setSiteAccess(SiteAccess $siteAccess = null)
public function setSiteAccess(?SiteAccess $siteAccess = null)
{
if ($this->logger) {
$this->logger->debug('Changing SiteAccess in view providers');
Expand Down
2 changes: 1 addition & 1 deletion src/bundle/Core/View/Provider/Configured.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Configured extends BaseConfigured implements SiteAccessAware
*
* @param \Ibexa\Core\MVC\Symfony\SiteAccess $siteAccess
*/
public function setSiteAccess(SiteAccess $siteAccess = null)
public function setSiteAccess(?SiteAccess $siteAccess = null)
{
if ($this->matcherFactory instanceof SiteAccessAware) {
$this->matcherFactory->setSiteAccess($siteAccess);
Expand Down
2 changes: 1 addition & 1 deletion src/bundle/Debug/Collector/IbexaCoreCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public function __construct()
$this->reset();
}

public function collect(Request $request, Response $response, \Throwable $exception = null)
public function collect(Request $request, Response $response, ?\Throwable $exception = null)
{
/** @var \Symfony\Component\HttpKernel\DataCollector\DataCollectorInterface $innerCollector */
foreach ($this->data['collectors'] as $innerCollector) {
Expand Down
2 changes: 1 addition & 1 deletion src/bundle/Debug/Collector/PersistenceCacheCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function __construct(PersistenceLogger $logger)
$this->logger = $logger;
}

public function collect(Request $request, Response $response, \Throwable $exception = null)
public function collect(Request $request, Response $response, ?\Throwable $exception = null)
{
$this->data = [
'stats' => $this->logger->getStats(),
Expand Down
2 changes: 1 addition & 1 deletion src/bundle/Debug/Collector/SiteAccessCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
class SiteAccessCollector extends DataCollector
{
public function collect(Request $request, Response $response, \Throwable $exception = null)
public function collect(Request $request, Response $response, ?\Throwable $exception = null)
{
$this->data = [
'siteAccess' => $request->attributes->get('siteaccess'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ class IOConfigurationPass implements CompilerPassInterface
private $binarydataHandlerFactories;

public function __construct(
ArrayObject $metadataHandlerFactories = null,
ArrayObject $binarydataHandlerFactories = null
?ArrayObject $metadataHandlerFactories = null,
?ArrayObject $binarydataHandlerFactories = null
) {
$this->metadataHandlerFactories = $metadataHandlerFactories;
$this->binarydataHandlerFactories = $binarydataHandlerFactories;
$this->metadataHandlerFactories = $metadataHandlerFactories ?? new ArrayObject();
$this->binarydataHandlerFactories = $binarydataHandlerFactories ?? new ArrayObject();
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/bundle/IO/Migration/FileLister/BinaryFileLister.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ class BinaryFileLister extends MigrationHandler implements FileListerInterface
public function __construct(
HandlerRegistry $metadataHandlerRegistry,
HandlerRegistry $binarydataHandlerRegistry,
LoggerInterface $logger = null,
Iterator $fileList,
$filesDir
$filesDir,
?LoggerInterface $logger = null,
) {
$this->fileList = $fileList;
$this->filesDir = $filesDir;
Expand Down
4 changes: 2 additions & 2 deletions src/bundle/IO/Migration/FileLister/ImageFileLister.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ class ImageFileLister extends MigrationHandler implements FileListerInterface
public function __construct(
HandlerRegistry $metadataHandlerRegistry,
HandlerRegistry $binarydataHandlerRegistry,
LoggerInterface $logger = null,
Iterator $imageFileList,
VariationPathGenerator $variationPathGenerator,
FilterConfiguration $filterConfiguration,
$imagesDir
$imagesDir,
?LoggerInterface $logger = null
) {
$this->imageFileList = $imageFileList;
$this->variationPathGenerator = $variationPathGenerator;
Expand Down
Loading
Loading