| 1 | <?php |
||
| 5 | final class PisPasep extends AbstractDocument |
||
| 6 | { |
||
| 7 | const LENGTH = 11; |
||
| 8 | |||
| 9 | const LABEL = 'PisPasep'; |
||
| 10 | |||
| 11 | const REGEX = '/^([\d]{3})([\d]{5})([\d]{2})([\d]{1})$/'; |
||
| 12 | |||
| 13 | const NUMBER_OF_DIGITS = 1; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * PisPasep constructor. |
||
| 17 | * |
||
| 18 | * @param $number |
||
| 19 | */ |
||
| 20 | 22 | public function __construct($number) |
|
| 25 | |||
| 26 | 11 | public static function createFromString($number) |
|
| 30 | |||
| 31 | /** |
||
| 32 | * @return string Returns formatted number, such as: 00.00000.00-0 |
||
| 33 | */ |
||
| 34 | 4 | public function format() |
|
| 38 | |||
| 39 | /** |
||
| 40 | * {@inheritdoc} |
||
| 41 | */ |
||
| 42 | 12 | public function calculateDigit($baseNumber) |
|
| 53 | } |
||
| 54 |
This check looks for a call to a parent method whose name is different than the method from which it is called.
Consider the following code:
The
getFirstName()method in theSoncalls the wrong method in the parent class.