Completed
Push — master ( 0aeacb...627fc8 )
by Marcel
07:06
created
src/Mpociot/ApiDoc/ApiDocGenerator.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -109,8 +109,8 @@  discard block
 block discarded – undo
109 109
 
110 110
     /**
111 111
      * @param $arr
112
-     * @param $first
113
-     * @param $last
112
+     * @param string $first
113
+     * @param string $last
114 114
      * @return string
115 115
      */
116 116
     protected function fancyImplode($arr, $first, $last)
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
      *
336 336
      * @param  string $rule
337 337
      * @param  string $parameter
338
-     * @return array
338
+     * @return string
339 339
      */
340 340
     protected function parseParameters($rule, $parameter)
341 341
     {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
      */
118 118
     protected function fancyImplode($arr, $first, $last)
119 119
     {
120
-        $arr = array_map(function ($value) {
120
+        $arr = array_map(function($value) {
121 121
             return '`' . $value . '`';
122 122
         }, $arr);
123 123
         array_push($arr, implode($last, array_splice($arr, -2)));
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
             case 'after':
149 149
                 $attributeData['type'] = 'date';
150 150
                 $attributeData['description'][] = 'Must be a date after: `' . date(DATE_RFC850, strtotime($parameters[0])) . '`';
151
-                $attributeData['value'] = date(DATE_RFC850, strtotime('+1 day',strtotime($parameters[0])));
151
+                $attributeData['value'] = date(DATE_RFC850, strtotime('+1 day', strtotime($parameters[0])));
152 152
                 break;
153 153
             case 'alpha':
154 154
                 $attributeData['description'][] = 'Only alphabetic characters allowed';
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
             case 'before':
183 183
                 $attributeData['type'] = 'date';
184 184
                 $attributeData['description'][] = 'Must be a date preceding: `' . date(DATE_RFC850, strtotime($parameters[0])) . '`';
185
-                $attributeData['value'] = date(DATE_RFC850, strtotime('-1 day',strtotime($parameters[0])));
185
+                $attributeData['value'] = date(DATE_RFC850, strtotime('-1 day', strtotime($parameters[0])));
186 186
                 break;
187 187
             case 'date_format':
188 188
                 $attributeData['type'] = 'date';
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
             case 'json':
208 208
                 $attributeData['type'] = 'string';
209 209
                 $attributeData['description'][] = 'Must be a valid JSON string.';
210
-                $attributeData['value'] = json_encode(['foo','bar','baz']);
210
+                $attributeData['value'] = json_encode(['foo', 'bar', 'baz']);
211 211
                 break;
212 212
             case 'mimetypes':
213 213
             case 'mimes':
Please login to merge, or discard this patch.
src/Mpociot/ApiDoc/Commands/GenerateDocumentation.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
     /**
49 49
      * Execute the console command.
50 50
      *
51
-     * @return mixed
51
+     * @return false|null
52 52
      */
53 53
     public function handle()
54 54
     {
Please login to merge, or discard this patch.
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -6,8 +6,6 @@
 block discarded – undo
6 6
 use Illuminate\Support\Facades\Route;
7 7
 use Mpociot\ApiDoc\ApiDocGenerator;
8 8
 use Mpociot\Documentarian\Documentarian;
9
-use phpDocumentor\Reflection\DocBlock;
10
-use Symfony\Component\Process\Process;
11 9
 
12 10
 class GenerateDocumentation extends Command
13 11
 {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
         }
64 64
 
65 65
         if ($actAs !== null) {
66
-            if (version_compare($this->laravel->version(),'5.2.0', '<')) {
66
+            if (version_compare($this->laravel->version(), '5.2.0', '<')) {
67 67
                 $userModel = config('auth.model');
68 68
                 $user = $userModel::find($actAs);
69 69
                 $this->laravel['auth']->setUser($user);
Please login to merge, or discard this patch.
src/Mpociot/ApiDoc/Commands/UpdateDocumentation.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
     /**
49 49
      * Execute the console command.
50 50
      *
51
-     * @return mixed
51
+     * @return false|null
52 52
      */
53 53
     public function handle()
54 54
     {
Please login to merge, or discard this patch.
Unused Use Statements   -4 removed lines patch added patch discarded remove patch
@@ -3,11 +3,7 @@
 block discarded – undo
3 3
 namespace Mpociot\ApiDoc\Commands;
4 4
 
5 5
 use Illuminate\Console\Command;
6
-use Illuminate\Support\Facades\Route;
7
-use Mpociot\ApiDoc\ApiDocGenerator;
8 6
 use Mpociot\Documentarian\Documentarian;
9
-use phpDocumentor\Reflection\DocBlock;
10
-use Symfony\Component\Process\Process;
11 7
 
12 8
 class UpdateDocumentation extends Command
13 9
 {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
         $documentarian = new Documentarian();
51 51
 
52 52
         if (!is_dir($outputPath)) {
53
-            $this->error('There is no generated documentation available at '.$outputPath.'.');
53
+            $this->error('There is no generated documentation available at ' . $outputPath . '.');
54 54
             return false;
55 55
         }
56 56
         $this->info('Updating API HTML code');
Please login to merge, or discard this patch.
src/Mpociot/ApiDoc/ApiDocGeneratorServiceProvider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
      */
17 17
     public function boot()
18 18
     {
19
-        $this->loadViewsFrom(__DIR__.'/../../resources/views/', 'apidoc');
19
+        $this->loadViewsFrom(__DIR__ . '/../../resources/views/', 'apidoc');
20 20
     }
21 21
 
22 22
     /**
@@ -24,10 +24,10 @@  discard block
 block discarded – undo
24 24
      */
25 25
     public function register()
26 26
     {
27
-        $this->app['apidoc.generate'] = $this->app->share(function () {
27
+        $this->app['apidoc.generate'] = $this->app->share(function() {
28 28
             return new GenerateDocumentation();
29 29
         });
30
-        $this->app['apidoc.update'] = $this->app->share(function () {
30
+        $this->app['apidoc.update'] = $this->app->share(function() {
31 31
             return new UpdateDocumentation();
32 32
         });
33 33
 
Please login to merge, or discard this patch.