Passed
Push[email protected] ( 356814...3dff17 )
by Bruno
20:21 queued 18:30
created

AbstractModel::writeln()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 2
c 1
b 0
f 0
nc 2
nop 1
dl 0
loc 4
rs 10
1
<?php
2
3
namespace Moip\Magento2\Model\Console\Command;
4
5
use Psr\Log\LoggerInterface;
0 ignored issues
show
Bug introduced by
The type Psr\Log\LoggerInterface was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
use Symfony\Component\Console\Output\OutputInterface;
0 ignored issues
show
Bug introduced by
The type Symfony\Component\Console\Output\OutputInterface was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
7
8
class AbstractModel
9
{
10
    /**
11
     * @var LoggerInterface
12
     */
13
    protected $logger;
14
15
    /**
16
     * @var Filesystem
0 ignored issues
show
Bug introduced by
The type Moip\Magento2\Model\Console\Command\Filesystem was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
17
     */
18
    protected $_filesystem;
19
20
    /**
21
     * @var OutputInterface
22
     */
23
    protected $_output;
24
25
    /**
26
     * AbstractModel constructor.
27
     *
28
     * @param LoggerInterface $logger
29
     * @param Filesystem      $filesystem
30
     */
31
    public function __construct(
32
        LoggerInterface $logger
33
    ) {
34
        $this->logger = $logger;
35
    }
36
37
    /**
38
     * @param OutputInterface $output
39
     */
40
    public function setOutput(OutputInterface $output)
41
    {
42
        $this->_output = $output;
43
    }
44
45
    /**
46
     * @param $text
47
     */
48
    protected function write($text)
49
    {
50
        if ($this->_output instanceof OutputInterface) {
51
            $this->_output->write($text);
52
        }
53
    }
54
55
    /**
56
     * @param $text
57
     */
58
    protected function writeln($text)
59
    {
60
        if ($this->_output instanceof OutputInterface) {
61
            $this->_output->writeln($text);
62
        }
63
    }
64
}
65