Absolute path constants __DIR__ and __FILE__ should not be used 4

  • Major
  • Bugrisk

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

in Command/WurstCommand.php, line 26
  1. protected $wurstTypes = array();
  2. protected $sides = array();
  3. public function __construct($name = null)
  4. {
  5. $this->wurstTypes = $this->findFood(__DIR__.'/../Resources/wurst');

    __DIR__ and __FILE__ constants may conflict with the Symfony resource overriding system

    Time to fix: about 2 hours
    Permalink
    Collective
  6. $this->sides = $this->findFood(__DIR__.'/../Resources/sides');
  7. parent::__construct($name);
  8. }
in Command/WurstCommand.php, line 27
  1. protected $sides = array();
  2. public function __construct($name = null)
  3. {
  4. $this->wurstTypes = $this->findFood(__DIR__.'/../Resources/wurst');
  5. $this->sides = $this->findFood(__DIR__.'/../Resources/sides');

    __DIR__ and __FILE__ constants may conflict with the Symfony resource overriding system

    Time to fix: about 2 hours
    Permalink
    Collective
  6. parent::__construct($name);
  7. }
  8. protected function configure()
in Command/WurstCommand.php, line 56
  1. ));
  2. return self::ERROR_WURST_NOT_FOUND;
  3. }
  4. $wurst = file_get_contents(sprintf(__DIR__.'/../Resources/wurst/%s.txt', $input->getArgument('type')));

    __DIR__ and __FILE__ constants may conflict with the Symfony resource overriding system

    Time to fix: about 2 hours
    Permalink
    Collective
  5. $output->writeln($wurst);
  6. foreach ($this->sides as $side) {
  7. if ($input->getOption('mit-'.$side)) {
  8. $option = file_get_contents(sprintf(__DIR__.'/../Resources/sides/%s.txt', $side));
in Command/WurstCommand.php, line 61
  1. $wurst = file_get_contents(sprintf(__DIR__.'/../Resources/wurst/%s.txt', $input->getArgument('type')));
  2. $output->writeln($wurst);
  3. foreach ($this->sides as $side) {
  4. if ($input->getOption('mit-'.$side)) {
  5. $option = file_get_contents(sprintf(__DIR__.'/../Resources/sides/%s.txt', $side));

    __DIR__ and __FILE__ constants may conflict with the Symfony resource overriding system

    Time to fix: about 2 hours
    Permalink
    Collective
  6. $output->write($option);
  7. }
  8. }
  9. }

Files should be encoded in UTF-8

  • Major
  • Bugrisk

More information: https://insight.sensiolabs.com/what-we-analyse/web.non_utf8_encoding

in Resources/sides/carrot.txt

This file uses iso-8859-1 text encoding. Prefer UTF-8 to avoid cross-encoding issues.

Time to fix: about 30 minutes
Permalink
Collective

Files should not be executable

  • Major
  • Security

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

in Command/WurstCommand.php

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

Time to fix: about 30 minutes
Permalink
Collective

The composer.json file should not raise warnings

  • Info
  • Bugrisk

More information: https://insight.sensiolabs.com/what-we-analyse/composer.warning

in composer.json

No license specified, it is recommended to do so

Time to fix: about 1 hour
Permalink
Collective