bourdeau/jdhm-api

View on GitHub

Showing 162 of 162 total issues

Method addPhpIniRequirement has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public function addPhpIniRequirement($cfgName, $evaluation, $approveCfgAbsence = false, $testMessage = null, $helpHtml = null, $helpText = null)
Severity: Minor
Found in var/SymfonyRequirements.php - About 45 mins to fix

    Method addPhpIniRecommendation has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        public function addPhpIniRecommendation($cfgName, $evaluation, $approveCfgAbsence = false, $testMessage = null, $helpHtml = null, $helpText = null)
    Severity: Minor
    Found in var/SymfonyRequirements.php - About 45 mins to fix

      Each class must be in a file by itself
      Open

      class SymfonyRequirements extends RequirementCollection
      Severity: Minor
      Found in var/SymfonyRequirements.php by phpcodesniffer

      The class AppKernel has a coupling between objects value of 18. Consider to reduce the number of dependencies under 13.
      Open

      class AppKernel extends Kernel
      {
          public function registerBundles()
          {
              $bundles = [
      Severity: Minor
      Found in app/AppKernel.php by phpmd

      CouplingBetweenObjects

      Since: 1.1.0

      A class with too many dependencies has negative impacts on several quality aspects of a class. This includes quality criteria like stability, maintainability and understandability

      Example

      class Foo {
          /**
           * @var \foo\bar\X
           */
          private $x = null;
      
          /**
           * @var \foo\bar\Y
           */
          private $y = null;
      
          /**
           * @var \foo\bar\Z
           */
          private $z = null;
      
          public function setFoo(\Foo $foo) {}
          public function setBar(\Bar $bar) {}
          public function setBaz(\Baz $baz) {}
      
          /**
           * @return \SplObjectStorage
           * @throws \OutOfRangeException
           * @throws \InvalidArgumentException
           * @throws \ErrorException
           */
          public function process(\Iterator $it) {}
      
          // ...
      }

      Source https://phpmd.org/rules/design.html#couplingbetweenobjects

      Each class must be in a file by itself
      Open

      class PhpIniRequirement extends Requirement
      Severity: Minor
      Found in var/SymfonyRequirements.php by phpcodesniffer

      Each class must be in a file by itself
      Open

      class RequirementCollection implements IteratorAggregate
      Severity: Minor
      Found in var/SymfonyRequirements.php by phpcodesniffer

      Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          public function __construct($fulfilled, $testMessage, $helpHtml, $helpText = null, $optional = false)
      Severity: Minor
      Found in var/SymfonyRequirements.php - About 35 mins to fix

        Function closing brace must go on the next line following the body; found 1 blank lines before brace
        Open

            }

        There must be one blank line after the last USE statement; 2 found;
        Open

        use Symfony\Component\Form\Extension\Core\Type\TextType;

        Blank line found at start of control structure
        Open

                if ($form->isSubmitted() && $form->isValid()) {

        The closing brace for the class must go on the next line after the body
        Open

        }

        Function closing brace must go on the next line following the body; found 1 blank lines before brace
        Open

            }

        Function closing brace must go on the next line following the body; found 1 blank lines before brace
        Open

            }

        There must be one blank line after the namespace declaration
        Open

        namespace JdhmApi\Entity;

        Blank line found at end of control structure
        Open

        
        

        Missing class import via use statement (line '666', column '34').
        Open

                        $reflector = new ReflectionExtension('intl');
        Severity: Minor
        Found in var/SymfonyRequirements.php by phpmd

        MissingImport

        Since: 2.7.0

        Importing all external classes in a file through use statements makes them clearly visible.

        Example

        function make() {
            return new \stdClass();
        }

        Source http://phpmd.org/rules/cleancode.html#MissingImport

        Missing class import via use statement (line '17', column '41').
        Open

                    $client->setDateOfBirth(new \DateTime("now"));

        MissingImport

        Since: 2.7.0

        Importing all external classes in a file through use statements makes them clearly visible.

        Example

        function make() {
            return new \stdClass();
        }

        Source http://phpmd.org/rules/cleancode.html#MissingImport

        Missing class import via use statement (line '216', column '24').
        Open

                $this->add(new Requirement($fulfilled, $testMessage, $helpHtml, $helpText, true));
        Severity: Minor
        Found in var/SymfonyRequirements.php by phpmd

        MissingImport

        Since: 2.7.0

        Importing all external classes in a file through use statements makes them clearly visible.

        Example

        function make() {
            return new \stdClass();
        }

        Source http://phpmd.org/rules/cleancode.html#MissingImport

        Remove error control operator '@' on line 445.
        Open

            public function __construct()
            {
                /* mandatory requirements follow */
        
                $installedPhpVersion = phpversion();
        Severity: Minor
        Found in var/SymfonyRequirements.php by phpmd

        ErrorControlOperator

        Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

        Example

        function foo($filePath) {
            $file = @fopen($filPath); // hides exceptions
            $key = @$array[$notExistingKey]; // assigns null to $key
        }

        Source http://phpmd.org/rules/cleancode.html#errorcontroloperator

        Missing class import via use statement (line '19', column '17').
        Open

                    new JMS\SerializerBundle\JMSSerializerBundle(),
        Severity: Minor
        Found in app/AppKernel.php by phpmd

        MissingImport

        Since: 2.7.0

        Importing all external classes in a file through use statements makes them clearly visible.

        Example

        function make() {
            return new \stdClass();
        }

        Source http://phpmd.org/rules/cleancode.html#MissingImport

        Severity
        Category
        Status
        Source
        Language