Skip to content
Snippets Groups Projects
Commit 2ff36105 authored by Andrey Tymchuk's avatar Andrey Tymchuk Committed by A.Tymchuk
Browse files

Issue #3423280 by WalkingDexter: Fix PHPStan errors (level 3)

parent cb6e16b2
No related branches found
No related tags found
No related merge requests found
......@@ -53,7 +53,7 @@ class SimpleSitemapEngine extends ConfigEntityBase {
* When submitting to search engines, '[sitemap]' will be replaced with the
* full URL to the sitemap.xml.
*
* @var string
* @var string|null
*/
public $url;
......@@ -70,7 +70,7 @@ class SimpleSitemapEngine extends ConfigEntityBase {
* When submitting to search engines, '[key]' and '[url]' will be replaced
* with the respective values.
*
* @var string
* @var string|null
*/
public $index_now_url;
......
......@@ -19,6 +19,11 @@ parameters:
count: 1
path: src/Controller/SimpleSitemapController.php
-
message: "#^Method Drupal\\\\simple_sitemap\\\\Entity\\\\EntityHelper\\:\\:getSupportedEntityTypes\\(\\) should return array\\<Drupal\\\\Core\\\\Entity\\\\ContentEntityTypeInterface\\> but returns array\\<Drupal\\\\Core\\\\Entity\\\\EntityTypeInterface\\>\\.$#"
count: 1
path: src/Entity/EntityHelper.php
-
message: "#^\\\\Drupal calls should be avoided in classes, use dependency injection instead$#"
count: 2
......
includes:
- phpstan-baseline.neon
parameters:
level: 2
level: 3
paths:
- .
excludePaths:
......
......@@ -68,14 +68,14 @@ class SimpleSitemap extends ConfigEntityBase implements SimpleSitemapInterface {
/**
* The fetch status.
*
* @var int
* @var int|null
*/
protected $fetchByStatus;
/**
* The sitemap type entity.
*
* @var \Drupal\simple_sitemap\Entity\SimpleSitemapTypeInterface
* @var \Drupal\simple_sitemap\Entity\SimpleSitemapTypeInterface|null
*/
protected $sitemapType;
......
......@@ -55,14 +55,14 @@ class SimpleSitemapType extends ConfigEntityBase implements SimpleSitemapTypeInt
/**
* The sitemap generator.
*
* @var \Drupal\simple_sitemap\Plugin\simple_sitemap\SitemapGenerator\SitemapGeneratorInterface
* @var \Drupal\simple_sitemap\Plugin\simple_sitemap\SitemapGenerator\SitemapGeneratorInterface|null
*/
protected $sitemapGenerator;
/**
* The URL generators.
*
* @var \Drupal\simple_sitemap\Plugin\simple_sitemap\UrlGenerator\UrlGeneratorInterface[]
* @var \Drupal\simple_sitemap\Plugin\simple_sitemap\UrlGenerator\UrlGeneratorInterface[]|null
*/
protected $urlGenerators;
......
......@@ -46,7 +46,7 @@ abstract class EntityFormHandlerBase implements EntityFormHandlerInterface {
/**
* The entity being used by this form handler.
*
* @var \Drupal\Core\Entity\EntityInterface
* @var \Drupal\Core\Entity\EntityInterface|null
*/
protected $entity;
......
......@@ -79,7 +79,7 @@ class QueueWorker {
/**
* The sitemap entity.
*
* @var \Drupal\simple_sitemap\Entity\SimpleSitemapInterface
* @var \Drupal\simple_sitemap\Entity\SimpleSitemapInterface|null
*/
protected $sitemapProcessedNow;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment