QueriesWithInput   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 5
eloc 8
c 1
b 0
f 0
dl 0
loc 40
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getQueries() 0 3 1
A __construct() 0 4 1
A isNotEmpty() 0 3 2
A getInputType() 0 3 1
1
<?php
2
namespace DeInternetJongens\LighthouseUtils\Generators\Classes;
3
4
class QueriesWithInput
5
{
6
    /** @var array $queries */
7
    private $queries = [];
8
9
    /** @var string $inputType */
10
    private $inputType;
11
12
    /**
13
     * @param array $queries
14
     * @param string $inputType
15
     */
16
    public function __construct(array $queries, string $inputType)
17
    {
18
        $this->queries = $queries;
19
        $this->inputType = $inputType;
20
    }
21
22
    /**
23
     * @return bool
24
     */
25
    public function isNotEmpty(): bool
26
    {
27
        return (! empty($this->getQueries()) && ! empty($this->getInputType()));
28
    }
29
30
    /**
31
     * @return array
32
     */
33
    public function getQueries(): array
34
    {
35
        return $this->queries;
36
    }
37
38
    /**
39
     * @return string
40
     */
41
    public function getInputType(): string
42
    {
43
        return $this->inputType;
44
    }
45
}
46