File tree Expand file tree Collapse file tree 4 files changed +10
-7
lines changed
Expand file tree Collapse file tree 4 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -298,7 +298,7 @@ protected function getTitle()
298298 return $ this ->problemStatusTitles [$ this ->status ];
299299 }
300300
301- if ($ this ->detail instanceof Throwable || $ this -> detail instanceof Exception ) {
301+ if ($ this ->detail instanceof Throwable) {
302302 return get_class ($ this ->detail );
303303 }
304304
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ public function statusCodes(): array
2828
2929 /**
3030 * @dataProvider statusCodes
31+ * @param int $status
3132 */
3233 public function testStatusIsUsedVerbatim (int $ status )
3334 {
@@ -132,6 +133,7 @@ public function knownStatusCodes(): array
132133
133134 /**
134135 * @dataProvider knownStatusCodes
136+ * @param int $status
135137 */
136138 public function testKnownStatusResultsInKnownTitle (int $ status )
137139 {
@@ -247,6 +249,7 @@ public function invalidStatusCodes(): array
247249 /**
248250 * @dataProvider invalidStatusCodes
249251 * @group api-tools-118
252+ * @param int $code
250253 */
251254 public function testInvalidHttpStatusCodesAreCastTo500 (int $ code )
252255 {
Original file line number Diff line number Diff line change 1010use Laminas \Mvc \MvcEvent ;
1111use Laminas \Mvc \SendResponseListener ;
1212use Laminas \ServiceManager \ServiceLocatorInterface ;
13+ use PHPUnit \Framework \MockObject \MockObject ;
1314use PHPUnit \Framework \TestCase ;
1415use ReflectionClass ;
1516
1617class ModuleTest extends TestCase
1718{
18- /**
19- * @return EventManager
20- */
19+ /** @return EventManager */
2120 public function marshalEventManager ()
2221 {
2322 $ r = new ReflectionClass (EventManager::class);
@@ -49,9 +48,7 @@ public function testOnBootstrap()
4948 $ module ->onBootstrap ($ event );
5049 }
5150
52- /**
53- * @return null|ApiProblemListener|SendResponseListener|SendApiProblemResponseListener
54- */
51+ /** @return null|ApiProblemListener|SendResponseListener|SendApiProblemResponseListener */
5552 public function serviceLocator (string $ service )
5653 {
5754 switch ($ service ) {
Original file line number Diff line number Diff line change 88use Laminas \ApiTools \ApiProblem \View \ApiProblemStrategy ;
99use Laminas \Http \Response ;
1010use Laminas \View \Model \JsonModel ;
11+ use Laminas \View \Model \ModelInterface as Model ;
1112use Laminas \View \Model \ViewModel ;
1213use Laminas \View \ViewEvent ;
1314use PHPUnit \Framework \TestCase ;
@@ -36,6 +37,7 @@ public function invalidViewModels()
3637
3738 /**
3839 * @dataProvider invalidViewModels
40+ * @param null|Model $model
3941 */
4042 public function testSelectRendererReturnsNullIfModelIsNotAnApiProblemModel (?ViewModel $ model )
4143 {
@@ -89,6 +91,7 @@ public function invalidStatusCodes(): array
8991
9092 /**
9193 * @dataProvider invalidStatusCodes
94+ * @param int $status
9295 */
9396 public function testUsesStatusCode500ForAnyStatusCodesAbove599OrBelow100 (int $ status )
9497 {
You can’t perform that action at this time.
0 commit comments