|
1 | | -<?php namespace Tatter\Relations\Exceptions; |
| 1 | +<?php |
| 2 | + |
| 3 | +namespace Tatter\Relations\Exceptions; |
2 | 4 |
|
3 | | -use RuntimeException; |
4 | 5 | use CodeIgniter\Exceptions\ExceptionInterface; |
5 | | -use CodeIgniter\Exceptions\FrameworkException; |
| 6 | +use RuntimeException; |
6 | 7 |
|
7 | 8 | class RelationsException extends RuntimeException implements ExceptionInterface |
8 | 9 | { |
9 | | - public static function forUnknownTable($tableName) |
10 | | - { |
11 | | - return new static(lang('Relations.unknownTable', [$tableName])); |
12 | | - } |
13 | | - |
14 | | - public static function forUnknownRelation($table1, $table2) |
15 | | - { |
16 | | - return new static(lang('Relations.unknownRelation', [$table1, $table2])); |
17 | | - } |
18 | | - |
19 | | - public static function forMissingPivots($table1, $table2) |
20 | | - { |
21 | | - return new static(lang('Relations.missingPivots', [$table1, $table2])); |
22 | | - } |
23 | | - |
24 | | - public static function forMissingProperty($class, $property) |
25 | | - { |
26 | | - return new static(lang('Relations.missingProperty', [$class, $property])); |
27 | | - } |
28 | | - |
29 | | - public static function forNotRelatable($class) |
30 | | - { |
31 | | - return new static(lang('Relations.notRelatable', [$class])); |
32 | | - } |
| 10 | + public static function forUnknownTable($tableName) |
| 11 | + { |
| 12 | + return new static(lang('Relations.unknownTable', [$tableName])); |
| 13 | + } |
| 14 | + |
| 15 | + public static function forUnknownRelation($table1, $table2) |
| 16 | + { |
| 17 | + return new static(lang('Relations.unknownRelation', [$table1, $table2])); |
| 18 | + } |
| 19 | + |
| 20 | + public static function forMissingPivots($table1, $table2) |
| 21 | + { |
| 22 | + return new static(lang('Relations.missingPivots', [$table1, $table2])); |
| 23 | + } |
| 24 | + |
| 25 | + public static function forMissingProperty($class, $property) |
| 26 | + { |
| 27 | + return new static(lang('Relations.missingProperty', [$class, $property])); |
| 28 | + } |
| 29 | + |
| 30 | + public static function forNotRelatable($class) |
| 31 | + { |
| 32 | + return new static(lang('Relations.notRelatable', [$class])); |
| 33 | + } |
33 | 34 | } |
0 commit comments