protected function getLemmas(array $lemmas = [])
    {
        // Get folders
        $folders = $this->getPath($this->config('folders', []));

        foreach ($folders as $path) {
            if ($this->option('verbose')) {
                $this->line('    <info>' . $path . '</info>');
            }

            foreach ($this->getPhpFiles($path) as $php_file_path => $dumb) {
                $lemma = [];

                foreach ($this->extractTranslationFromFile($php_file_path) as $k => $v) {
                    $real_value = eval("return $k;");
                    $lemma[$real_value] = $php_file_path;
                }

                $lemmas = array_merge($lemmas, $lemma);
            }
        }

        if (count($lemmas) === 0) {
            $this->comment("No lemma have been found in the code.");
            $this->line("In these directories:");

            foreach ($this->config('folders', []) as $path) {
                $path = $this->getPath($path);
                $this->line("    {$path}");
            }

            $this->line("For these functions/methods:");

            foreach ($this->config('trans_methods', []) as $k => $v) {
                $this->line("    {$k}");
            }

            die();
        }

        $this->line((count($lemmas) > 1) ? count($lemmas)
            . " lemmas have been found in the code"
            : "1 lemma has been found in the code");

        if ($this->option('verbose')) {
            foreach ($lemmas as $key => $value) {
                if (strpos($key, '.') !== false) {
                    $this->line('    <info>' . $key . '</info> in file <comment>'
                        . $this->getShortPath($value) . '</comment>');
                }
            }
        }

        return $lemmas;
    }
protected function getLemmas(array $lemmas = [])
    {
        // Get folders
        $folders = $this->getPath($this->config('folders', []));

        foreach ($folders as $path) {
            if ($this->option('verbose')) {
                $this->line('    <info>' . $path . '</info>');
            }

            foreach ($this->getPhpFiles($path) as $php_file_path => $dumb) {
                $lemma = [];

                foreach ($this->extractTranslationFromFile($php_file_path) as $k => $v) {
                    $real_value = eval("return $k;");
                    $lemma[$real_value] = $php_file_path;
                }

                $lemmas = array_merge($lemmas, $lemma);
            }
        }

        if (count($lemmas) === 0) {
            $this->comment("No lemma have been found in the code.");
            $this->line("In these directories:");

            foreach ($this->config('folders', []) as $path) {
                $path = $this->getPath($path);
                $this->line("    {$path}");
            }

            $this->line("For these functions/methods:");

            foreach ($this->config('trans_methods', []) as $k => $v) {
                $this->line("    {$k}");
            }

            die();
        }

        $this->line((count($lemmas) > 1) ? count($lemmas)
            . " lemmas have been found in the code"
            : "1 lemma has been found in the code");

        if ($this->option('verbose')) {
            foreach ($lemmas as $key => $value) {
                if (strpos($key, '.') !== false) {
                    $this->line('    <info>' . $key . '</info> in file <comment>'
                        . $this->getShortPath($value) . '</comment>');
                }
            }
        }

        return $lemmas;
    }
protected function getLemmas ( array $ lemmas = [ ] ) { // Get folders $ folders = $ this -> getPath ( $ this -> config ( 'folders' , [ ] ) ) ; foreach ( $ folders as $ path ) { if ( $ this -> option ( 'verbose' ) ) { $ this -> line ( '    <info>' . $ path . '</info>' ) ; } foreach ( $ this -> getPhpFiles ( $ path ) as $ php_file_path => $ dumb ) { $ lemma = [ ] ; foreach ( $ this -> extractTranslationFromFile ( $ php_file_path ) as $ k => $ v ) { $ real_value = eval ( "return $k;" ) ; $ lemma [ $ real_value ] = $ php_file_path ; } $ lemmas = array_merge ( $ lemmas , $ lemma ) ; } } if ( count ( $ lemmas ) === 0 ) { $ this -> comment ( "No lemma have been found in the code." ) ; $ this -> line ( "In these directories:" ) ; foreach ( $ this -> config ( 'folders' , [ ] ) as $ path ) { $ path = $ this -> getPath ( $ path ) ; $ this -> line ( "    {$path}" ) ; } $ this -> line ( "For these functions/methods:" ) ; foreach ( $ this -> config ( 'trans_methods' , [ ] ) as $ k => $ v ) { $ this -> line ( "    {$k}" ) ; } die ( ) ; } $ this -> line ( ( count ( $ lemmas ) > 1 ) ? count ( $ lemmas ) . " lemmas have been found in the code" : "1 lemma has been found in the code" ) ; if ( $ this -> option ( 'verbose' ) ) { foreach ( $ lemmas as $ key => $ value ) { if ( strpos ( $ key , '.' ) !== false ) { $ this -> line ( '    <info>' . $ key . '</info> in file <comment>' . $ this -> getShortPath ( $ value ) . '</comment>' ) ; } } } return $ lemmas ; }
Get the lemmas values from the provided directories.

@param array $lemmas

@return array
Get the lemmas values from the provided directories .