| Total Complexity | 6 |
| Total Lines | 44 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | class DiffParseException extends Exception |
||
| 18 | { |
||
| 19 | public const END_OF_FILE = '<EOF>'; |
||
| 20 | |||
| 21 | public static function missingRenameTo(string $line): self |
||
| 22 | { |
||
| 23 | return new self('NO_RENAME_TO', $line); |
||
| 24 | } |
||
| 25 | |||
| 26 | public static function missingNewFileName(string $line): self |
||
| 27 | { |
||
| 28 | return new self('NO_NEW_FILE_NAME', $line); |
||
| 29 | } |
||
| 30 | |||
| 31 | public static function invalidRangeInformation(string $rangeInformation): self |
||
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @var string |
||
| 38 | */ |
||
| 39 | private $reason; |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @var string |
||
| 43 | */ |
||
| 44 | private $details; |
||
| 45 | |||
| 46 | public function __construct(string $reason, string $details) |
||
| 47 | { |
||
| 48 | parent::__construct("$reason: $details"); |
||
| 49 | $this->reason = $reason; |
||
| 50 | $this->details = $details; |
||
| 51 | } |
||
| 52 | |||
| 53 | public function getReason(): string |
||
| 54 | { |
||
| 55 | return $this->reason; |
||
| 56 | } |
||
| 57 | |||
| 58 | public function getDetails(): string |
||
| 61 | } |
||
| 62 | } |
||
| 63 |