| Total Complexity | 2 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | class EnrollmentCannotBeDeleted extends Exception |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * The enrollment that cannot be deleted. |
||
| 12 | * |
||
| 13 | * @var \App\Judite\Models\Enrollment |
||
| 14 | */ |
||
| 15 | protected $enrollment; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Create a new exception instance. |
||
| 19 | * |
||
| 20 | * @param \App\Judite\Models\Enrollment $course |
||
| 21 | * @param string $message |
||
| 22 | */ |
||
| 23 | public function __construct(Enrollment $enrollment = null, $message = 'The enrollment cannot be deleted.') |
||
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Get the enrollment of this exception. |
||
| 31 | * |
||
| 32 | * @return \App\Judite\Models\Enrollment |
||
| 33 | */ |
||
| 34 | public function getEnrollment() |
||
| 39 |