File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 2
2
3
3
namespace Mtrajano \LaravelSwagger \Formatters ;
4
4
5
+ use Mtrajano \LaravelSwagger \LaravelSwaggerException ;
6
+
5
7
class JsonFormatter extends Formatter
6
8
{
7
9
public function format ()
8
10
{
9
11
if (!extension_loaded ('json ' )) {
10
- throw new \ Exception ('JSON extension must be loaded to use the json output format ' );
12
+ throw new LaravelSwaggerException ('JSON extension must be loaded to use the json output format ' );
11
13
}
12
14
13
15
return json_encode ($ this ->docs , JSON_PRETTY_PRINT );
Original file line number Diff line number Diff line change 2
2
3
3
namespace Mtrajano \LaravelSwagger \Formatters ;
4
4
5
+ use Mtrajano \LaravelSwagger \LaravelSwaggerException ;
6
+
5
7
class YamlFormatter extends Formatter
6
8
{
7
9
public function format ()
8
10
{
9
11
if (!extension_loaded ('yaml ' )) {
10
- throw new \ Exception ('YAML extension must be loaded to use the yaml output format ' );
12
+ throw new LaravelSwaggerException ('YAML extension must be loaded to use the yaml output format ' );
11
13
}
12
14
13
15
return yaml_emit ($ this ->docs );
You can’t perform that action at this time.
0 commit comments