eveseat/installer

View on GitHub
src/Commands/Install/Development.php

Summary

Maintainability
A
1 hr
Test Coverage

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

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

        // Bind the input and output for later use in other methods.
        $this->io = new SymfonyStyle($input, $output);
Severity: Minor
Found in src/Commands/Install/Development.php - About 1 hr to fix

    Avoid variables with short names like $io. Configured minimum length is 3.
    Open

        protected $io;
    Severity: Minor
    Found in src/Commands/Install/Development.php by phpmd

    ShortVariable

    Since: 0.2

    Detects when a field, local, or parameter has a very short name.

    Example

    class Something {
        private $q = 15; // VIOLATION - Field
        public static function main( array $as ) { // VIOLATION - Formal
            $r = 20 + $this->q; // VIOLATION - Local
            for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                $r += $this->q;
            }
        }
    }

    Source https://phpmd.org/rules/naming.html#shortvariable

    The method enable_debug_mode is not named in camelCase.
    Open

        protected function enable_debug_mode()
        {
    
            $path_to_file = $this->install_directory . '/.env';
            $file_contents = file_get_contents($path_to_file);
    Severity: Minor
    Found in src/Commands/Install/Development.php by phpmd

    CamelCaseMethodName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name methods.

    Example

    class ClassName {
        public function get_name() {
        }
    }

    Source

    The method check_php_extensions is not named in camelCase.
    Open

        protected function check_php_extensions()
        {
    
            $required_ext = ['intl', 'gd', 'PDO', 'curl', 'mbstring', 'dom', 'xml', 'zip', 'bz2'];
    
    
    Severity: Minor
    Found in src/Commands/Install/Development.php by phpmd

    CamelCaseMethodName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name methods.

    Example

    class ClassName {
        public function get_name() {
        }
    }

    Source

    The method resolve_paths is not named in camelCase.
    Open

        protected function resolve_paths(string $path)
        {
    
            // Extract the pathinfo() for the path
            $path_info = pathinfo($path);
    Severity: Minor
    Found in src/Commands/Install/Development.php by phpmd

    CamelCaseMethodName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name methods.

    Example

    class ClassName {
        public function get_name() {
        }
    }

    Source

    The method publish_assets is not named in camelCase.
    Open

        protected function publish_assets()
        {
    
            chdir($this->install_directory);
            $this->runCommand($this->executables['php'] . ' artisan vendor:publish --force --all');
    Severity: Minor
    Found in src/Commands/Install/Development.php by phpmd

    CamelCaseMethodName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name methods.

    Example

    class ClassName {
        public function get_name() {
        }
    }

    Source

    The method resolve_executables is not named in camelCase.
    Open

        protected function resolve_executables()
        {
    
            foreach ($this->executables as $exeutable => $path) {
    
    
    Severity: Minor
    Found in src/Commands/Install/Development.php by phpmd

    CamelCaseMethodName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name methods.

    Example

    class ClassName {
        public function get_name() {
        }
    }

    Source

    The method clone_repository is not named in camelCase.
    Open

        protected function clone_repository(string $repository, string $path)
        {
    
            $git = new GitWrapper($this->executables['git']);
            $git->setTimeout(300);
    Severity: Minor
    Found in src/Commands/Install/Development.php by phpmd

    CamelCaseMethodName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name methods.

    Example

    class ClassName {
        public function get_name() {
        }
    }

    Source

    The method generate_encryption_key is not named in camelCase.
    Open

        protected function generate_encryption_key()
        {
    
            chdir($this->install_directory);
            $this->runCommandWithOutput($this->executables['php'] . ' artisan key:generate', 'Encryption');
    Severity: Minor
    Found in src/Commands/Install/Development.php by phpmd

    CamelCaseMethodName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name methods.

    Example

    class ClassName {
        public function get_name() {
        }
    }

    Source

    The method install_dependencies is not named in camelCase.
    Open

        protected function install_dependencies()
        {
    
            chdir($this->install_directory);
    
    
    Severity: Minor
    Found in src/Commands/Install/Development.php by phpmd

    CamelCaseMethodName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name methods.

    Example

    class ClassName {
        public function get_name() {
        }
    }

    Source

    There are no issues that match your filters.

    Category
    Status