| 1 | <?php |
||
| 10 | class NumericComparator implements ComparatorInterface |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var int |
||
| 14 | */ |
||
| 15 | private $scale; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @param int $scale |
||
| 19 | */ |
||
| 20 | 20 | function __construct($scale = 10) |
|
| 24 | |||
| 25 | /** |
||
| 26 | * {@inheritdoc} |
||
| 27 | */ |
||
| 28 | 14 | public function compare($a, $b) |
|
| 32 | |||
| 33 | /** |
||
| 34 | * {@inheritdoc} |
||
| 35 | */ |
||
| 36 | 5 | public function supports($value) |
|
| 40 | } |
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.