diff --git a/Sitemap/ArticleSitemapProvider.php b/Sitemap/ArticleSitemapProvider.php index bcad2c82..7990375e 100644 --- a/Sitemap/ArticleSitemapProvider.php +++ b/Sitemap/ArticleSitemapProvider.php @@ -195,6 +195,8 @@ public function getMaxPage($schema, $host) $webspaceQuery->add(new TermQuery('additional_webspaces', $webspaceKey), BoolQuery::SHOULD); } + $search->addQuery($webspaceQuery); + return \ceil($repository->count($search) / static::PAGE_SIZE); } diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index b08cec44..1c870335 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -40,21 +40,11 @@ parameters: count: 1 path: Builder/ArticleIndexBuilder.php - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Command\\\\ArticleExportCommand\\:\\:configure\\(\\) has no return type specified\\.$#" - count: 1 - path: Command/ArticleExportCommand.php - - message: "#^Strict comparison using \\=\\=\\= between 0 and bool will always evaluate to false\\.$#" count: 1 path: Command/ArticleExportCommand.php - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Command\\\\ArticleImportCommand\\:\\:configure\\(\\) has no return type specified\\.$#" - count: 1 - path: Command/ArticleImportCommand.php - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Command\\\\ArticleImportCommand\\:\\:printExceptions\\(\\) has no return type specified\\.$#" count: 1 @@ -70,11 +60,6 @@ parameters: count: 1 path: Command/ArticleImportCommand.php - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Command\\\\ReindexCommand\\:\\:configure\\(\\) has no return type specified\\.$#" - count: 1 - path: Command/ReindexCommand.php - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Command\\\\ReindexCommand\\:\\:getDocuments\\(\\) should return Sulu\\\\Component\\\\DocumentManager\\\\Collection\\\\QueryResultCollection but returns mixed\\.$#" count: 1 @@ -535,21 +520,6 @@ parameters: count: 1 path: Controller/WebsiteArticleController.php - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\DependencyInjection\\\\ConverterCompilerPass\\:\\:process\\(\\) has no return type specified\\.$#" - count: 1 - path: DependencyInjection/ConverterCompilerPass.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\DependencyInjection\\\\RouteEnhancerCompilerPass\\:\\:process\\(\\) has no return type specified\\.$#" - count: 1 - path: DependencyInjection/RouteEnhancerCompilerPass.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\DependencyInjection\\\\StructureValidatorCompilerPass\\:\\:process\\(\\) has no return type specified\\.$#" - count: 1 - path: DependencyInjection/StructureValidatorCompilerPass.php - - message: "#^Negated boolean expression is always true\\.$#" count: 1 @@ -590,11 +560,6 @@ parameters: count: 1 path: DependencyInjection/SuluArticleExtension.php - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\DependencyInjection\\\\SuluArticleExtension\\:\\:prepend\\(\\) has no return type specified\\.$#" - count: 1 - path: DependencyInjection/SuluArticleExtension.php - - message: "#^Offset 'article' on array\\{snippet\\: string\\} in isset\\(\\) does not exist\\.$#" count: 1 @@ -960,21 +925,11 @@ parameters: count: 1 path: Document/Form/ArticleDocumentType.php - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Form\\\\ArticleDocumentType\\:\\:configureOptions\\(\\) has no return type specified\\.$#" - count: 1 - path: Document/Form/ArticleDocumentType.php - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Form\\\\ArticlePageDocumentType\\:\\:buildForm\\(\\) has no return type specified\\.$#" count: 1 path: Document/Form/ArticlePageDocumentType.php - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Form\\\\ArticlePageDocumentType\\:\\:configureOptions\\(\\) has no return type specified\\.$#" - count: 1 - path: Document/Form/ArticlePageDocumentType.php - - message: "#^Cannot access offset 'structure' on mixed\\.$#" count: 2 @@ -995,11 +950,6 @@ parameters: count: 1 path: Document/Form/Listener/DataNormalizer.php - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Form\\\\UnstructuredType\\:\\:configureOptions\\(\\) has no return type specified\\.$#" - count: 1 - path: Document/Form/UnstructuredType.php - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Index\\\\ArticleGhostIndexer\\:\\:__construct\\(\\) has parameter \\$typeConfiguration with no value type specified in iterable type array\\.$#" count: 1 @@ -1690,6 +1640,11 @@ parameters: count: 1 path: Document/Subscriber/ArticleSubscriber.php + - + message: "#^Cannot access offset int\\<0, max\\> on mixed\\.$#" + count: 1 + path: Document/Subscriber/ArticleSubscriber.php + - message: "#^Cannot call method getIdentifier\\(\\) on mixed\\.$#" count: 1 @@ -2510,11 +2465,6 @@ parameters: count: 1 path: Sitemap/ArticleSitemapProvider.php - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\SuluArticleBundle\\:\\:build\\(\\) has no return type specified\\.$#" - count: 1 - path: SuluArticleBundle.php - - message: "#^Cannot call method getExcerpt\\(\\) on mixed\\.$#" count: 1