TextCommandOption   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 4
c 1
b 0
f 1
dl 0
loc 19
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getText() 0 3 1
A __construct() 0 4 1
1
<?php
2
3
namespace Jackal\ImageMerge\Command\Options;
4
5
use Jackal\ImageMerge\ValueObject\Coordinate;
6
use Jackal\ImageMerge\Model\Text\Text;
7
8
/**
9
 * Class TextCommandOption
10
 * @package Jackal\ImageMerge\Command\Options
11
 */
12
class TextCommandOption extends SingleCoordinateColorCommandOption
13
{
14
    /**
15
     * TextCommandOption constructor.
16
     * @param Text $text
17
     * @param Coordinate $coordinate
18
     */
19
    public function __construct(Text $text, Coordinate $coordinate)
20
    {
21
        parent::__construct($coordinate, $text->getColor());
22
        $this->add('text', $text);
23
    }
24
25
    /**
26
     * @return mixed
27
     */
28
    public function getText()
29
    {
30
        return $this->get('text');
31
    }
32
}
33