We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| 1 | <?php |
||
| 16 | class DateTime extends AbstractRule |
||
| 17 | { |
||
| 18 | const EXCEPTIONAL_FORMATS = [ |
||
| 19 | 'c' => 'Y-m-d\TH:i:sP', |
||
| 20 | 'r' => 'D, d M Y H:i:s O', |
||
| 21 | ]; |
||
| 22 | |||
| 23 | public $format; |
||
| 24 | |||
| 25 | 16 | public function __construct(string $format = null) |
|
| 29 | |||
| 30 | 33 | public function validate($input) |
|
| 46 | |||
| 47 | 5 | private function validateWithoutFormat(string $input): bool |
|
| 51 | |||
| 52 | 26 | private function validateWithFormat(string $input, string $format): bool |
|
| 62 | } |
||
| 63 |