Dependencies not installable

More information: https://insight.symfony.com/what-we-analyse/composer.dependencies_not_installable

SymfonyInsight was not able to install your Composer dependencies. If you need to customize files or run commands to make it work, you can edit your SymfonyInsight project configuration to override the default "pre_composer_script" and/or "post_composer_script" settings.

Time to fix: about 3 hours
Open Issue Permalink
Collective
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Package operations: 101 installs, 0 updates, 0 removals
  - Installing composer/installers (v1.7.0): Downloading (100%)
  - Installing wikimedia/composer-merge-plugin (v1.4.1): Downloading (100%)
  - Installing kriswallsmith/assetic (v1.0.5): Downloading (100%)
  - Installing robloach/component-installer (0.2.3): Downloading (100%)
  - Installing behat/transliterator (v1.2.0): Downloading (100%)
  - Installing composer/semver (1.5.0): Downloading (100%)
  - Installing dimsemenov/magnific-popup (1.1.0): Downloading (100%)
  - Installing symfony/polyfill-mbstring (v1.12.0): Downloading (100%)
  - Installing symfony/polyfill-ctype (v1.12.0): Downloading (100%)
  - Installing twig/twig (v2.11.3): Downloading (100%)
  - Installing symfony/polyfill-php73 (v1.12.0): Downloading (100%)
  - Installing symfony/polyfill-php72 (v1.12.0): Downloading (100%)
  - Installing symfony/polyfill-intl-idn (v1.12.0): Downloading (100%)
  - Installing symfony/symfony (v4.3.4): Downloading (100%)
  - Installing symfony/polyfill-intl-icu (v1.12.0): Downloading (100%)
  - Installing psr/container (1.0.0): Downloading (100%)
  - Installing psr/cache (1.0.1): Downloading (100%)
  - Installing symfony/contracts (v1.1.5): Downloading (100%)
  - Installing psr/log (1.1.0): Downloading (100%)
  - Installing psr/link (1.0.0): Downloading (100%)
  - Installing fig/link-util (1.0.0): Downloading (100%)
  - Installing doctrine/lexer (1.1.0): Downloading (100%)
  - Installing doctrine/annotations (v1.7.0): Downloading (100%)
  - Installing doctrine/reflection (v1.0.0): Downloading (100%)
  - Installing doctrine/event-manager (v1.0.0): Downloading (100%)
  - Installing doctrine/collections (v1.6.2): Downloading (100%)
  - Installing doctrine/cache (v1.8.0): Downloading (100%)
  - Installing doctrine/persistence (1.1.1): Downloading (100%)
  - Installing jdorn/sql-formatter (v1.2.17): Downloading (100%)
  - Installing doctrine/inflector (v1.3.0): Downloading (100%)
  - Installing doctrine/doctrine-cache-bundle (1.3.5): Downloading (100%)
  - Installing doctrine/dbal (v2.9.2): Downloading (100%)
  - Installing doctrine/doctrine-bundle (1.11.2): Downloading (100%)
  - Installing doctrine/instantiator (1.2.0): Downloading (100%)
  - Installing doctrine/common (v2.10.0): Downloading (100%)
  - Installing doctrine/orm (v2.6.3): Downloading (100%)
  - Installing egulias/email-validator (2.1.11): Downloading (100%)
  - Installing elao/web-profiler-extra-bundle (v2.3.6): Downloading (100%)
  - Installing willdurand/jsonp-callback-validator (v1.1.0): Downloading (100%)
  - Installing friendsofsymfony/jsrouting-bundle (2.4.0): Downloading (100%)
  - Installing guzzlehttp/promises (v1.3.1): Downloading (100%)
  - Installing ralouphie/getallheaders (3.0.3): Downloading (100%)
  - Installing psr/http-message (1.0.1): Downloading (100%)
  - Installing guzzlehttp/psr7 (1.6.1): Downloading (100%)
  - Installing ircmaxell/security-lib (v1.1.0): Downloading (100%)
  - Installing ircmaxell/random-lib (v1.2.0): Downloading (100%)
  - Installing jquery.mmenu (7.3.3): Downloading (100%)
  - Installing jakeasmith/http_build_url (1.0.1): Downloading (100%)
  - Installing jms/i18n-routing-bundle (3.0.3): Downloading (100%)
  - Installing nikic/php-parser (v4.2.3): Downloading (100%)
  - Installing jms/translation-bundle (1.4.4): Downloading (100%)
  - Installing justinrainbow/json-schema (5.2.8): Downloading (100%)
  - Installing knplabs/knp-menu (2.5.0): Downloading (100%)
  - Installing knplabs/knp-menu-bundle (2.2.2): Downloading (100%)
  - Installing paragonie/random_compat (v9.99.99): Downloading (100%)
  - Installing guzzlehttp/guzzle (6.3.3): Downloading (100%)
  - Installing league/oauth2-client (2.4.1): Downloading (100%)
  - Installing imagine/imagine (v0.7.1): Downloading (100%)
  - Installing liip/imagine-bundle (2.1.0): Downloading (100%)
  - Installing matthiasnoback/symfony-console-form (v3.6.0): Downloading (100%)
  - Installing michelf/php-markdown (1.8.0): Downloading (100%)
  - Installing oyejorge/less.php (dev-master 42925c5): Downloading (100%)
  - Installing ezyang/htmlpurifier (dev-master ab2887e): Downloading (100%)
  - Installing phpids/phpids (dev-master dfc1476): Downloading (100%)
  - Installing sensio/framework-extra-bundle (dev-master 197eb89): Downloading (100%)
  - Installing composer/ca-bundle (1.2.3): Downloading (100%)
  - Installing sensiolabs/security-checker (v5.0.3): Downloading (100%)
  - Installing gedmo/doctrine-extensions (v2.4.37): Downloading (100%)
  - Installing stof/doctrine-extensions-bundle (v1.3.0): Downloading (100%)
  - Installing symfony/maker-bundle (v1.13.0): Downloading (100%)
  - Installing monolog/monolog (1.24.0): Downloading (100%)
  - Installing symfony/monolog-bundle (v3.4.0): Downloading (100%)
  - Installing symfony/polyfill-iconv (v1.12.0): Downloading (100%)
  - Installing swiftmailer/swiftmailer (v6.2.1): Downloading (100%)
  - Installing symfony/swiftmailer-bundle (v3.2.8): Downloading (100%)
  - Installing twig/extensions (v1.5.4): Downloading (100%)
  - Installing components/jquery (3.3.1): Downloading (100%)
  - Installing vakata/jstree (3.3.8): Downloading (100%)
  - Installing willdurand/js-translation-bundle (2.6.6): Downloading (100%)
  - Installing zikula/andreas08-theme (3.1.1): Downloading (100%)
  - Installing components/bootstrap (3.4.1): Downloading (100%)
  - Installing zikula/bootstrap-bundle (3.0.1): Downloading (100%)
  - Installing zikula/filesystem (1.0.0): Downloading (100%)
  - Installing components/font-awesome (4.7.0): Downloading (100%)
  - Installing zikula/fontawesome-bundle (4.1.0): Downloading (100%)
  - Installing zikula/generator-bundle (3.0.1): Downloading (100%)
  - Installing zikula/jquery-bundle (2.0.0): Downloading (100%)
  - Installing components/jqueryui (1.12.1): Downloading (100%)
  - Installing zikula/jquery-ui-bundle (1.0.0): Downloading (100%)
  - Installing zikula/legal-module (3.2.5): Downloading (100%)
  - Installing league/oauth2-linkedin (4.1.1): Downloading (100%)
  - Installing league/oauth2-instagram (2.0.0): Downloading (100%)
  - Installing league/oauth2-google (3.0.1): Downloading (100%)
  - Installing league/oauth2-github (2.0.0): Downloading (100%)
  - Installing league/oauth2-facebook (2.0.1): Downloading (100%)
  - Installing zikula/oauth-module (1.1.1): Downloading (100%)
  - Installing zikula/pagelock-module (1.3.5): Downloading (100%)
  - Installing zikula/profile-module (3.1.7): Downloading (100%)
  - Installing zikula/seabreeze-theme (4.1.2): Downloading (100%)
  - Installing zikula/wizard (3.0.1): Downloading (100%)
  - Installing symfony/phpunit-bridge (v4.3.4): Downloading (100%)
