TextCommandOption::getText()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 1
c 1
b 0
f 1
nc 1
nop 0
dl 0
loc 3
rs 10
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