Completed
Push — master ( 975c17...8f2777 )
by Adam
04:20 queued 01:49
created

Metric::__toString()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 2
eloc 2
nc 2
nop 0
crap 2
1
<?php
2
3
namespace BestServedCold\PhalueObjects;
4
5
use BestServedCold\PhalueObjects\Mathematical\Operator\ArithmeticTrait;
6
7
/**
8
 * Class Metric
9
 *
10
 * @package BestServedCold\PhalueObjects
11
 */
12
abstract class Metric extends ValueObject
0 ignored issues
show
Coding Style introduced by
Metric does not seem to conform to the naming convention (^Abstract|Factory$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
13
{
14
    use ArithmeticTrait;
15
16
    /**
17
     * @return string
18
     */
19 1
    public function __toString()
20
    {
21 1
        return is_array($this->getValue()) ? implode(',', $this->getValue()) : (string) $this->getValue();
22
    }
23
}
24