1 | <?php |
||
53 | class Exceptions |
||
54 | { |
||
55 | /** |
||
56 | * create a new ActionFailedException |
||
57 | * |
||
58 | * @param string $methodName |
||
59 | * should always be the __METHOD__ constant |
||
60 | * @param string $reason |
||
61 | * why did the action fail? |
||
62 | * @param array $params |
||
63 | * supporting data on why the action failed |
||
64 | * @return ActionFailedException |
||
65 | */ |
||
66 | public static function newActionFailedException($methodName, $reason = '', $params = []) |
||
70 | |||
71 | /** |
||
72 | * create a new ExpectFailedException |
||
73 | * |
||
74 | * @param string $methodName |
||
75 | * should always be the __METHOD__ constant |
||
76 | * @param string $expected |
||
77 | * an explanation of the result that was expected |
||
78 | * @param string $actual |
||
79 | * an explanation of what the result was |
||
80 | * @return ExpectFailedException |
||
81 | */ |
||
82 | public static function newExpectFailedException($methodName, $expected, $actual) |
||
86 | |||
87 | /** |
||
88 | * create a new NotImplementedException |
||
89 | * |
||
90 | * @param string $methodName |
||
91 | * should be the equivalent of the __METHOD__ constant |
||
92 | * @return NotImplementedException |
||
93 | */ |
||
94 | public static function newNotImplementedException($methodName) |
||
98 | |||
99 | /** |
||
100 | * create a new ObsoleteModuleException |
||
101 | * |
||
102 | * @param string $moduleName |
||
103 | * the name of the module that is now obsolete |
||
104 | * @param string $replacementName |
||
105 | * the name of the module that should be used going forward |
||
106 | * @return ObsoleteModuleException |
||
107 | */ |
||
108 | public static function newObsoleteModuleException($moduleName, $replacementName) |
||
112 | |||
113 | /** |
||
114 | * create a new StoryCannotRunException |
||
115 | * |
||
116 | * @param string $reason |
||
117 | * why can't the story run? |
||
118 | * @return StoryCannotRunException |
||
119 | */ |
||
120 | public static function newStoryCannotRunException($reason) |
||
124 | |||
125 | /** |
||
126 | * create a new StoryShouldFailException |
||
127 | * |
||
128 | * @return StoryShouldFailException |
||
129 | */ |
||
130 | public static function newStoryShouldFailException() |
||
134 | } |
||
135 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.