Conditions | 3 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
43 | 5 | public function toArray(): array |
|
44 | { |
||
45 | 5 | $response = [ |
|
46 | 5 | 'type' => $this->type . ucfirst($this->getMethod()), |
|
47 | 5 | 'name' => $this->outputName, |
|
48 | 5 | 'fieldName' => $this->metricName, |
|
49 | ]; |
||
50 | |||
51 | 5 | if ($this->type == DataType::STRING && $this->maxStringBytes !== null) { |
|
52 | 1 | $response['maxStringBytes'] = $this->maxStringBytes; |
|
53 | } |
||
54 | |||
55 | 5 | return $response; |
|
56 | } |
||
67 | } |