@@ -1,4 +1,6 @@
Loading
1 1
<?php
2 +
declare(strict_types=1);
3 +
2 4
namespace Alt3\Swagger\Controller;
3 5
4 6
use Cake\Routing\Router;
@@ -37,7 +39,7 @@
Loading
37 39
            'plugin' => 'Alt3/Swagger',
38 40
            'controller' => 'Docs',
39 41
            'action' => 'index',
40 -
            $defaultDocument
42 +
            $defaultDocument,
41 43
        ], true);
42 44
    }
43 45
}

@@ -1,4 +1,6 @@
Loading
1 1
<?php
2 +
declare(strict_types=1);
3 +
2 4
namespace Alt3\Swagger\Lib;
3 5
4 6
use Cake\Core\Configure;
@@ -8,7 +10,6 @@
Loading
8 10
9 11
class SwaggerTools
10 12
{
11 -
12 13
    /**
13 14
     * @var string Prepended to filesystem swagger json files
14 15
     */
@@ -40,7 +41,7 @@
Loading
40 41
        $swaggerOptions = [];
41 42
        if (Configure::read("Swagger.library.$id.exclude")) {
42 43
            $swaggerOptions = [
43 -
                'exclude' => Configure::read("Swagger.library.$id.exclude")
44 +
                'exclude' => Configure::read("Swagger.library.$id.exclude"),
44 45
            ];
45 46
        }
46 47
        if (Configure::read('Swagger.analyser')) {

@@ -1,4 +1,6 @@
Loading
1 1
<?php
2 +
declare(strict_types=1);
3 +
2 4
namespace Alt3\Swagger\Controller;
3 5
4 6
use Cake\Controller\Controller as BaseController;
@@ -7,7 +9,6 @@
Loading
7 9
8 10
class AppController extends BaseController
9 11
{
10 -
11 12
    /**
12 13
     * @var array that will hold merged configuration settings.
13 14
     */
@@ -18,11 +19,11 @@
Loading
18 19
     */
19 20
    public static $defaultConfig = [
20 21
        'docs' => [
21 -
            'crawl' => true
22 +
            'crawl' => true,
22 23
        ],
23 24
        'ui' => [
24 -
            'title' => 'cakephp-swagger'
25 -
        ]
25 +
            'title' => 'cakephp-swagger',
26 +
        ],
26 27
    ];
27 28
28 29
    /**

@@ -1,4 +1,6 @@
Loading
1 1
<?php
2 +
declare(strict_types=1);
3 +
2 4
namespace Alt3\Swagger\Controller;
3 5
4 6
use Alt3\Swagger\Lib\SwaggerTools;
@@ -6,13 +8,12 @@
Loading
6 8
7 9
class DocsController extends AppController
8 10
{
9 -
10 11
    /**
11 12
     * @var array Default CakePHP API success response structure.
12 13
     */
13 14
    public static $apiResponseBody = [
14 15
        'success' => true,
15 -
        'data' => []
16 +
        'data' => [],
16 17
    ];
17 18
18 19
    /**
@@ -67,8 +68,8 @@
Loading
67 68
                    'plugin' => 'Alt3/Swagger',
68 69
                    'controller' => 'Docs',
69 70
                    'action' => 'index',
70 -
                    $document
71 -
                ], true)
71 +
                    $document,
72 +
                ], true),
72 73
            ];
73 74
        }
74 75

@@ -1,12 +1,14 @@
Loading
1 1
<?php
2 +
declare(strict_types=1);
3 +
2 4
namespace Alt3\Swagger\Shell;
3 5
4 6
use Alt3\Swagger\Controller\AppController;
5 7
use Alt3\Swagger\Lib\SwaggerTools;
8 +
use Cake\Console\ConsoleOptionParser;
6 9
use Cake\Console\Shell;
7 10
use Cake\Core\Configure;
8 11
use Cake\Utility\Hash;
9 -
use Cake\Console\ConsoleOptionParser;
10 12
11 13
class SwaggerShell extends Shell
12 14
{
@@ -23,11 +25,11 @@
Loading
23 25
        $parser = parent::getOptionParser();
24 26
25 27
        $parser->addSubcommand('makedocs', [
26 -
            'description' => __('Crawl-generate fresh swagger file system documents for all entries found in the library.')
28 +
            'description' => __('Crawl-generate fresh swagger file system documents for all entries found in the library.'),
27 29
        ])
28 30
        ->addArgument('host', [
29 31
            'help' => __("Swagger host FQDN (without protocol) as to be inserted into the swagger doc property 'host'"),
30 -
            'required' => true
32 +
            'required' => true,
31 33
        ]);
32 34
33 35
        return $parser;
Files Complexity Coverage
src 32 79.80%
Project Totals (5 files) 32 79.80%
138.5
7.3=.3
TRAVIS_OS_NAME=linux

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading