YetiForceCompany/YetiForceCRM

View on GitHub
app/Cli/Environment.php

Summary

Maintainability
A
3 hrs
Test Coverage
D
63%

Function confReportAll has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

    public function confReportAll(): void
    {
        \App\Process::$requestMode = 'Cron';
        \App\Utils\ConfReport::$sapi = 'cron';
        $all = \App\Utils\ConfReport::getAll();
Severity: Minor
Found in app/Cli/Environment.php - About 1 hr to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method confReportAll has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function confReportAll(): void
    {
        \App\Process::$requestMode = 'Cron';
        \App\Utils\ConfReport::$sapi = 'cron';
        $all = \App\Utils\ConfReport::getAll();
Severity: Minor
Found in app/Cli/Environment.php - About 1 hr to fix

    Function confReportErrors has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
    Open

        public function confReportErrors(): void
        {
            \App\Process::$requestMode = 'Cron';
            \App\Utils\ConfReport::$sapi = 'cron';
            foreach (\App\Utils\ConfReport::$types as $type) {
    Severity: Minor
    Found in app/Cli/Environment.php - About 45 mins to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    The method confReportAll() has an NPath complexity of 259. The configured NPath complexity threshold is 200.
    Open

        public function confReportAll(): void
        {
            \App\Process::$requestMode = 'Cron';
            \App\Utils\ConfReport::$sapi = 'cron';
            $all = \App\Utils\ConfReport::getAll();
    Severity: Minor
    Found in app/Cli/Environment.php by phpmd

    NPathComplexity

    Since: 0.1

    The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

    Example

    class Foo {
        function bar() {
            // lots of complicated code
        }
    }

    Source https://phpmd.org/rules/codesize.html#npathcomplexity

    The method confReportAll() has a Cyclomatic Complexity of 11. The configured cyclomatic complexity threshold is 10.
    Open

        public function confReportAll(): void
        {
            \App\Process::$requestMode = 'Cron';
            \App\Utils\ConfReport::$sapi = 'cron';
            $all = \App\Utils\ConfReport::getAll();
    Severity: Minor
    Found in app/Cli/Environment.php by phpmd

    CyclomaticComplexity

    Since: 0.1

    Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

    Example

    // Cyclomatic Complexity = 11
    class Foo {
    1   public function example() {
    2       if ($a == $b) {
    3           if ($a1 == $b1) {
                    fiddle();
    4           } elseif ($a2 == $b2) {
                    fiddle();
                } else {
                    fiddle();
                }
    5       } elseif ($c == $d) {
    6           while ($c == $d) {
                    fiddle();
                }
    7        } elseif ($e == $f) {
    8           for ($n = 0; $n < $h; $n++) {
                    fiddle();
                }
            } else {
                switch ($z) {
    9               case 1:
                        fiddle();
                        break;
    10              case 2:
                        fiddle();
                        break;
    11              case 3:
                        fiddle();
                        break;
                    default:
                        fiddle();
                        break;
                }
            }
        }
    }

    Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity

    Avoid using static access to class '\App\Json' in method 'confReportAll'.
    Open

                    $value = \is_array($value) ? \App\Json::encode($value) : $value;
    Severity: Minor
    Found in app/Cli/Environment.php by phpmd

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

    Source https://phpmd.org/rules/cleancode.html#staticaccess

    Avoid using static access to class '\App\Utils\ConfReport' in method 'confReportAll'.
    Open

            $all = \App\Utils\ConfReport::getAll();
    Severity: Minor
    Found in app/Cli/Environment.php by phpmd

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

    Source https://phpmd.org/rules/cleancode.html#staticaccess

    Avoid using static access to class '\App\Utils\ConfReport' in method 'confReportErrors'.
    Open

                foreach (\App\Utils\ConfReport::getErrors($type, true) as $name => $item) {
    Severity: Minor
    Found in app/Cli/Environment.php by phpmd

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

    Source https://phpmd.org/rules/cleancode.html#staticaccess

    Avoid using static access to class '\App\Language' in method 'confReportAll'.
    Open

                        $value = \App\Language::translate($value);
    Severity: Minor
    Found in app/Cli/Environment.php by phpmd

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

    Source https://phpmd.org/rules/cleancode.html#staticaccess

    syntax error, unexpected '=>' (T_DOUBLE_ARROW), expecting ',' or ')'
    Open

                $item['val'] = preg_replace_callback("'<b class=\"text-danger\">(.*?)</b>'si", fn ($match) => "<light_red>{$match['1']}</light_red>", $item['val']);
    Severity: Critical
    Found in app/Cli/Environment.php by phan

    Spaces must be used to indent lines; tabs are not allowed
    Open

                }
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return void
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            \App\Process::$requestMode = 'Cron';
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Line exceeds 120 characters; contains 160 characters
    Open

                $item['val'] = preg_replace_callback("'<b class=\"text-danger\">(.*?)</b>'si", fn ($match) => "<light_red>{$match['1']}</light_red>", $item['val']);
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public $moduleName = 'Environment';
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            \App\Process::$requestMode = 'Cron';
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            foreach (\App\Utils\ConfReport::$types as $type) {
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    $this->climate->border('─', 140);
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    $this->climate->underline()->bold()->out("        $type");
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $all = \App\Utils\ConfReport::getAll();
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    if (!$item['testCli']) {
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        $value = \App\Language::translate($value);
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    ];
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return void
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                }
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    }
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    $table[] = [
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $item['recommended'] = preg_replace_callback("'<b class=\"text-danger\">(.*?)</b>'si", fn ($match) => "<light_red>{$match['1']}</light_red>", $item['recommended']);
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /** {@inheritdoc} */
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        ];
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        $this->htmlToText($item);
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    }
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            if (false !== strpos($item['val'], '<b class="text-danger">')) {
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    ];
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            foreach ($all as $type => $items) {
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @param array &$item
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function htmlToText(array &$item): void
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $item['val'] = preg_replace_callback("'<b class=\"text-danger\">(.*?)</b>'si", fn ($match) => "<light_red>{$match['1']}</light_red>", $item['val']);
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    $this->climate->table($table);
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    if (!empty($item['isHtml'])) {
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Server configuration - All.
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            'confReportErrors' => 'Server configuration - Errors',
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            \App\Utils\ConfReport::$sapi = 'cron';
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                if ($table) {
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                foreach ($items as $name => $item) {
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    $value = $item['cron'] ?? $item['www'] ?? '';
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /** @var string[] Methods list */
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                foreach (\App\Utils\ConfReport::getErrors($type, true) as $name => $item) {
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    if (0 === strpos($value, 'LBL_')) {
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                }
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    $this->climate->border('─', 140);
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Convert html to cli text.
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public $methods = [
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    }
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function confReportAll(): void
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        continue;
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    }
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    $value = \is_array($value) ? \App\Json::encode($value) : $value;
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                }
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Line exceeds 120 characters; contains 176 characters
    Open

                $item['recommended'] = preg_replace_callback("'<b class=\"text-danger\">(.*?)</b>'si", fn ($match) => "<light_red>{$match['1']}</light_red>", $item['recommended']);
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            'confReportAll' => 'Server configuration - All',
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        'Recommended' => empty($item['recommended']) ? '-' : print_r($item['recommended'], true),
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                if ($table) {
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    $this->climate->underline()->bold()->out("        $type");
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return void
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function confReportErrors(): void
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $table = [];
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        'Value' => $item['cron'] ?? '-',
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $table = [];
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    $this->climate->border('─', 140);
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Server configuration - Errors.
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    $table[] = [
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        'Recommended' => $item['recommended'] ?? '-',
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    $this->climate->border('─', 140);
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            if (false !== strpos($item['recommended'], '<b class="text-danger">')) {
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        'Parameter' => $name,
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    $this->climate->table($table);
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            \App\Utils\ConfReport::$sapi = 'cron';
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    if (!empty($item['isHtml'])) {
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        $this->htmlToText($item);
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        'Parameter' => $item['status'] ? $name : "<light_red>{$name}</light_red>",
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        'Value' => $item['status'] ? $value : ("<light_red>{$value}</light_red>"),
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Space before opening parenthesis of function call prohibited
    Open

                $item['val'] = preg_replace_callback("'<b class=\"text-danger\">(.*?)</b>'si", fn ($match) => "<light_red>{$match['1']}</light_red>", $item['val']);
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    Space before opening parenthesis of function call prohibited
    Open

                $item['recommended'] = preg_replace_callback("'<b class=\"text-danger\">(.*?)</b>'si", fn ($match) => "<light_red>{$match['1']}</light_red>", $item['recommended']);
    Severity: Minor
    Found in app/Cli/Environment.php by phpcodesniffer

    There are no issues that match your filters.

    Category
    Status