- Issue created by @BenStallings
phpstan reports:
------ ------------------------------------------------------------------------------
Line modules/context_ui/src/ContextListBuilder.php
------ ------------------------------------------------------------------------------
78 Unsafe usage of new static().
💡 See:
https://phpstan.org/blog/solving-phpstan-error-unsafe-usage-of-new-static
------ ------------------------------------------------------------------------------------ ------------------------------------------------------------------------------
Line modules/context_ui/src/Controller/ContextUIController.php
------ ------------------------------------------------------------------------------
72 Unsafe usage of new static().
💡 See:
https://phpstan.org/blog/solving-phpstan-error-unsafe-usage-of-new-static
------ ------------------------------------------------------------------------------------ ------------------------------------------------------------------------------
Line modules/context_ui/src/Form/ConditionDeleteForm.php
------ ------------------------------------------------------------------------------
54 Unsafe usage of new static().
💡 See:
https://phpstan.org/blog/solving-phpstan-error-unsafe-usage-of-new-static
------ ------------------------------------------------------------------------------------ -----------------------------------------------------------------------------------
Line modules/context_ui/src/Form/ContextAddForm.php
------ -----------------------------------------------------------------------------------
27 Method Drupal\context_ui\Form\ContextAddForm::save() should return int but return
statement is missing.
------ ----------------------------------------------------------------------------------------- ------------------------------------------------------------------------------
Line modules/context_ui/src/Form/ContextDeleteForm.php
------ ------------------------------------------------------------------------------
37 Unsafe usage of new static().
💡 See:
https://phpstan.org/blog/solving-phpstan-error-unsafe-usage-of-new-static
------ ------------------------------------------------------------------------------------ ------------------------------------------------------------------------------
Line modules/context_ui/src/Form/ContextDisableForm.php
------ ------------------------------------------------------------------------------
37 Unsafe usage of new static().
💡 See:
https://phpstan.org/blog/solving-phpstan-error-unsafe-usage-of-new-static
------ ------------------------------------------------------------------------------------ ------------------------------------------------------------------------------
Line modules/context_ui/src/Form/ContextDuplicateForm.php
------ ------------------------------------------------------------------------------
37 Unsafe usage of new static().
💡 See:
https://phpstan.org/blog/solving-phpstan-error-unsafe-usage-of-new-static
------ ------------------------------------------------------------------------------------ -----------------------------------------------------------------------------
Line modules/context_ui/src/Form/ContextEditForm.php
------ -----------------------------------------------------------------------------
64 Method Drupal\context_ui\Form\ContextEditForm::save() should return int but
return statement is missing.
------ ----------------------------------------------------------------------------------- ------------------------------------------------------------------------------
Line modules/context_ui/src/Form/ContextFormBase.php
------ ------------------------------------------------------------------------------
57 Unsafe usage of new static().
💡 See:
https://phpstan.org/blog/solving-phpstan-error-unsafe-usage-of-new-static
------ ------------------------------------------------------------------------------------ ------------------------------------------------------------------------------
Line modules/context_ui/src/Form/ReactionDeleteForm.php
------ ------------------------------------------------------------------------------
55 Unsafe usage of new static().
💡 See:
https://phpstan.org/blog/solving-phpstan-error-unsafe-usage-of-new-static
------ ------------------------------------------------------------------------------------ ------------------------------------------------------------------------------
Line modules/context_ui/src/Plugin/Block/ContextInspector.php
------ ------------------------------------------------------------------------------
91 Unsafe usage of new static().
💡 See:
https://phpstan.org/blog/solving-phpstan-error-unsafe-usage-of-new-static
------ ------------------------------------------------------------------------------------ ------------------------------------------------------------------------
Line src/ContextManager.php
------ ------------------------------------------------------------------------
156 Method Drupal\context\ContextManager::getContext() should return
array|Drupal\context\ContextInterface but return statement is missing.
------ ------------------------------------------------------------------------------ -----------------------------------------------------------------------
Line src/Entity/Context.php
------ -----------------------------------------------------------------------
370 Method Drupal\context\Entity\Context::disable() should return
$this(Drupal\context\Entity\Context) but return statement is missing.
------ ----------------------------------------------------------------------------- ------------------------------------------------------------------------------
Line src/Entity/ContextAccess.php
------ ------------------------------------------------------------------------------
31 Unsafe usage of new static().
💡 See:
https://phpstan.org/blog/solving-phpstan-error-unsafe-usage-of-new-static
------ ------------------------------------------------------------------------------------ ------------------------------------------------------------------------------
Line src/Plugin/Condition/ContextAll.php
------ ------------------------------------------------------------------------------
50 Unsafe usage of new static().
💡 See:
https://phpstan.org/blog/solving-phpstan-error-unsafe-usage-of-new-static
------ ------------------------------------------------------------------------------------ ------------------------------------------------------------------------------
Line src/Plugin/Condition/ContextAny.php
------ ------------------------------------------------------------------------------
50 Unsafe usage of new static().
💡 See:
https://phpstan.org/blog/solving-phpstan-error-unsafe-usage-of-new-static
------ ------------------------------------------------------------------------------------ ------------------------------------------------------------------------------
Line src/Plugin/Condition/HttpStatusCode.php
------ ------------------------------------------------------------------------------
50 Unsafe usage of new static().
💡 See:
https://phpstan.org/blog/solving-phpstan-error-unsafe-usage-of-new-static
------ ------------------------------------------------------------------------------------ ------------------------------------------------------------------------------
Line src/Plugin/Condition/RequestDomain.php
------ ------------------------------------------------------------------------------
56 Unsafe usage of new static().
💡 See:
https://phpstan.org/blog/solving-phpstan-error-unsafe-usage-of-new-static
------ ------------------------------------------------------------------------------------ ------------------------------------------------------------------------------
Line src/Plugin/Condition/UserProfilePage.php
------ ------------------------------------------------------------------------------
62 Unsafe usage of new static().
💡 See:
https://phpstan.org/blog/solving-phpstan-error-unsafe-usage-of-new-static
------ ------------------------------------------------------------------------------------ ------------------------------------------------------------------------------
Line src/Plugin/Condition/ViewInclusion.php
------ ------------------------------------------------------------------------------
63 Unsafe usage of new static().
💡 See:
https://phpstan.org/blog/solving-phpstan-error-unsafe-usage-of-new-static
------ ------------------------------------------------------------------------------------ ------------------------------------------------------------------------------
Line src/Plugin/ContextReaction/Blocks.php
------ ------------------------------------------------------------------------------
158 Unsafe usage of new static().
💡 See:
https://phpstan.org/blog/solving-phpstan-error-unsafe-usage-of-new-static
300 \Drupal calls should be avoided in classes, use dependency injection instead
303 \Drupal calls should be avoided in classes, use dependency injection instead
------ ------------------------------------------------------------------------------------ ------------------------------------------------------------------------------
Line src/Plugin/ContextReaction/Menu.php
------ ------------------------------------------------------------------------------
40 Unsafe usage of new static().
💡 See:
https://phpstan.org/blog/solving-phpstan-error-unsafe-usage-of-new-static
------ ------------------------------------------------------------------------------------ ------------------------------------------------------------------------------
Line src/Plugin/ContextReaction/Regions.php
------ ------------------------------------------------------------------------------
63 Unsafe usage of new static().
💡 See:
https://phpstan.org/blog/solving-phpstan-error-unsafe-usage-of-new-static
------ ------------------------------------------------------------------------------------ ------------------------------------------------------------------------------
Line src/Plugin/ContextReaction/Theme.php
------ ------------------------------------------------------------------------------
55 Unsafe usage of new static().
💡 See:
https://phpstan.org/blog/solving-phpstan-error-unsafe-usage-of-new-static
85 \Drupal calls should be avoided in classes, use dependency injection instead
------ ------------------------------------------------------------------------------------ ------------------------------------------------------------------------------
Line src/Plugin/DisplayVariant/ContextBlockPageVariant.php
------ ------------------------------------------------------------------------------
90 Unsafe usage of new static().
💡 See:
https://phpstan.org/blog/solving-phpstan-error-unsafe-usage-of-new-static
------ ------------------------------------------------------------------------------------ ------------------------------------------------------------------------------
Line src/Reaction/Blocks/Controller/ContextReactionBlocksController.php
------ ------------------------------------------------------------------------------
79 Unsafe usage of new static().
💡 See:
https://phpstan.org/blog/solving-phpstan-error-unsafe-usage-of-new-static
------ ------------------------------------------------------------------------------------ ------------------------------------------------------------------------------
Line src/Reaction/Blocks/Form/BlockDeleteForm.php
------ ------------------------------------------------------------------------------
61 Unsafe usage of new static().
💡 See:
https://phpstan.org/blog/solving-phpstan-error-unsafe-usage-of-new-static
------ ------------------------------------------------------------------------------------ ------------------------------------------------------------------------------
Line src/Reaction/Blocks/Form/BlockFormBase.php
------ ------------------------------------------------------------------------------
159 Unsafe usage of new static().
💡 See:
https://phpstan.org/blog/solving-phpstan-error-unsafe-usage-of-new-static
------ ------------------------------------------------------------------------------------ ------------------------------------------------------------------------------
Line src/Theme/ThemeSwitcherNegotiator.php
------ ------------------------------------------------------------------------------
76 \Drupal calls should be avoided in classes, use dependency injection instead
80 \Drupal calls should be avoided in classes, use dependency injection instead
------ ------------------------------------------------------------------------------
phpstan analyse context
parent::createInstance()
rather than re-implementing __construct().parent::create()
rather than re-implementing __construct().parent::create()
instead of re-implementing __construct().Make an MR.
Active
5.0
Code