Your project should not use unstable versions of dependencies
- Read doc
- Reliability
- Major
More information: https://insight.symfony.com/what-we-analyse/composer.unfixed_dependency_version
Your project inheritance architecture should be valid
- Read doc
- Reliability
- Major
More information: https://insight.symfony.com/what-we-analyse/php.invalid_inheritance
- public static function getSubscribedEvents()
- {
- return [
- HookPostChangeEvent::class => ['clearCombinedAssetCache'],
- ConnectionChangeEvent::class => ['clearCombinedAssetCache']
- ];
- }
- public function clearCombinedAssetCache(): void
- {
Your project must not contain invalid instantiations
- Read doc
- Reliability
- Major
More information: https://insight.symfony.com/what-we-analyse/php.invalid_instantiation
- }
- private function createConnection(HookEvent $event, HookEventListenerInterface $listener): Connection
- {
- if (null !== $this->connectionRepository->findOneBy(['event' => $event->getClassname(), 'listener' => $listener->getClassname()])) {
- throw new Exception('Connection already exists, cannot create again.');
- }
- if (!\is_subclass_of($event, $listener->listensTo())) {
- throw new \InvalidArgumentException('This listener cannot listen to this event.');
- }
- $connection = new Connection($event->getClassname(), $listener->getClassname());
Your project should not contain duplicated code 4
- Read doc
- Productivity
- Minor
More information: https://insight.symfony.com/what-we-analyse/php.duplicated_code
- use Zikula\StaticContentModule\Block\Form\Type\FincludeBlockType;
- /**
- * Block to display the contents of a file given a path.
- */
- class FincludeBlock extends AbstractBlockHandler
- {
- public const FILETYPE_HTML = 0;
- public const FILETYPE_TEXT = 1;
- use Symfony\Component\Validator\Context\ExecutionContextInterface;
- use Symfony\Contracts\Translation\TranslatorInterface;
- use Zikula\Bundle\CoreBundle\Translation\TranslatorTrait;
- use Zikula\StaticContentModule\Block\FincludeBlock;
- class FincludeBlockType extends AbstractType
- {
- use TranslatorTrait;
- public function __construct(TranslatorInterface $translator)
- {
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
- namespace Zikula\StaticContentModule\Block\Form\Type;
- use Symfony\Component\Form\AbstractType;
- use Symfony\Component\Form\Extension\Core\Type\TextareaType;
- use Symfony\Component\Form\Extension\Core\Type\TextType;
- use Symfony\Component\Form\FormBuilderInterface;
- use Zikula\StaticContentModule\Block\Form\Type\XsltBlockType;
- /**
- * Block to display a parsed xml document.
- */
- class XsltBlock extends AbstractBlockHandler
- {
- public function display(array $properties): string
- {
- if (!$this->hasPermission('xsltblock::', $properties['title'] . '::', ACCESS_OVERVIEW)) {
- return '';