symfony/contracts suggests installing psr/event-dispatcher (When using the EventDispatcher contracts)
symfony/contracts suggests installing symfony/cache-implementation
symfony/contracts suggests installing symfony/event-dispatcher-implementation
symfony/contracts suggests installing symfony/http-client-implementation
symfony/contracts suggests installing symfony/service-implementation
symfony/contracts suggests installing symfony/translation-implementation
doctrine/cache suggests installing alcaeus/mongo-php-adapter (Required to use legacy MongoDB driver)
doctrine/doctrine-cache-bundle suggests installing symfony/security-acl (For using this bundle to cache ACLs)
guzzlehttp/psr7 suggests installing zendframework/zend-httphandlerrunner (Emit PSR-7 responses)
paragonie/random_compat suggests installing ext-libsodium (Provides a modern crypto API that can be used to generate random bytes.)
imagine/imagine suggests installing ext-gmagick (to use the Gmagick implementation)
imagine/imagine suggests installing ext-imagick (to use the Imagick implementation)
liip/imagine-bundle suggests installing alcaeus/mongo-php-adapter (required on PHP >= 7.0 to use mongo components with mongodb extension)
liip/imagine-bundle suggests installing amazonwebservices/aws-sdk-for-php (required to use AWS version 1 cache resolver)
liip/imagine-bundle suggests installing aws/aws-sdk-php (required to use AWS version 2/3 cache resolver)
liip/imagine-bundle suggests installing doctrine/mongodb-odm (required to use mongodb-backed doctrine components)
liip/imagine-bundle suggests installing enqueue/enqueue-bundle (^0.7 add if you like to process images in background)
liip/imagine-bundle suggests installing ext-gmagick (required to use gmagick driver)
liip/imagine-bundle suggests installing ext-imagick (required to use imagick driver)
liip/imagine-bundle suggests installing ext-mongo (required for mongodb components on PHP <7.0)
liip/imagine-bundle suggests installing ext-mongodb (required for mongodb components on PHP >=7.0)
liip/imagine-bundle suggests installing league/flysystem (required to use FlySystem data loader or cache resolver)
sensio/framework-extra-bundle suggests installing symfony/psr-http-message-bridge (To use the PSR-7 converters)
gedmo/doctrine-extensions suggests installing doctrine/mongodb-odm (to use the extensions with the MongoDB ODM)
stof/doctrine-extensions-bundle suggests installing doctrine/mongodb-odm-bundle (to use the MongoDB ODM extensions)
monolog/monolog suggests installing aws/aws-sdk-php (Allow sending log messages to AWS services like DynamoDB)
monolog/monolog suggests installing doctrine/couchdb (Allow sending log messages to a CouchDB server)
monolog/monolog suggests installing ext-amqp (Allow sending log messages to an AMQP server (1.0+ required))
monolog/monolog suggests installing ext-mongo (Allow sending log messages to a MongoDB server)
monolog/monolog suggests installing graylog2/gelf-php (Allow sending log messages to a GrayLog2 server)
monolog/monolog suggests installing mongodb/mongodb (Allow sending log messages to a MongoDB server via PHP Driver)
monolog/monolog suggests installing php-amqplib/php-amqplib (Allow sending log messages to an AMQP server using php-amqplib)
monolog/monolog suggests installing php-console/php-console (Allow sending log messages to Google Chrome)
monolog/monolog suggests installing rollbar/rollbar (Allow sending log messages to Rollbar)
monolog/monolog suggests installing ruflin/elastica (Allow sending log messages to an Elastic Search server)
monolog/monolog suggests installing sentry/sentry (Allow sending log messages to a Sentry server)
swiftmailer/swiftmailer suggests installing true/punycode (Needed to support internationalized email addresses, if ext-intl is not installed)
components/bootstrap suggests installing components/bootstrap-default (Provide a theme for Bootstrap as components/bootstrap only provides the CSS as file assets)
Generating optimized autoload files
> ComponentInstaller\Installer::postAutoloadDump
Compiling component files
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - This package requires php >=7.2.0 but your PHP version (7.1.20) does not satisfy that requirement.
  Problem 2
    - This package requires php >=7.2.0 but your PHP version (7.1.20) does not satisfy that requirement.
  Problem 3
    - This package requires php >=7.2.0 but your PHP version (7.1.20) does not satisfy that requirement.
  Problem 4
    - This package requires php >=7.2.0 but your PHP version (7.1.20) does not satisfy that requirement.
  Problem 5
    - This package requires php >=7.2.0 but your PHP version (7.1.20) does not satisfy that requirement.
  Problem 6
    - This package requires php >=7.2.0 but your PHP version (7.1.20) does not satisfy that requirement.
  Problem 7
    - This package requires php >=7.2.0 but your PHP version (7.1.20) does not satisfy that requirement.
  Problem 8
    - This package requires php >=7.2.0 but your PHP version (7.1.20) does not satisfy that requirement.
  Problem 9
    - This package requires php >=7.2.0 but your PHP version (7.1.20) does not satisfy that requirement.
  Problem 10
    - This package requires php >=7.2.0 but your PHP version (7.1.20) does not satisfy that requirement.
  Problem 11
    - This package requires php >=7.2.0 but your PHP version (7.1.20) does not satisfy that requirement.
  Problem 12
    - This package requires php >=7.2.0 but your PHP version (7.1.20) does not satisfy that requirement.
  Problem 13
    - This package requires php >=7.2.0 but your PHP version (7.1.20) does not satisfy that requirement.
  Problem 14
    - This package requires php >=7.2.0 but your PHP version (7.1.20) does not satisfy that requirement.
  Problem 15
    - This package requires php >=7.2.0 but your PHP version (7.1.20) does not satisfy that requirement.
  Problem 16
    - This package requires php >=7.2.0 but your PHP version (7.1.20) does not satisfy that requirement.
  Problem 17
    - This package requires php >=7.2.0 but your PHP version (7.1.20) does not satisfy that requirement.
  Problem 18
    - This package requires php >=7.2.0 but your PHP version (7.1.20) does not satisfy that requirement.
  Problem 19
    - This package requires php >=7.2.0 but your PHP version (7.1.20) does not satisfy that requirement.
  Problem 20
    - This package requires php >=7.2.0 but your PHP version (7.1.20) does not satisfy that requirement.
  Problem 21
    - This package requires php >=7.2.0 but your PHP version (7.1.20) does not satisfy that requirement.
  Problem 22
    - This package requires php >=7.2.0 but your PHP version (7.1.20) does not satisfy that requirement.
  Problem 23
    - This package requires php >=7.2.0 but your PHP version (7.1.20) does not satisfy that requirement.
  Problem 24
    - This package requires php >=7.2.0 but your PHP version (7.1.20) does not satisfy that requirement.
  Problem 25
    - This package requires php >=7.2.0 but your PHP version (7.1.20) does not satisfy that requirement.
  Problem 26
    - This package requires php >=7.2.0 but your PHP version (7.1.20) does not satisfy that requirement.
  Problem 27
    - This package requires php >=7.2.0 but your PHP version (7.1.20) does not satisfy that requirement.
  Problem 28
    - This package requires php >=7.2.0 but your PHP version (7.1.20) does not satisfy that requirement.
  Problem 29
    - This package requires php >=7.2.0 but your PHP version (7.1.20) does not satisfy that requirement.
  Problem 30
    - This package requires php >=7.2.0 but your PHP version (7.1.20) does not satisfy that requirement.
  Problem 31
    - This package requires php >=7.2.0 but your PHP version (7.1.20) does not satisfy that requirement.
  Problem 32
    - doctrine/lexer 1.1.0 requires php ^7.2 -> your PHP version (7.1.20) does not satisfy that requirement.
    - doctrine/lexer 1.1.0 requires php ^7.2 -> your PHP version (7.1.20) does not satisfy that requirement.
    - Installation request for doctrine/lexer 1.1.0 -> satisfiable by doctrine/lexer[1.1.0].


Fatal error: Class 'Sensio\Bundle\DistributionBundle\Composer\ScriptHandler' not found in /home/foobar/code/src/lib/Zikula/Composer/CopyRequirementsFile.php on line 20

Your project should use Doctrine migrations

More information: https://insight.symfony.com/what-we-analyse/composer.using_migrations

Use Doctrine Migrations to keep your production database synchronized

Time to fix: about 1 hour
Open Issue Permalink
Collective

Use interfaces instead of classes in typehints

