phug-php/dev-tool

View on GitHub
src/Phug/DevTool/Command/CheckCommand.php

Summary

Maintainability
B
5 hrs
Test Coverage

Showing 29 of 29 total issues

Method configure has 54 lines of code (exceeds 25 allowed). Consider refactoring.
Open

protected function configure()
{
$this->setName('check')
->addOption(
'report',
Severity: Major
Found in src/Phug/DevTool/Command/CheckCommand.php - About 2 hrs to fix

    Method execute has 33 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    protected function execute(InputInterface $input, OutputInterface $output)
    {
    $app = $this->getApplication();
    $coverageFilePath = $app->getWorkingDirectory().'/coverage.xml';
     
     
    Severity: Minor
    Found in src/Phug/DevTool/Command/CheckCommand.php - About 1 hr to fix

      Method runCoverage has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      protected function runCoverage(InputInterface $input, OutputInterface $output, $coverageFilePath)
      {
      $app = $this->getApplication();
       
      $phpVersion = $input->getOption('coverage-php-version');
      Severity: Minor
      Found in src/Phug/DevTool/Command/CheckCommand.php - About 1 hr to fix

        Function execute has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
        Open

        protected function execute(InputInterface $input, OutputInterface $output)
        {
        $app = $this->getApplication();
        $coverageFilePath = $app->getWorkingDirectory().'/coverage.xml';
         
         
        Severity: Minor
        Found in src/Phug/DevTool/Command/CheckCommand.php - About 55 mins to fix

        Avoid assigning values to variables in if clauses and the like (line '91', column '14').
        Open

        protected function runCoverage(InputInterface $input, OutputInterface $output, $coverageFilePath)
        {
        $app = $this->getApplication();
         
        $phpVersion = $input->getOption('coverage-php-version');

        Avoid assigning values to variables in if clauses and the like (line '97', column '14').
        Open

        protected function runCoverage(InputInterface $input, OutputInterface $output, $coverageFilePath)
        {
        $app = $this->getApplication();
         
        $phpVersion = $input->getOption('coverage-php-version');

        Avoid assigning values to variables in if clauses and the like (line '129', column '14').
        Open

        protected function execute(InputInterface $input, OutputInterface $output)
        {
        $app = $this->getApplication();
        $coverageFilePath = $app->getWorkingDirectory().'/coverage.xml';
         
         

        Avoid assigning values to variables in if clauses and the like (line '124', column '17').
        Open

        protected function execute(InputInterface $input, OutputInterface $output)
        {
        $app = $this->getApplication();
        $coverageFilePath = $app->getWorkingDirectory().'/coverage.xml';
         
         

        Avoid assigning values to variables in if clauses and the like (line '133', column '33').
        Open

        protected function execute(InputInterface $input, OutputInterface $output)
        {
        $app = $this->getApplication();
        $coverageFilePath = $app->getWorkingDirectory().'/coverage.xml';
         
         

        Avoid assigning values to variables in if clauses and the like (line '137', column '60').
        Open

        protected function execute(InputInterface $input, OutputInterface $output)
        {
        $app = $this->getApplication();
        $coverageFilePath = $app->getWorkingDirectory().'/coverage.xml';
         
         

        Call to method getOption from undeclared class \Symfony\Component\Console\Input\InputInterface
        Open

        '--ignore-tests' => $input->getOption('ignore-tests'),
        Severity: Critical
        Found in src/Phug/DevTool/Command/CheckCommand.php by phan

        Parameter $input has undeclared type \Symfony\Component\Console\Input\InputInterface
        Open

        protected function runCoverage(InputInterface $input, OutputInterface $output, $coverageFilePath)

        Reference to constant VALUE_NONE from undeclared class \Symfony\Component\Console\Input\InputOption
        Open

        InputOption::VALUE_NONE,
        Severity: Critical
        Found in src/Phug/DevTool/Command/CheckCommand.php by phan

        Call to method getOption from undeclared class \Symfony\Component\Console\Input\InputInterface
        Open

        if ($value = $input->getOption($option)) {
        Severity: Critical
        Found in src/Phug/DevTool/Command/CheckCommand.php by phan

        Parameter $output has undeclared type \Symfony\Component\Console\Output\OutputInterface
        Open

        protected function runCoverage(InputInterface $input, OutputInterface $output, $coverageFilePath)

        Call to method writeln from undeclared class \Symfony\Component\Console\Output\OutputInterface
        Open

        $output->writeln(
        Severity: Critical
        Found in src/Phug/DevTool/Command/CheckCommand.php by phan

        Parameter $output has undeclared type \Symfony\Component\Console\Output\OutputInterface
        Open

        protected function execute(InputInterface $input, OutputInterface $output)

        Argument #1 of this call to \preg_match is typically a literal or constant but isn't, but argument #2 (which is typically a variable) is a literal or constant. The arguments may be in the wrong order.
        Open

        if (!preg_match('/^'.preg_quote($phpVersion).'(\D.*)?$/', PHP_VERSION)) {

        Call to method writeln from undeclared class \Symfony\Component\Console\Output\OutputInterface
        Open

        $output->writeln(
        Severity: Critical
        Found in src/Phug/DevTool/Command/CheckCommand.php by phan

        Reference to constant VALUE_OPTIONAL from undeclared class \Symfony\Component\Console\Input\InputOption
        Open

        InputOption::VALUE_OPTIONAL,
        Severity: Critical
        Found in src/Phug/DevTool/Command/CheckCommand.php by phan

        Reference to constant VALUE_NONE from undeclared class \Symfony\Component\Console\Input\InputOption
        Open

        InputOption::VALUE_NONE,
        Severity: Critical
        Found in src/Phug/DevTool/Command/CheckCommand.php by phan

        Reference to constant VALUE_NONE from undeclared class \Symfony\Component\Console\Input\InputOption
        Open

        InputOption::VALUE_NONE,
        Severity: Critical
        Found in src/Phug/DevTool/Command/CheckCommand.php by phan

        Call to undeclared method \Phug\DevTool\Command\CheckCommand::setName
        Open

        $this->setName('check')
        Severity: Critical
        Found in src/Phug/DevTool/Command/CheckCommand.php by phan

        Reference to constant VALUE_OPTIONAL from undeclared class \Symfony\Component\Console\Input\InputOption
        Open

        InputOption::VALUE_OPTIONAL,
        Severity: Critical
        Found in src/Phug/DevTool/Command/CheckCommand.php by phan

        Reference to constant VALUE_OPTIONAL from undeclared class \Symfony\Component\Console\Input\InputOption
        Open

        InputOption::VALUE_OPTIONAL,
        Severity: Critical
        Found in src/Phug/DevTool/Command/CheckCommand.php by phan

        Call to method getOption from undeclared class \Symfony\Component\Console\Input\InputInterface
        Open

        $phpVersion = $input->getOption('coverage-php-version');
        Severity: Critical
        Found in src/Phug/DevTool/Command/CheckCommand.php by phan

        Reference to constant VALUE_OPTIONAL from undeclared class \Symfony\Component\Console\Input\InputOption
        Open

        InputOption::VALUE_OPTIONAL,
        Severity: Critical
        Found in src/Phug/DevTool/Command/CheckCommand.php by phan

        Parameter $input has undeclared type \Symfony\Component\Console\Input\InputInterface
        Open

        protected function execute(InputInterface $input, OutputInterface $output)

        Reference to constant VALUE_NONE from undeclared class \Symfony\Component\Console\Input\InputOption
        Open

        InputOption::VALUE_NONE,
        Severity: Critical
        Found in src/Phug/DevTool/Command/CheckCommand.php by phan
        Category
        Status