SyncCommand::getOutputRedirection()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 3
Ratio 100 %

Importance

Changes 0
Metric Value
dl 3
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace App\Satis\Context;
4
5
use App\Satis\CommandContextInterface;
6
use Monolog\Formatter\LineFormatter;
7
use Monolog\Handler\StreamHandler;
8
use Monolog\Logger;
9
10
/**
11
 * @author Lukas Homza <[email protected]>
12
 */
13 View Code Duplication
class SyncCommand implements CommandContextInterface {
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
14
    /**
15
     * @param string $logFile
16
     * @return string
17
     */
18
    public function getOutputRedirection($logFile) {
19
        return '';
20
    }
21
22
    /**
23
     * @return string
24
     */
25
    public function getShouldUnlockOnCompletion() {
26
        return '';
27
    }
28
29
    /**
30
     * @return \Monolog\Logger
31
     */
32
    public function getLogger() {
33
        $handler = new StreamHandler(storage_path('logs/builder_sync.log'), Logger::DEBUG);
34
        $handler->setFormatter(new LineFormatter(null, null, true, true));
35
36
        $logger = new Logger('SyncBuildLog');
37
        $logger->pushHandler($handler);
38
39
        return $logger;
40
    }
41
}
42