More information: https://insight.symfony.com/what-we-analyse/symfony.dependency_injection.use_interface_type_hint

  1. /**
  2. * @var int
  3. */
  4. private $cookieLifeTime = 604800;
  5. public function __construct(

    You should use the interface Symfony\Component\HttpFoundation\Session\SessionStorageInterface instead of the class Symfony\Component\HttpFoundation\Session\Storage\MetadataBag as a typehint.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Axel Guckelsberger
  6. VariableApiInterface $variableApi,
  7. array $options = [],
  8. SessionHandlerInterface $handler = null,
  9. MetadataBag $metaBag = null
  10. ) {

Source code should not contain tasks comments 11

More information: https://insight.symfony.com/what-we-analyse/task_fixme_comment

  1. private function getDocCommentForNode(Node $node): ?string
  2. {
  3. // check if there is a doc comment for the ID argument
  4. // ->trans(/** @Desc("FOO") */ 'my.id')
  5. /* TODO check whether this can be entirely removed, refs #3941

    Tasks comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

    Time to fix: about 2 hours
    Open Issue Permalink
    Last edited by Guite
  6. if (null !== $comment = $node->args[0]->getDocComment()) {
  7. return $comment->getText();
  8. }*/
  9. // this may be placed somewhere up in the hierarchy,
  1. */
  2. protected function initialize(): void
  3. {
  4. $this->loadResources();
  5. // TODO remove again

    Tasks comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

    Time to fix: about 2 hours
    Open Issue Permalink
    Last edited by Guite
  6. if (empty($this->loaderIds)) {
  7. $this->loaderIds = [
  8. 'dummy' => [
  9. 'po' => PoFileLoader::class,
  10. 'pot' => MockPotFileLoader::class,
  1. * For this all registries are checked to see if the given category is contained in the corresponding subtree.
  2. * If yes, the mapping table of the corresponding module is checked to see if it contains the given category.
  3. */
  4. public function mayCategoryBeDeletedOrMoved(CategoryEntity $category): bool
  5. {
  6. // TODO #3920

    Tasks comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

    Time to fix: about 2 hours
    Open Issue Permalink
    Last edited by Guite
  7. return true;
  8. // collect parents
  9. $isOnTop = false;
  10. $parentIds = [$category->getId()];
  1. {% endfor %}
  2. </tbody>
  3. </table>
  4. {{ pager({rowcount:pager.count, limit:pager.limit, route:'zikulaextensionsmodule_module_viewmodulelist'}) }}
  5. {{ adminFooter() }}
  6. {# todo move to own file #}

    Tasks comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

    Time to fix: about 2 hours
    Open Issue Permalink
    Last edited by Guite
  7. {% set initScript %}
  8. <script>
  9. ( function($) {
  10. $(document).ready(function() {
  11. $('i[class*=fa-caret-]').on('click', function() {
  1. {{ adminHeader() }}{# @todo wrong header! see below #}

    Tasks comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

    Time to fix: about 2 hours
    Open Issue Permalink
    Last edited by Craig Heydenburg
  2. {#{admincategorymenu}#}
  3. {#<div class="z-admin-content clearfix">#}
  4. {#{modgetinfo modname=$currentmodule info='displayname' assign='displayName'}#}
  5. {#{modgetimage modname=$currentmodule assign='image'}#}
  1. $container = $this->container;
  2. if ($route->getTranslatable()) {
  3. $languages = $container->get(LocaleApi::class)->getSupportedLocales();
  4. // TODO migrate this legacy call

    Tasks comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

    Time to fix: about 2 hours
    Open Issue Permalink
    Last edited by Guite
  5. $isRequiredLangParam = true;//ZLanguage::isRequiredLangParam();
  6. if (!$isRequiredLangParam) {
  7. $defaultLanguage = $this->variableApi->getSystemVar('language_i18n');
  8. unset($languages[array_search($defaultLanguage, $languages, true)]);
  9. }
  1. }
  2. if ('Filter' === $namespace) {
  3. if (
  4. // Do not allow Filter.Custom for now. Causing errors.
  5. // TODO research why Filter.Custom is causing exceptions and correct.

    Tasks comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

    Time to fix: about 2 hours
    Open Issue Permalink
    Last edited by Axel Guckelsberger
  6. ('Custom' === $directive)
  7. // Do not allow Filter.ExtractStyleBlock* for now. Causing errors.
  8. // TODO Filter.ExtractStyleBlock* requires CSSTidy
  9. || (false !== mb_stripos($directive, 'ExtractStyleBlock'))
  10. ) {
  1. if (
  2. // Do not allow Filter.Custom for now. Causing errors.
  3. // TODO research why Filter.Custom is causing exceptions and correct.
  4. ('Custom' === $directive)
  5. // Do not allow Filter.ExtractStyleBlock* for now. Causing errors.
  6. // TODO Filter.ExtractStyleBlock* requires CSSTidy

    Tasks comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

    Time to fix: about 2 hours
    Open Issue Permalink
    Last edited by Axel Guckelsberger
  7. || (false !== mb_stripos($directive, 'ExtractStyleBlock'))
  8. ) {
  9. continue;
  10. }
  11. }
  1. // PHPIDS should run with PHP 5.1.2 but this is untested - set this value to force compatibilty with minor versions
  2. $config['General']['min_php_version'] = '5.1.6';
  3. // caching settings
  4. // @todo: add UI for those caching settings

    Tasks comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

    Time to fix: about 2 hours
    Open Issue Permalink
    Last edited by Drak
  5. $config['Caching'] = [];
  6. // caching method (session|file|database|memcached|none), default file
  7. $config['Caching']['caching'] = 'none'; // deactivate caching for now
  8. $config['Caching']['expiration_time'] = 600;
  1. public function getBrowserLocale(string $default = 'en'): string
  2. {
  3. $request = null !== $this->requestStack ? $this->requestStack->getCurrentRequest() : null;
  4. // @todo consider http://php.net/manual/en/locale.acceptfromhttp.php and http://php.net/manual/en/locale.lookup.php

    Tasks comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

    Time to fix: about 2 hours
    Open Issue Permalink
    Last edited by Craig Heydenburg
  5. if (null === $request || 'cli' === PHP_SAPI || !$request->server->has('HTTP_ACCEPT_LANGUAGE')) {
  6. return $default;
  7. }
  8. preg_match_all('~([\w-]+)(?:[^,\d]+([\d.]+))?~', mb_strtolower($request->server->get('HTTP_ACCEPT_LANGUAGE')), $matches, PREG_SET_ORDER);
  9. $availableLanguages = [];
  1. $variableApi->del(VariableApi::CONFIG, 'language');
  2. }
  3. foreach ($data as $name => $value) {
  4. $variableApi->set(VariableApi::CONFIG, $name, $value);
  5. }
  6. $variableApi->set(VariableApi::CONFIG, 'locale', $data['language_i18n']); // @todo which variable are we using?

    Tasks comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

    Time to fix: about 2 hours
    Open Issue Permalink
    Last edited by Guite
  7. $multilingualRoutingHelper->reloadMultilingualRoutingSettings(); // resets config/dynamic/generated.yml & custom_parameters.yml
  8. if (null !== $request->getSession()) {
  9. $request->getSession()->set('_locale', $data['language_i18n']);
  10. }

Files should not be executable

More information: https://insight.symfony.com/what-we-analyse/php.too_permissive_file_permissions

Your project contains files with permissive permissions. In order to avoid opening a security breach, you should restrict execution rights on following files:

  • src/app/config/config.yml
  • src/app/config/dynamic/default.yml
  • src/app/config/parameters.yml
  • src/app/config/routing.yml

Time to fix: about 15 minutes
Open Issue Permalink
Collective
chmod a-x 'src/app/config/config.yml' \
    'src/app/config/dynamic/default.yml' \
    'src/app/config/parameters.yml' \
    'src/app/config/routing.yml'

Code should not be duplicated 15

More information: https://insight.symfony.com/what-we-analyse/php.duplicated_code

  1. $status = $status ? 'A' : 'I';
  2. }
  3. $this->status = $status;
  4. }
  5. public function getCr_date(): DateTime

    The next 41 lines appear both in src/system/CategoriesModule/Entity/CategoryEntity.php:396 and src/system/CategoriesModule/Entity/CategoryRegistryEntity.php:169.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. return $this->cr_date;
  8. }
  9. public function setCr_date(DateTime $cr_date): void
  1. if ($currentStage instanceof WizardCompleteInterface) {
  2. return $currentStage->getResponse($request);
  3. }
  4. $templateParams = $this->controllerHelper->getTemplateGlobals($currentStage);
  5. $templateParams['headertemplate'] = '@ZikulaCoreInstaller/installheader.html.twig';
  6. if ($wizard->isHalted()) {

    The next 14 lines appear both in src/lib/Zikula/Bundle/CoreInstallerBundle/Controller/InstallerController.php:55 and src/lib/Zikula/Bundle/CoreInstallerBundle/Controller/UpgraderController.php:63.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Craig Heydenburg
  7. $request->getSession()->getFlashBag()->add('danger', $wizard->getWarning());
  8. return $this->renderResponse('ZikulaCoreInstallerBundle::error.html.twig', $templateParams);
  9. }
  1. *
  2. * @ORM\Column(name="sortorder", type="smallint", nullable=false)
  3. */
  4. private $sortorder;
  5. public function getId(): int

    The next 54 lines appear both in src/lib/Zikula/Bundle/HookBundle/Dispatcher/Storage/Doctrine/Entity/HookBindingEntity.php:78 and src/lib/Zikula/Bundle/HookBundle/Dispatcher/Storage/Doctrine/Entity/HookRuntimeEntity.php:92.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. return $this->id;
  8. }
  9. public function setSowner(string $sowner): self
  1. /**
  2. * IdentityTranslator does not translate anything.
  3. */
  4. class IdentityTranslator extends SymfonyIdentityTranslator implements TranslatorInterface
  5. {
  6. public function __(string $msg, string $domain = null, string $locale = null): string

    The next 28 lines appear both in src/lib/Zikula/Common/Translator/IdentityTranslator.php:23 and src/lib/Zikula/Common/Translator/Translator.php:193.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Guite
  7. {
  8. return $this->trans($msg, [], $domain, $locale);
  9. }
  10. public function _n(string $m1, string $m2, int $number, string $domain = null, string $locale = null): string
  1. *
  2. * For the full copyright and license information, please view the LICENSE
  3. * file that was distributed with this source code.
  4. */
  5. namespace Zikula\AdminModule\Form\Type;

    The next 33 lines appear both in src/system/AdminModule/Form/Type/ConfigType.php:14 and src/system/GroupsModule/Form/Type/ConfigType.php:14.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Axel Guckelsberger
  6. use Symfony\Component\Form\AbstractType;
  7. use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
  8. use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
  9. use Symfony\Component\Form\Extension\Core\Type\IntegerType;
  1. *
  2. * For the full copyright and license information, please view the LICENSE
  3. * file that was distributed with this source code.
  4. */
  5. namespace Zikula\AdminModule\Form\Type;

    The next 41 lines appear both in src/system/AdminModule/Form/Type/ConfigType.php:14 and src/system/SearchModule/Form/Type/ConfigType.php:14.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Axel Guckelsberger
  6. use Symfony\Component\Form\AbstractType;
  7. use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
  8. use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
  9. use Symfony\Component\Form\Extension\Core\Type\IntegerType;
  1. }
  2. public function buildForm(FormBuilderInterface $builder, array $options)
  3. {
  4. $builder
  5. ->add('name', TextType::class, [

    The next 37 lines appear both in src/system/AdminModule/Form/Type/CreateCategoryType.php:46 and src/system/AdminModule/Form/Type/EditCategoryType.php:48.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Axel Guckelsberger
  6. 'label' => $this->__('Name'),
  7. 'attr' => [
  8. 'maxlength' => 50
  9. ]
  10. ])
  1. *
  2. * For the full copyright and license information, please view the LICENSE
  3. * file that was distributed with this source code.
  4. */
  5. namespace Zikula\BlocksModule\Container;

    The next 50 lines appear both in src/system/BlocksModule/Container/LinkContainer.php:14 and src/system/MenuModule/Container/LinkContainer.php:14.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Craig Heydenburg
  6. use Symfony\Component\Routing\RouterInterface;
  7. use Zikula\Common\Translator\TranslatorInterface;
  8. use Zikula\Core\LinkContainer\LinkContainerInterface;
  9. use Zikula\PermissionsModule\Api\ApiInterface\PermissionApiInterface;
  1. *
  2. * For the full copyright and license information, please view the LICENSE
  3. * file that was distributed with this source code.
  4. */
  5. namespace Zikula\BlocksModule\Container;

    The next 51 lines appear in src/system/BlocksModule/Container/LinkContainer.php:14, src/system/ExtensionsModule/Container/LinkContainer.php:14 and src/system/PermissionsModule/Container/LinkContainer.php:14.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Craig Heydenburg
  6. use Symfony\Component\Routing\RouterInterface;
  7. use Zikula\Common\Translator\TranslatorInterface;
  8. use Zikula\Core\LinkContainer\LinkContainerInterface;
  9. use Zikula\PermissionsModule\Api\ApiInterface\PermissionApiInterface;
  1. *
  2. * For the full copyright and license information, please view the LICENSE
  3. * file that was distributed with this source code.
  4. */
  5. namespace Zikula\BlocksModule\Container;

    The next 56 lines appear in src/system/BlocksModule/Container/LinkContainer.php:14, src/system/MailerModule/Container/LinkContainer.php:14, src/system/SettingsModule/Container/LinkContainer.php:14 and src/system/ThemeModule/Container/LinkContainer.php:14.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Craig Heydenburg
  6. use Symfony\Component\Routing\RouterInterface;
  7. use Zikula\Common\Translator\TranslatorInterface;
  8. use Zikula\Core\LinkContainer\LinkContainerInterface;
  9. use Zikula\PermissionsModule\Api\ApiInterface\PermissionApiInterface;
  1. }
  2. $form = $this->createFormBuilder($this->getVars())
  3. ->add('collapseable', CheckboxType::class, [
  4. 'label' => $this->__('Enable block collapse icons'),
  5. 'required' => false

    The next 22 lines appear both in src/system/BlocksModule/Controller/ConfigController.php:49 and src/system/ExtensionsModule/Controller/ConfigController.php:65.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Axel Guckelsberger
  6. ])
  7. ->add('save', SubmitType::class, [
  8. 'label' => $this->__('Save'),
  9. 'icon' => 'fa-check',
  10. 'attr' => [
  1. * @ORM\Column(type="string", length=64)
  2. * @var string
  3. */
  4. private $coreCompatibility;
  5. public function getId(): int

    The next 41 lines appear both in src/system/ExtensionsModule/Entity/ExtensionEntity.php:95 and src/system/ThemeModule/Entity/ThemeEntity.php:132.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. return $this->id;
  8. }
  9. public function setId(int $id): void
  1. $groupsCommon = new CommonHelper($this->translator);
  2. $typeChoices = array_flip($groupsCommon->gtypeLabels());
  3. $stateChoices = array_flip($groupsCommon->stateLabels());
  4. $builder
  5. ->add('name', TextType::class, [

    The next 25 lines appear both in src/system/GroupsModule/Form/Type/CreateGroupType.php:55 and src/system/GroupsModule/Form/Type/EditGroupType.php:57.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Axel Guckelsberger
  6. 'label' => $this->__('Name'),
  7. 'attr' => [
  8. 'maxlength' => 30
  9. ],
  10. 'constraints' => [
  1. $query = $qb->getQuery();
  2. return (int)$query->getSingleScalarResult();
  3. }
  4. public function getResults(array $filters = [], array $sorting = [], int $limit = 0, int $offset = 0): array

    The next 33 lines appear both in src/system/SearchModule/Entity/Repository/SearchResultRepository.php:48 and src/system/SearchModule/Entity/Repository/SearchStatRepository.php:43.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Guite
  5. {
  6. $qb = $this->createQueryBuilder('tbl')
  7. ->select('tbl');
  8. // add clauses for where
  1. *
  2. * For the full copyright and license information, please view the LICENSE
  3. * file that was distributed with this source code.
  4. */
  5. namespace Zikula\UsersModule\Validator\Constraints;

    The next 64 lines appear both in src/system/UsersModule/Validator/Constraints/ValidEmailValidator.php:14 and src/system/ZAuthModule/Validator/Constraints/ValidEmailValidator.php:14.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Craig Heydenburg
  6. use Symfony\Component\Validator\Constraint;
  7. use Symfony\Component\Validator\Constraints\Email;
  8. use Symfony\Component\Validator\ConstraintValidator;
  9. use Symfony\Component\Validator\ConstraintViolationListInterface;

The Doctrine Entity Manager should not be passed as an argument

More information: https://insight.symfony.com/what-we-analyse/symfony.dependency_injection.no_entity_manager_as_parameter

  1. public function getEntityManager(): ?EntityManagerInterface
  2. {
  3. return $this->entityManager;
  4. }
  5. public function setEntityManager(EntityManagerInterface $entityManager = null): void

    A Doctrine entity manager has been found as an argument.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. if ($this->entityManager !== $entityManager) {
  8. $this->entityManager = $entityManager;
  9. }
  10. }

Error silenced by the at sign (@)

More information: https://insight.symfony.com/what-we-analyse/php.silenced_error

  1. $this->entityManager->flush();
  2. }
  3. private function isSerialized($string): bool
  4. {
  5. return 'b:0;' === $string || false !== @unserialize($string);

    Adding "@" before unserialize($string) prevents warning and errors during this function execution from being displayed.
    If you need to do that, you should probably implement a better way to qualify and recover from errors, using Exceptions.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Axel Guckelsberger
  6. }
  7. }

Boolean property should not be prefixed by "is" 4

More information: https://insight.symfony.com/what-we-analyse/php.bad_mutator_method_name_for_boolean_property

  1. }
  2. /**
  3. * Alias for Symfony Forms.
  4. */
  5. public function getIsLocked(): bool

    Boolean property accessor should not be setIsXXX nor getIsXXX but setXXX and isXXX.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. return $this->getIs_locked();
  8. }
  9. public function setIs_locked(bool $is_locked): void
  1. }
  2. /**
  3. * Alias for Symfony Forms
  4. */
  5. public function setIsLocked(bool $isLocked): void

    Boolean property accessor should not be setIsXXX nor getIsXXX but setXXX and isXXX.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. $this->setIs_locked($isLocked);
  8. }
  9. public function getIs_leaf(): bool
  1. }
  2. /**
  3. * Alias for Symfony Forms
  4. */
  5. public function getIsLeaf(): bool

    Boolean property accessor should not be setIsXXX nor getIsXXX but setXXX and isXXX.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. return $this->getIs_leaf();
  8. }
  9. public function setIs_leaf(bool $is_leaf): void
  1. }
  2. /**
  3. * Alias for Symfony Forms
  4. */
  5. public function setIsLeaf(bool $isLeaf): void

    Boolean property accessor should not be setIsXXX nor getIsXXX but setXXX and isXXX.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. $this->setIs_leaf($isLeaf);
  8. }
  9. public function getName(): string

Form types should be in Form folders

More information: https://insight.symfony.com/what-we-analyse/symfony.form.form_type_not_in_type_form_folder

A form type has been found outside Form folder

Time to fix: about 2 hours
Open Issue Permalink
Collective
  • src/lib/Zikula/Common/Content
    • AbstractContentFormType.php

      A form type has been found outside Form folder

    • AbstractContentType.php
    • ContentTypeInterface.php

Commented code should not be committed 15

More information: https://insight.symfony.com/what-we-analyse/php.commented_out_code

  1. }
  2. }
  3. // foreach ($this->loaderIds as $id => $aliases) {
  4. // foreach ($aliases as $alias) {
  5. // $this->addLoader($alias, $this->container->get($id));

    Commented out code reduces readability and lowers the code confidence for other developers. If it's common usage for debug, it should not be committed. Using a version control system, such code can be safely removed.

    Time to fix: about 30 minutes
    Open Issue Permalink
    Last edited by Guite
  6. // }
  7. // }
  8. }
  9. /**
  1. $container = $this->container;
  2. if ($route->getTranslatable()) {
  3. $languages = $container->get(LocaleApi::class)->getSupportedLocales();
  4. // TODO migrate this legacy call
  5. $isRequiredLangParam = true;//ZLanguage::isRequiredLangParam();

    Commented out code reduces readability and lowers the code confidence for other developers. If it's common usage for debug, it should not be committed. Using a version control system, such code can be safely removed.

    Time to fix: about 30 minutes
    Open Issue Permalink
    Last edited by Guite
  6. if (!$isRequiredLangParam) {
  7. $defaultLanguage = $this->variableApi->getSystemVar('language_i18n');
  8. unset($languages[array_search($defaultLanguage, $languages, true)]);
  9. }
  10. if (count($languages) > 0) {
  1. if ($request->server->has('USER_AGENT')) {
  2. $requestArgs['USER_AGENT'] = $request->server->get('USER_AGENT');
  3. }
  4. // while i think that REQUEST_URI is unnecessary,
  5. // the REFERER would be important, but results in way too many false positives
  6. /*

    Commented out code reduces readability and lowers the code confidence for other developers. If it's common usage for debug, it should not be committed. Using a version control system, such code can be safely removed.

    Time to fix: about 30 minutes
    Open Issue Permalink
    Last edited by Axel Guckelsberger
  7. if ($request->server->has('REQUEST_URI')) {
  8. $requestArgs['REQUEST_URI'] = $request->server->get('REQUEST_URI');
  9. }
  10. if ($request->server->has('HTTP_REFERER')) {
  11. $requestArgs['REFERER'] = $request->server->get('HTTP_REFERER');
  1. $config['General']['filter_type'] = $this->getSystemVar('idsfilter', 'xml');
  2. if (empty($config['General']['filter_type'])) {
  3. $config['General']['filter_type'] = 'xml';
  4. }
  5. $config['General']['base_path'] = ''; //PHPIDS_PATH_PREFIX;

    Commented out code reduces readability and lowers the code confidence for other developers. If it's common usage for debug, it should not be committed. Using a version control system, such code can be safely removed.

    Time to fix: about 30 minutes
    Open Issue Permalink
    Last edited by Craig Heydenburg
  6. // we don't use the base path because the tmp directory is in zkTemp (see below)
  7. $config['General']['use_base_path'] = false;
  8. // path to the filters used
  9. $config['General']['filter_path'] = $this->getSystemVar('idsrulepath', 'system/SecurityCenterModule/Resources/config/phpids_zikula_default.xml');
  1. * @var ZikulaHttpKernelInterface
  2. * /
  3. private $kernel;*/
  4. public function __construct(ZikulaHttpKernelInterface $kernel)
  5. {
  6. //$this->kernel = $kernel;

    Commented out code reduces readability and lowers the code confidence for other developers. If it's common usage for debug, it should not be committed. Using a version control system, such code can be safely removed.

    Time to fix: about 30 minutes
    Open Issue Permalink
    Last edited by Guite
  7. parent::__construct($kernel);
  8. $this->setName('Zikula');
  9. $this->setVersion(ZikulaKernel::VERSION . /*' - ' . $kernel->getName() . */'/' . $kernel->getEnvironment() . ($kernel->isDebug() ? '/debug' : ''));
  1. }
  2. $response = $event->getResponse();
  3. $response->headers->set('X-Frame-Options', $this->xFrameOptions);
  4. //$response->headers->set('X-Content-Security-Policy', "frame-ancestors 'self'");

    Commented out code reduces readability and lowers the code confidence for other developers. If it's common usage for debug, it should not be committed. Using a version control system, such code can be safely removed.

    Time to fix: about 30 minutes
    Open Issue Permalink
    Last edited by Guite
  5. $response->headers->set('X-XSS-Protection', '1');
  6. }
  7. }
  1. $result = $this->upgradeModules();
  2. if (0 === count($result)) {
  3. return true;
  4. }
  5. return true; //$result;

    Commented out code reduces readability and lowers the code confidence for other developers. If it's common usage for debug, it should not be committed. Using a version control system, such code can be safely removed.

    Time to fix: about 30 minutes
    Open Issue Permalink
    Last edited by Axel Guckelsberger
  6. case 'regenthemes':
  7. return $this->regenerateThemes();
  8. case 'versionupgrade':
  9. return $this->versionUpgrade();
  10. case 'finalizeparameters':
  1. }
  2. try {
  3. $blockInstance = $this->blockApi->createInstanceFromBKey($block->getBkey());
  4. } catch (RuntimeException $exception) {
  5. //return 'Error during block creation: ' . $exception->getMessage();

    Commented out code reduces readability and lowers the code confidence for other developers. If it's common usage for debug, it should not be committed. Using a version control system, such code can be safely removed.

    Time to fix: about 30 minutes
    Open Issue Permalink
    Last edited by Guite
  6. return '';
  7. }
  8. $blockProperties = $block->getProperties();
  9. $blockProperties['bid'] = $block->getBid();
  10. $blockProperties['title'] = $block->getTitle();
  1. }
  2. $event = new ModuleStateEvent($bundle, $extensionEntity->toArray());
  3. $eventDispatcher->dispatch(CoreEvents::MODULE_POSTINSTALL, $event);
  4. }
  5. // currently commented out because it takes a long time.
  6. //$extensionHelper->installAssets();

    Commented out code reduces readability and lowers the code confidence for other developers. If it's common usage for debug, it should not be committed. Using a version control system, such code can be safely removed.

    Time to fix: about 30 minutes
    Open Issue Permalink
    Last edited by Guite
  7. }
  8. return $this->redirectToRoute('zikulaextensionsmodule_module_viewmodulelist', ['justinstalled' => json_encode($extensions)]);
  9. }
  1. }
  2. }
  3. public function isValid(): bool
  4. {
  5. //return 1 < count($this->getErrors());

    Commented out code reduces readability and lowers the code confidence for other developers. If it's common usage for debug, it should not be committed. Using a version control system, such code can be safely removed.

    Time to fix: about 30 minutes
    Open Issue Permalink
    Last edited by Guite
  6. return empty($this->getErrors());
  7. }
  8. public function getErrors(): array
  9. {
  1. $logger->addError("Could not send message to: ${emailList} :: " . $this->message->toString());
  2. }
  3. $this->eventDispatcher->dispatch(MailerEvents::SEND_MESSAGE_FAILURE, $event);
  4. //throw new RuntimeException($this->__('Error! A problem occurred while sending the e-mail message.'));

    Commented out code reduces readability and lowers the code confidence for other developers. If it's common usage for debug, it should not be committed. Using a version control system, such code can be safely removed.

    Time to fix: about 30 minutes
    Open Issue Permalink
    Last edited by Guite
  5. return false;
  6. }
  7. if ($this->dataValues['enableLogging']) {
  1. * MenuItemEntity constructor.
  2. */
  3. public function __construct()
  4. {
  5. $this->title = '';
  6. $this->options = []; /*new ArrayCollection();

    Commented out code reduces readability and lowers the code confidence for other developers. If it's common usage for debug, it should not be committed. Using a version control system, such code can be safely removed.

    Time to fix: about 30 minutes
    Open Issue Permalink
    Last edited by Guite
  7. $this->options = [
  8. 'routeParameters' => [],
  9. 'attributes' => [],
  10. 'linkAttributes' => [],
  11. 'childrenAttributes' => [],
  1. $record['level'] = ACCESS_COMMENT; // 300
  2. $record['bond'] = 0;
  3. $this->entityManager->persist($record);
  4. $lastPerm->setSequence($record->getSequence() + 1);
  5. $this->entityManager->flush();
  6. //$this->addFlash('success', $this->__('A permission rule was added to allow users access to "utility" themes. Please check the sequence.'));

    Commented out code reduces readability and lowers the code confidence for other developers. If it's common usage for debug, it should not be committed. Using a version control system, such code can be safely removed.

    Time to fix: about 30 minutes
    Open Issue Permalink
    Last edited by Guite
  7. case '1.1.2':
  8. // future upgrade routines
  9. }
  1. if ($multilingual) {
  2. // get all available locales
  3. $langs = $installedLanguages;
  4. } else {
  5. // get only the default locale
  6. $langs = [$this->variableApi->getSystemVar('language_i18n', 'en')]; //$this->container->getParameter('locale');

    Commented out code reduces readability and lowers the code confidence for other developers. If it's common usage for debug, it should not be committed. Using a version control system, such code can be safely removed.

    Time to fix: about 30 minutes
    Open Issue Permalink
    Last edited by Guite
  7. }
  8. }
  9. $errors = '';
  1. $themeVarsPath = $this->getConfigPath() . '/variables.yml';
  2. if (!file_exists($themeVarsPath)) {
  3. return $defaultVars;
  4. }
  5. /*if (!$this->getContainer()) {

    Commented out code reduces readability and lowers the code confidence for other developers. If it's common usage for debug, it should not be committed. Using a version control system, such code can be safely removed.

    Time to fix: about 30 minutes
    Open Issue Permalink
    Last edited by Guite
  6. return $defaultVars;
  7. }*/
  8. $yamlVars = Yaml::parse(file_get_contents($themeVarsPath));
  9. if (!is_array($yamlVars)) {

PHP code should not contain unreachable code

More information: https://insight.symfony.com/what-we-analyse/php.unreachable_code

  1. {
  2. // TODO #3920
  3. return true;
  4. // collect parents
  5. $isOnTop = false;
  6. $parentIds = [$category->getId()];
  7. $directParent = $category;
  8. while (false === $isOnTop) {
  9. $directParent = $category->getParent();
  10. if (null === $directParent) {
  11. $isOnTop = true;
  12. } else {
  13. $parentIds[] = $directParent->getId();
  14. }
  15. }
  16. // fetch registries
  17. $registries = $this->categoryRegistryRepository->findAll();
  18. // iterate over all registries
  19. foreach ($registries as $registry) {
  20. // check if the registry subtree contains our category
  21. if (!in_array($registry->getCategory()->getId(), $parentIds, true)) {
  22. continue;
  23. }
  24. // get information about responsible module
  25. if (!$this->kernel->isBundle($registry->getModname())) {
  26. continue;
  27. }
  28. $capabilities = $this->capabilityApi->getCapabilitiesOf($registry->getModname());
  29. foreach ($capabilities[CapabilityApi::CATEGORIZABLE] as $entityClass) {
  30. if (!is_subclass_of($entityClass, AbstractCategoryAssignment::class)) {
  31. continue;
  32. }
  33. // check if this mapping table contains a reference to the given category
  34. $mappings = $this->entityManager->getRepository($entityClass)
  35. ->findBy(['category' => $category]);
  36. if (count($mappings) > 0) {
  37. // existing reference found
  38. return false;
  39. }
  40. }
  41. }
  42. return true;

    This code is unreachable.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by Guite
  43. }
  44. }

Unused method, property, variable or parameter 11

More information: https://insight.symfony.com/what-we-analyse/php.unused_local_variable_or_private_member

  1. }
  2. /**
  3. * Helper function to sort modules.
  4. */
  5. private static function sortAdminModsByOrder(array $a, array $b): int

    This sortAdminModsByOrder method is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. if ((int)$a['order'] === (int)$b['order']) {
  8. return strcmp($a['moduleName'], $b['moduleName']);
  9. }
  10. if ((int)$a['order'] > (int)$b['order']) {
  1. $this->setTranslator($translator);
  2. $this->factory = $factory;
  3. $this->capabilityApi = $capabilityApi;
  4. }
  5. public function createAdminMenu(array $options): ItemInterface

    This options argument is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. // @see https://gist.github.com/nateevans/9958390
  8. $menu = $this->factory->createItem('menuModuleAdminMenu');
  9. $menu->setChildrenAttribute('class', 'nav navbar-nav');
  1. $args['commandName'] = 'submit';
  2. $this->repeatCreateAction = true;
  3. }
  4. $action = $args['commandName'];
  5. $isRegularAction = 'delete' !== $action;

    This isRegularAction local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  6. $this->fetchInputData();
  7. $success = $this->applyAction($args);
  8. if (!$success) {
  1. }
  2. /**
  3. * Returns an array of additional template variables for view quick navigation forms.
  4. */
  5. protected function getViewQuickNavParametersForRoute(string $context = '', array $args = []): array

    This args argument is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. $parameters = [];
  8. $request = $this->requestStack->getCurrentRequest();
  9. if (null === $request) {
  10. return $parameters;
  1. }
  2. /**
  3. * Returns an array of additional template variables for view quick navigation forms.
  4. */
  5. protected function getViewQuickNavParametersForRoute(string $context = '', array $args = []): array

    This context argument is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. $parameters = [];
  8. $request = $this->requestStack->getCurrentRequest();
  9. if (null === $request) {
  10. return $parameters;
  1. /**
  2. * Returns an array of all allowed object types in ZikulaRoutesModule.
  3. *
  4. * @return string[] List of allowed object types
  5. */
  6. public function getObjectTypes(string $context = '', array $args = []): array

    This args argument is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  7. {
  8. if (!in_array($context, ['controllerAction', 'api', 'helper', 'actionHandler', 'block', 'contentType', 'util'], true)) {
  9. $context = 'controllerAction';
  10. }
  1. }
  2. /**
  3. * Returns the default object type in ZikulaRoutesModule.
  4. */
  5. public function getDefaultObjectType(string $context = '', array $args = []): string

    This args argument is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. if (!in_array($context, ['controllerAction', 'api', 'helper', 'actionHandler', 'block', 'contentType', 'util'], true)) {
  8. $context = 'controllerAction';
  9. }
  1. /**
  2. * Filters a given collection of entities based on different permission checks.
  3. *
  4. * @param array|ArrayCollection $entities The given list of entities
  5. */
  6. public function filterCollection($objectType, $entities, int $permissionLevel, int $userId = null): array

    This objectType argument is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  7. {
  8. $filteredEntities = [];
  9. foreach ($entities as $routes) {
  10. if (!$this->hasEntityPermission($routes, $permissionLevel, $userId)) {
  11. continue;
  1. }
  2. /**
  3. * Returns a translatable title for a certain action.
  4. */
  5. protected function getTitleForAction(string $currentState, string $actionId): string

    This currentState argument is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. $title = '';
  8. switch ($actionId) {
  9. case 'submit':
  10. $title = $this->translator->__('Submit');
  1. $entity = $event->getSubject();
  2. if (!$this->isEntityManagedByThisBundle($entity) || !method_exists($entity, 'get_objectType')) {
  3. return;
  4. }
  5. $objectType = $entity->get_objectType();

    This objectType local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Axel Guckelsberger
  6. $permissionLevel = ACCESS_READ;
  7. $transitionName = $event->getTransition()->getName();
  8. $hasApproval = false;
  1. $this->setTranslator($translator);
  2. $this->factory = $factory;
  3. $this->permissionApi = $permissionApi;
  4. }
  5. public function createAdminMenu(array $options = []): ItemInterface

    This options argument is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. $menu = $this->factory->createItem('bootstrapThemeAdminMenu');
  8. $menu->setChildrenAttribute('class', 'nav navbar-nav');
  9. $menu->addChild($this->__('Home'), ['route' => 'home']);
  10. if ($this->permissionApi->hasPermission('ZikulaSettingsModule::', '::', ACCESS_ADMIN)) {

Web applications should contain a site.webmanifest file

More information: https://insight.symfony.com/what-we-analyse/web.missing_web_manifest

in src/web

The web root doesn't contain a site.webmanifest file. The web app manifest provides information about a web application in a JSON text file, necessary for be presented to the user similarly to a native app

Time to fix: about 1 hour
Open Issue Permalink
Collective
  • src/web
    • uploads
    • favicon.ico
    • robots.txt

PHP code should follow PSR-1 basic coding standard 48

More information: https://insight.symfony.com/what-we-analyse/php.psr1

  1. public function __(string $msg, string $domain = null, string $locale = null): string
  2. {
  3. return $this->trans($msg, [], $domain, $locale);
  4. }
  5. public function _n(string $m1, string $m2, int $number, string $domain = null, string $locale = null): string

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. $message = $this->chooseMessage($m1, $m2, $number, $domain);
  8. return $this->trans($message, ['%count%' => $number], $domain, $locale);
  9. }
  1. public function __f(string $msg, array $parameters = [], string $domain = null, string $locale = null): string
  2. {
  3. return $this->trans($msg, $parameters, $domain, $locale);
  4. }
  5. public function _fn(string $m1, string $m2, int $number, array $parameters = [], string $domain = null, string $locale = null): string

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. $message = $this->chooseMessage($m1, $m2, $number, $domain);
  8. return $this->trans($message, ['%count%' => $number] + $parameters, $domain, $locale);
  9. }
  1. public function setChildren(Collection $children): void
  2. {
  3. $this->children = $children;
  4. }
  5. public function getIs_locked(): bool

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. return $this->is_locked;
  8. }
  9. /**
  1. public function getIsLocked(): bool
  2. {
  3. return $this->getIs_locked();
  4. }
  5. public function setIs_locked(bool $is_locked): void

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. $this->is_locked = $is_locked;
  8. }
  9. /**
  1. public function setIsLocked(bool $isLocked): void
  2. {
  3. $this->setIs_locked($isLocked);
  4. }
  5. public function getIs_leaf(): bool

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. return $this->is_leaf;
  8. }
  9. /**
  1. public function getIsLeaf(): bool
  2. {
  3. return $this->getIs_leaf();
  4. }
  5. public function setIs_leaf(bool $is_leaf): void

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. $this->is_leaf = $is_leaf;
  8. }
  9. /**
  1. }
  2. /**
  3. * @return array|string the category display name(s)
  4. */
  5. public function getDisplay_name(string $lang = null)

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. if (!empty($lang)) {
  8. return $this->display_name[$lang] ?? $this->display_name['en'] ?? $this->name;
  9. }
  1. public function getDisplayName()
  2. {
  3. return $this->getDisplay_name();
  4. }
  5. public function setDisplay_name(array $display_name): void

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. $this->display_name = $display_name;
  8. }
  9. /**
  1. }
  2. /**
  3. * @return array|string the category display description
  4. */
  5. public function getDisplay_desc(string $lang = null)

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. if (!empty($lang)) {
  8. return $this->display_desc[$lang] ?? $this->display_desc['en'] ?? '';
  9. }
  1. public function getDisplayDesc(string $lang = null)
  2. {
  3. return $this->getDisplay_desc($lang);
  4. }
  5. public function setDisplay_desc(array $display_desc): void

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. $this->display_desc = $display_desc;
  8. }
  9. /**
  1. $status = $status ? 'A' : 'I';
  2. }
  3. $this->status = $status;
  4. }
  5. public function getCr_date(): DateTime

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. return $this->cr_date;
  8. }
  9. public function setCr_date(DateTime $cr_date): void
  1. public function getCr_date(): DateTime
  2. {
  3. return $this->cr_date;
  4. }
  5. public function setCr_date(DateTime $cr_date): void

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. $this->cr_date = $cr_date;
  8. }
  9. public function getCr_uid(): UserEntity
  1. public function setCr_date(DateTime $cr_date): void
  2. {
  3. $this->cr_date = $cr_date;
  4. }
  5. public function getCr_uid(): UserEntity

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. return $this->cr_uid;
  8. }
  9. public function setCr_uid(UserEntity $cr_uid): void
  1. public function getCr_uid(): UserEntity
  2. {
  3. return $this->cr_uid;
  4. }
  5. public function setCr_uid(UserEntity $cr_uid): void

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. $this->cr_uid = $cr_uid;
  8. }
  9. public function getLu_date(): DateTime
  1. public function setCr_uid(UserEntity $cr_uid): void
  2. {
  3. $this->cr_uid = $cr_uid;
  4. }
  5. public function getLu_date(): DateTime

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. return $this->lu_date;
  8. }
  9. public function setLu_date(DateTime $lu_date): void
  1. public function getLu_date(): DateTime
  2. {
  3. return $this->lu_date;
  4. }
  5. public function setLu_date(DateTime $lu_date): void

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. $this->lu_date = $lu_date;
  8. }
  9. public function getLu_uid(): UserEntity
  1. public function setLu_date(DateTime $lu_date): void
  2. {
  3. $this->lu_date = $lu_date;
  4. }
  5. public function getLu_uid(): UserEntity

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. return $this->lu_uid;
  8. }
  9. public function setLu_uid(UserEntity $lu_uid): void
  1. public function getLu_uid(): UserEntity
  2. {
  3. return $this->lu_uid;
  4. }
  5. public function setLu_uid(UserEntity $lu_uid): void

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. $this->lu_uid = $lu_uid;
  8. }
  9. public function getAttributes(): ArrayCollection
  1. public function __(string $msg, string $domain = null, string $locale = null): string
  2. {
  3. return $this->trans($msg, [], $domain, $locale);
  4. }
  5. public function _n(string $m1, string $m2, int $number, string $domain = null, string $locale = null): string

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. $message = $this->chooseMessage($m1, $m2, $number, $domain);
  8. return $this->trans($message, ['%count%' => $number], $domain, $locale);
  9. }
  1. public function __f(string $msg, array $parameters = [], string $domain = null, string $locale = null): string
  2. {
  3. return $this->trans($msg, $parameters, $domain, $locale);
  4. }
  5. public function _fn(string $m1, string $m2, int $number, array $parameters = [], string $domain = null, string $locale = null): string

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. $message = $this->chooseMessage($m1, $m2, $number, $domain);
  8. return $this->trans($message, ['%count%' => $number] + $parameters, $domain, $locale);
  9. }
  1. $domain = $domain ?? $this->determineTranslationDomainFromContext($context);
  2. return $this->translator->__f(/** @Ignore */$message, $parameters, $domain, $locale);
  3. }
  4. public function _n(array $context, string $singular, string $plural, int $count, string $domain = null, string $locale = null): string

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  5. {
  6. $domain = $domain ?? $this->determineTranslationDomainFromContext($context);
  7. return $this->translator->_n(/** @Ignore */$singular, $plural, $count, $domain, $locale);
  8. }
  1. $domain = $domain ?? $this->determineTranslationDomainFromContext($context);
  2. return $this->translator->_n(/** @Ignore */$singular, $plural, $count, $domain, $locale);
  3. }
  4. public function _fn(array $context, string $singular, string $plural, int $count, array $parameters = [], string $domain = null, string $locale = null): string

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  5. {
  6. $domain = $domain ?? $this->determineTranslationDomainFromContext($context);
  7. return $this->translator->_fn(/** @Ignore */$singular, $plural, $count, $parameters, $domain, $locale);
  8. }
  1. }
  2. /**
  3. * Performs a plural translation.
  4. */
  5. public function _n(string $m1, string $m2, int $number, string $locale = null): string

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. /** @Ignore */
  8. return $this->translator->_n($m1, $m2, $number, $this->domain, $locale);
  9. }
  1. }
  2. /**
  3. * Performs a format plural translation.
  4. */
  5. public function _fn(string $m1, string $m2, int $number, array $parameters = [], string $locale = null): string

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. /** @Ignore */
  8. return $this->translator->_fn($m1, $m2, $number, $parameters, $this->domain, $locale);
  9. }
  1. }
  2. /**
  3. * Plural translations for modules.
  4. */
  5. public function _n(string $m1, string $m2, int $number, string $domain = null, string $locale = null): string

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. return $this->translator->_n($m1, $m2, $number, $domain, $locale);
  8. }
  9. /**
  1. }
  2. /**
  3. * Format plural translations for modules.
  4. */
  5. public function _fn(string $m1, string $m2, int $number, array $parameters = [], string $domain = null, string $locale = null): string

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. return $this->translator->_fn($m1, $m2, $number, $parameters, $domain, $locale);
  8. }
  9. public function getTranslator(): TranslatorInterface
  1. public function setActive(int $active): void
  2. {
  3. $this->active = $active;
  4. }
  5. public function getLast_Update(): DateTime

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. return $this->last_update;
  8. }
  9. public function setLast_Update(): void
  1. public function getLast_Update(): DateTime
  2. {
  3. return $this->last_update;
  4. }
  5. public function setLast_Update(): void

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. $this->last_update = new DateTime('now');
  8. }
  9. public function getLanguage(): string
  1. public function setCategory(CategoryEntity $category): void
  2. {
  3. $this->category = $category;
  4. }
  5. public function getCr_date(): DateTime

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. return $this->cr_date;
  8. }
  9. public function setCr_date(DateTime $cr_date): void
  1. public function getCr_date(): DateTime
  2. {
  3. return $this->cr_date;
  4. }
  5. public function setCr_date(DateTime $cr_date): void

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. $this->cr_date = $cr_date;
  8. }
  9. public function getCr_uid(): UserEntity
  1. public function setCr_date(DateTime $cr_date): void
  2. {
  3. $this->cr_date = $cr_date;
  4. }
  5. public function getCr_uid(): UserEntity

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. return $this->cr_uid;
  8. }
  9. public function setCr_uid(UserEntity $cr_uid): void
  1. public function getCr_uid(): UserEntity
  2. {
  3. return $this->cr_uid;
  4. }
  5. public function setCr_uid(UserEntity $cr_uid): void

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. $this->cr_uid = $cr_uid;
  8. }
  9. public function getLu_date(): DateTime
  1. public function setCr_uid(UserEntity $cr_uid): void
  2. {
  3. $this->cr_uid = $cr_uid;
  4. }
  5. public function getLu_date(): DateTime

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. return $this->lu_date;
  8. }
  9. public function setLu_date(DateTime $lu_date): void
  1. public function getLu_date(): DateTime
  2. {
  3. return $this->lu_date;
  4. }
  5. public function setLu_date(DateTime $lu_date): void

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. $this->lu_date = $lu_date;
  8. }
  9. public function getLu_uid(): UserEntity
  1. public function setLu_date(DateTime $lu_date): void
  2. {
  3. $this->lu_date = $lu_date;
  4. }
  5. public function getLu_uid(): UserEntity

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. return $this->lu_uid;
  8. }
  9. public function setLu_uid(UserEntity $lu_uid): void
  1. public function getLu_uid(): UserEntity
  2. {
  3. return $this->lu_uid;
  4. }
  5. public function setLu_uid(UserEntity $lu_uid): void

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. $this->lu_uid = $lu_uid;
  8. }
  9. public function getObj_status(): string
  1. public function setLu_uid(UserEntity $lu_uid): void
  2. {
  3. $this->lu_uid = $lu_uid;
  4. }
  5. public function getObj_status(): string

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. return $this->obj_status;
  8. }
  9. public function setObj_status(string $obj_status): void
  1. public function getObj_status(): string
  2. {
  3. return $this->obj_status;
  4. }
  5. public function setObj_status(string $obj_status): void

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. $this->obj_status = $obj_status;
  8. }
  9. }
  1. */
  2. public function __construct()
  3. {
  4. }
  5. public function get_objectType(): string

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. return $this->_objectType;
  8. }
  9. public function set_objectType(string $_objectType): void
  1. public function get_objectType(): string
  2. {
  3. return $this->_objectType;
  4. }
  5. public function set_objectType(string $_objectType): void

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. if ($this->_objectType !== $_objectType) {
  8. $this->_objectType = $_objectType ?? '';
  9. }
  10. }
  1. public function setActivated(int $activated): void
  2. {
  3. $this->activated = $activated;
  4. }
  5. public function getApproved_Date(): DateTime

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. return $this->approved_date;
  8. }
  9. /**
  1. }
  2. /**
  3. * @param string|DateTime $approved_date the user's approved date
  4. */
  5. public function setApproved_Date($approved_date): void

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. if ($approved_date instanceof DateTime) {
  8. $this->approved_date = $approved_date;
  9. } else {
  10. $this->approved_date = new DateTime($approved_date);
  1. } else {
  2. $this->approved_date = new DateTime($approved_date);
  3. }
  4. }
  5. public function getApproved_By(): int

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. return $this->approved_by;
  8. }
  9. public function setApproved_By(int $approved_by): void
  1. public function getApproved_By(): int
  2. {
  3. return $this->approved_by;
  4. }
  5. public function setApproved_By(int $approved_by): void

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. $this->approved_by = $approved_by;
  8. }
  9. public function isApproved(): bool
  1. public function isApproved(): bool
  2. {
  3. return 0 !== $this->approved_by;
  4. }
  5. public function getUser_Regdate(): DateTime

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. return $this->user_regdate;
  8. }
  9. /**
  1. }
  2. /**
  3. * @param string|DateTime $user_regdate the user's regdate
  4. */
  5. public function setUser_Regdate($user_regdate): void

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. if ($user_regdate instanceof DateTime) {
  8. $this->user_regdate = $user_regdate;
  9. } else {
  10. $this->user_regdate = new DateTime($user_regdate);
  1. public function setVerifycode(string $verifycode): void
  2. {
  3. $this->verifycode = $verifycode;
  4. }
  5. public function getCreated_Dt(): DateTime

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. return $this->created_dt;
  8. }
  9. /**
  1. }
  2. /**
  3. * @param string|DateTime $created_dt the user verification's created date
  4. */
  5. public function setCreated_Dt($created_dt): void

    Method names should be declared in camelCase.
    You should rename this method to comply with PSR-1.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Guite
  6. {
  7. if ($created_dt instanceof DateTime) {
  8. $this->created_dt = $created_dt;
  9. } else {
  10. $this->created_dt = new DateTime($created_dt);