Total Complexity | 1 |
Total Lines | 18 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | abstract class Expression implements ExpressionInterface |
||
8 | { |
||
9 | const POLYNOMIAL = 1; |
||
10 | const EXPONENTIAL = 2; |
||
11 | const LOGARITHMIC = 3; |
||
12 | |||
13 | /** @var callable */ |
||
14 | protected $expression; |
||
15 | |||
16 | /** @var int */ |
||
17 | private $type; |
||
18 | |||
19 | 58 | public function __construct(int $type) |
|
22 | } |
||
23 | |||
24 | abstract function evaluateAt($x); |
||
|
|||
25 | |||
26 | } |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.