Conditions | 3 |
Paths | 3 |
Total Lines | 19 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
44 | public function swaggerAction() |
||
45 | { |
||
46 | $this->finder->files()->in($this->rootDir . '/cache')->name('swagger.json'); |
||
47 | |||
48 | if ($this->finder->count() != 1) { |
||
49 | throw new FatalErrorException('Failed to find a generated swagger file'); |
||
|
|||
50 | } |
||
51 | |||
52 | foreach ($this->finder as $file) { |
||
53 | return new Response( |
||
54 | $file->getContents(), |
||
55 | Response::HTTP_OK, |
||
56 | [ |
||
57 | 'Content-Type' => 'application/json' |
||
58 | ], |
||
59 | false |
||
60 | ); |
||
61 | } |
||
62 | } |
||
63 | } |
||
64 |
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.