Code Duplication    Length = 10-10 lines in 2 locations

sources/Console/TailCommand.php 2 locations

@@ 93-102 (lines=10) @@
90
     *
91
     * @return string
92
     */
93
    protected function tailLocalLogs($path)
94
    {
95
        $output = $this->output;
96
97
        $lines = $this->option('lines');
98
99
        (new Process('tail -f -n '.$lines.' '.escapeshellarg($path)))->setTimeout(null)->run(function ($type, $line) use ($output) {
100
            $output->write($line);
101
        });
102
    }
103
104
    /**
105
     * Get the path to the Laravel log file.
@@ 155-164 (lines=10) @@
152
     * @param string $path
153
     * @param string $connection
154
     */
155
    protected function tailRemoteLogs($path, $connection)
156
    {
157
        $out = $this->output;
158
159
        $lines = $this->option('lines');
160
161
        $this->getRemote($connection)->run('tail -f -n '.$lines.' '.escapeshellarg($path), function ($line) use ($out) {
162
            $out->write($line);
163
        });
164
    }
165
166
    /**
167
     * Get a connection to the remote server.