Completed
Push — master ( 46671d...c7ced1 )
by
unknown
02:52
created
src/Modules/Rule/RuleServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
     {
15 15
         $router->group([
16 16
             'prefix'     => 'loadsman/rules',
17
-        ], function ($router) {
17
+        ], function($router) {
18 18
             $router->exposeAll(RuleController::class);
19 19
         });
20 20
     }
Please login to merge, or discard this patch.
src/Modules/Rule/RuleController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
         $rules = app(RuleRepository::class)->getAll();
13 13
 
14 14
         $transformer = new RuleTransformer();
15
-        $data = array_map(function (Rule $rule) use ($transformer) {
15
+        $data = array_map(function(Rule $rule) use ($transformer) {
16 16
             return $transformer->transform($rule);
17 17
         }, $rules);
18 18
 
Please login to merge, or discard this patch.
src/Http/Controllers/RouteController.php 1 patch
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,8 +2,8 @@
 block discarded – undo
2 2
 
3 3
 namespace Loadsman\LaravelPlugin\Http\Controllers;
4 4
 
5
-use Loadsman\LaravelPlugin\Contracts\RouteRepositoryInterface;
6 5
 use Illuminate\Routing\Controller;
6
+use Loadsman\LaravelPlugin\Contracts\RouteRepositoryInterface;
7 7
 
8 8
 /**
9 9
  * Class RoutesController
Please login to merge, or discard this patch.
src/Repositories/RouteLaravelRepository.php 1 patch
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,10 +2,10 @@
 block discarded – undo
2 2
 
3 3
 namespace Loadsman\LaravelPlugin\Repositories;
4 4
 
5
+use Illuminate\Routing\Router;
5 6
 use Loadsman\LaravelPlugin\Collections\RouteCollection;
6 7
 use Loadsman\LaravelPlugin\Contracts\RouteRepositoryInterface;
7 8
 use Loadsman\LaravelPlugin\Entities\RouteInfo;
8
-use Illuminate\Routing\Router;
9 9
 
10 10
 class RouteLaravelRepository implements RouteRepositoryInterface
11 11
 {
Please login to merge, or discard this patch.
src/Entities/RouteInfo.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
     {
109 109
         $reflection = $this->getActionReflection();
110 110
 
111
-        if (! is_null($reflection)) {
111
+        if (!is_null($reflection)) {
112 112
             return $reflection->getDocComment();
113 113
         }
114 114
 
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
             }
139 139
 
140 140
             // We don't care if argument is anything but FormRequest
141
-            if (! is_subclass_of($class->name, FormRequest::class)) {
141
+            if (!is_subclass_of($class->name, FormRequest::class)) {
142 142
                 continue;
143 143
             }
144 144
 
@@ -187,14 +187,14 @@  discard block
 block discarded – undo
187 187
             list($controller, $action) = explode('@', $uses);
188 188
 
189 189
             // Controller is missing.
190
-            if (! class_exists($controller)) {
190
+            if (!class_exists($controller)) {
191 191
                 $this->setError('uses', 'controller does not exists');
192 192
 
193 193
                 return null;
194 194
             }
195 195
 
196 196
             // Action is missing.
197
-            if (! method_exists($controller, $action)) {
197
+            if (!method_exists($controller, $action)) {
198 198
                 $this->setError('uses', 'controller@method does not exists');
199 199
 
200 200
                 return null;
Please login to merge, or discard this patch.
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -237,6 +237,10 @@
 block discarded – undo
237 237
         return $this->route->$methodName();
238 238
     }
239 239
 
240
+    /**
241
+     * @param string $type
242
+     * @param string $text
243
+     */
240 244
     protected function setError($type, $text, $params = [])
241 245
     {
242 246
         $this->errors[$type] = trans($text, $params);
Please login to merge, or discard this patch.