HasWriterTrait::setWriter()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
/**
3
 * This file is part of the phpspec-console package.
4
 * (c) 2017 Timo Michna <timomichna/yahoo.de>
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 */
9
10
namespace Tidal\PhpSpec\ConsoleExtension\Behavior;
11
12
use Tidal\PhpSpec\ConsoleExtension\Contract\WriterInterface;
13
14
/**
15
 * trait Tidal\PhpSpec\ConsoleExtension\BehaviorHasWriterTrait
16
 */
17
trait HasWriterTrait
18
{
19
    /**
20
     * @var WriterInterface
21
     */
22
    private $writer;
23
24
    /**
25
     * @param WriterInterface $writer
26
     */
27
    public function setWriter(WriterInterface $writer)
28
    {
29
        $this->writer = $writer;
30
    }
31
32
    /**
33
     * @return WriterInterface
34
     */
35
    public function getWriter(): WriterInterface
36
    {
37
        return $this->writer;
38
    }
39
}
40
41