MutationWithInput::getInputType()   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 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
namespace DeInternetJongens\LighthouseUtils\Generators\Classes;
3
4
class MutationWithInput
5
{
6
    /** @var string $mutation */
7
    private $mutation;
8
9
    /** @var string $inputType */
10
    private $inputType;
11
12
    /**
13
     * @param string $mutation
14
     * @param string $inputType
15
     */
16
    public function __construct(string $mutation, string $inputType)
17
    {
18
        $this->mutation = $mutation;
19
        $this->inputType = $inputType;
20
    }
21
22
    /**
23
     * @return bool
24
     */
25
    public function isNotEmpty(): bool
26
    {
27
        return (! empty($this->getMutation()) && ! empty($this->getInputType()));
28
    }
29
30
    /**
31
     * @return string
32
     */
33
    public function getMutation(): string
34
    {
35
        return $this->mutation;
36
    }
37
38
    /**
39
     * @return string
40
     */
41
    public function getInputType(): string
42
    {
43
        return $this->inputType;
44
    }
45
}
46