Apply fixes from StyleCI
Showing 4 of 4 files from the diff.
src/Tools/Traits/ParamHelpers.php
changed.
src/Tools/Generator.php
changed.
src/Tools/RouteDocBlocker.php
changed.
@@ -6,7 +6,7 @@
Loading
6 | 6 | ||
7 | 7 | trait ParamHelpers |
|
8 | 8 | { |
|
9 | - | protected function generateDummyValue(string $type) |
|
9 | + | protected function generateDummyValue(string $type) |
|
10 | 10 | { |
|
11 | 11 | $faker = Factory::create(); |
|
12 | 12 | if ($this->config->get('faker_seed')) { |
@@ -49,7 +49,7 @@
Loading
49 | 49 | * |
|
50 | 50 | * @return mixed |
|
51 | 51 | */ |
|
52 | - | protected function castToType(string $value, string $type) |
|
52 | + | protected function castToType(string $value, string $type) |
|
53 | 53 | { |
|
54 | 54 | $casts = [ |
|
55 | 55 | 'integer' => 'intval', |
@@ -175,7 +175,7 @@
Loading
175 | 175 | ||
176 | 176 | /** |
|
177 | 177 | * For each array notation parameter (eg user.*, item.*.name, object.*.*, user[]) |
|
178 | - | * generate concrete sample (user.0, item.0.name, object.0.0, user.0) with example as value |
|
178 | + | * generate concrete sample (user.0, item.0.name, object.0.0, user.0) with example as value. |
|
179 | 179 | * |
|
180 | 180 | * @param string $paramName |
|
181 | 181 | * @param mixed $paramExample |
@@ -13,8 +13,9 @@
Loading
13 | 13 | /** |
|
14 | 14 | * @param Route $route |
|
15 | 15 | * |
|
16 | - | * @return array<string, DocBlock> Method and class docblocks |
|
17 | 16 | * @throws \ReflectionException |
|
17 | + | * |
|
18 | + | * @return array<string, DocBlock> Method and class docblocks |
|
18 | 19 | */ |
|
19 | 20 | public static function getDocBlocksFromRoute(Route $route): array |
|
20 | 21 | { |
@@ -2,9 +2,6 @@
Loading
2 | 2 | ||
3 | 3 | namespace Mpociot\ApiDoc\Tools\Traits; |
|
4 | 4 | ||
5 | - | use Faker\Factory; |
|
6 | - | use Illuminate\Support\Arr; |
|
7 | - | use Illuminate\Support\Str; |
|
8 | 5 | use Mpociot\Reflection\DocBlock\Tag; |
|
9 | 6 | ||
10 | 7 | trait DocBlockParamHelpers |
@@ -19,7 +16,7 @@
Loading
19 | 16 | * |
|
20 | 17 | * @return bool Whether no example should be generated |
|
21 | 18 | */ |
|
22 | - | protected function shouldExcludeExample(Tag $tag) |
|
19 | + | protected function shouldExcludeExample(Tag $tag) |
|
23 | 20 | { |
|
24 | 21 | return strpos($tag->getContent(), ' No-example') !== false; |
|
25 | 22 | } |
@@ -33,7 +30,7 @@
Loading
33 | 30 | * |
|
34 | 31 | * @return array The description and included example. |
|
35 | 32 | */ |
|
36 | - | protected function parseParamDescription(string $description, string $type) |
|
33 | + | protected function parseParamDescription(string $description, string $type) |
|
37 | 34 | { |
|
38 | 35 | $example = null; |
|
39 | 36 | if (preg_match('/(.*)\s+Example:\s*(.*)\s*/', $description, $content)) { |
Files | Complexity | Coverage |
---|---|---|
src | 315 | 90.86% |
Project Totals (19 files) | 315 | 90.86% |
1044.2
TRAVIS_PHP_VERSION=7.1.3 TRAVIS_OS_NAME=linux
1044.1
TRAVIS_PHP_VERSION=7.2.0 TRAVIS_OS_NAME=linux
1044.4
TRAVIS_PHP_VERSION=7.2.0 TRAVIS_OS_NAME=linux
1044.5
TRAVIS_PHP_VERSION=7.1.3 TRAVIS_OS_NAME=linux
1045.1
TRAVIS_PHP_VERSION=7.2.0 TRAVIS_OS_NAME=linux
1044.3
TRAVIS_PHP_VERSION=7.0.0 TRAVIS_OS_NAME=linux
1045.4
TRAVIS_PHP_VERSION=7.2.0 TRAVIS_OS_NAME=linux
1045.3
TRAVIS_PHP_VERSION=7.0.0 TRAVIS_OS_NAME=linux
1045.6
TRAVIS_PHP_VERSION=7.0.0 TRAVIS_OS_NAME=linux
1045.5
TRAVIS_PHP_VERSION=7.1.3 TRAVIS_OS_NAME=linux
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.