Completed
Push — master ( ab2185...c08f71 )
by Sherif
01:55
created
src/Modules/Users/Http/Requests/StoreUser.php 1 patch
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -6,27 +6,27 @@
 block discarded – undo
6 6
 
7 7
 class StoreUser extends FormRequest
8 8
 {
9
-    /**
10
-     * Determine if the user is authorized to make this request.
11
-     *
12
-     * @return bool
13
-     */
14
-    public function authorize()
15
-    {
16
-        return true;
17
-    }
9
+	/**
10
+	 * Determine if the user is authorized to make this request.
11
+	 *
12
+	 * @return bool
13
+	 */
14
+	public function authorize()
15
+	{
16
+		return true;
17
+	}
18 18
 
19
-    /**
20
-     * Get the validation rules that apply to the request.
21
-     *
22
-     * @return array
23
-     */
24
-    public function rules()
25
-    {
26
-        return [
27
-            'name'     => 'nullable|string',
28
-            'email'    => 'required|email|unique:users,email,'.$this->get('id'),
29
-            'password' => 'nullable|min:6'
30
-        ];
31
-    }
19
+	/**
20
+	 * Get the validation rules that apply to the request.
21
+	 *
22
+	 * @return array
23
+	 */
24
+	public function rules()
25
+	{
26
+		return [
27
+			'name'     => 'nullable|string',
28
+			'email'    => 'required|email|unique:users,email,'.$this->get('id'),
29
+			'password' => 'nullable|min:6'
30
+		];
31
+	}
32 32
 }
Please login to merge, or discard this patch.
src/Modules/Core/Console/Commands/GenerateDocCommand.php 3 patches
Doc Comments   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
     /**
208 208
      * Get the given method body code.
209 209
      *
210
-     * @param  object $reflectionMethod
210
+     * @param  \ReflectionMethod $reflectionMethod
211 211
      * @return string
212 212
      */
213 213
     protected function getMethodBody($reflectionMethod)
@@ -228,6 +228,7 @@  discard block
 block discarded – undo
228 228
      *
229 229
      * @param  string $modelName
230 230
      * @param  array  $docData
231
+     * @param \ReflectionClass $reflectionClass
231 232
      * @return string
232 233
      */
233 234
     protected function getModels($modelName, &$docData, $reflectionClass)
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 
56 56
                     $prefix = $route['prefix'];
57 57
                     $module = \Str::camel(str_replace('/', '_', str_replace('api', '', $prefix)));
58
-                    if($prefix === 'telescope') {
58
+                    if ($prefix === 'telescope') {
59 59
                         continue;
60 60
                     }
61 61
 
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
      */
95 95
     protected function getRoutes()
96 96
     {
97
-        return collect(\Route::getRoutes())->map(function ($route) {
97
+        return collect(\Route::getRoutes())->map(function($route) {
98 98
             if (strpos($route->uri(), 'api/') !== false) {
99 99
                 return [
100 100
                     'method' => $route->methods()[0],
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
         ];
126 126
 
127 127
 
128
-        if (! $skipLoginCheck || ! in_array($method, $skipLoginCheck)) {
128
+        if ( ! $skipLoginCheck || ! in_array($method, $skipLoginCheck)) {
129 129
             $route['headers']['Authorization'] = 'Bearer {token}';
130 130
         }
131 131
     }
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
         if (count($parameters)) {
175 175
             $className = optional($reflectionMethod->getParameters()[0]->getType())->getName();
176 176
             if ($className) {
177
-                $reflectionClass  = new \ReflectionClass($className);
177
+                $reflectionClass = new \ReflectionClass($className);
178 178
     
179 179
                 if ($reflectionClass->hasMethod('rules')) {
180 180
                     $reflectionMethod = $reflectionClass->getMethod('rules');
@@ -201,8 +201,8 @@  discard block
 block discarded – undo
201 201
     {
202 202
         $errors = [];
203 203
         foreach (\Module::all() as $module) {
204
-            $nameSpace = 'App\\Modules\\' . $module['basename'] ;
205
-            $class = $nameSpace . '\\Errors\\'  . $module['basename'] . 'Errors';
204
+            $nameSpace = 'App\\Modules\\'.$module['basename'];
205
+            $class = $nameSpace.'\\Errors\\'.$module['basename'].'Errors';
206 206
             $reflectionClass = new \ReflectionClass($class);
207 207
             foreach ($reflectionClass->getMethods() as $method) {
208 208
                 $methodName       = $method->name;
Please login to merge, or discard this patch.
Indentation   +272 added lines, -272 removed lines patch added patch discarded remove patch
@@ -8,280 +8,280 @@
 block discarded – undo
8 8
 
9 9
 class GenerateDocCommand extends Command
10 10
 {
11
-    /**
12
-     * The name and signature of the console command.
13
-     *
14
-     * @var string
15
-     */
16
-    protected $signature = 'doc:generate';
17
-
18
-    /**
19
-     * The console command description.
20
-     *
21
-     * @var string
22
-     */
23
-    protected $description = 'Generate api documentation';
24
-
25
-    /**
26
-     * @var ReprotService
27
-     */
28
-    protected $reportService;
29
-
30
-    /**
31
-     * Init new object.
32
-     *
33
-     * @return  void
34
-     */
35
-    public function __construct(ReportService $reportService)
36
-    {
37
-        $this->reportService = $reportService;
38
-        parent::__construct();
39
-    }
40
-
41
-    /**
42
-     * Execute the console command.
43
-     *
44
-     * @return mixed
45
-     */
46
-    public function handle()
47
-    {
48
-        $docData           = [];
49
-        $docData['models'] = [];
50
-        $routes            = $this->getRoutes();
51
-        foreach ($routes as $route) {
52
-            if ($route) {
53
-                $actoinArray = explode('@', $route['action']);
54
-                if (Arr::get($actoinArray, 1, false)) {
55
-
56
-                    $prefix = $route['prefix'];
57
-                    $module = \Str::camel(str_replace('/', '_', str_replace('api', '', $prefix)));
58
-                    if($prefix === 'telescope') {
59
-                        continue;
60
-                    }
61
-
62
-                    $controller       = $actoinArray[0];
63
-                    $method           = $actoinArray[1];
64
-                    $route['name']    = $method !== 'index' ? $method : 'list';
11
+	/**
12
+	 * The name and signature of the console command.
13
+	 *
14
+	 * @var string
15
+	 */
16
+	protected $signature = 'doc:generate';
17
+
18
+	/**
19
+	 * The console command description.
20
+	 *
21
+	 * @var string
22
+	 */
23
+	protected $description = 'Generate api documentation';
24
+
25
+	/**
26
+	 * @var ReprotService
27
+	 */
28
+	protected $reportService;
29
+
30
+	/**
31
+	 * Init new object.
32
+	 *
33
+	 * @return  void
34
+	 */
35
+	public function __construct(ReportService $reportService)
36
+	{
37
+		$this->reportService = $reportService;
38
+		parent::__construct();
39
+	}
40
+
41
+	/**
42
+	 * Execute the console command.
43
+	 *
44
+	 * @return mixed
45
+	 */
46
+	public function handle()
47
+	{
48
+		$docData           = [];
49
+		$docData['models'] = [];
50
+		$routes            = $this->getRoutes();
51
+		foreach ($routes as $route) {
52
+			if ($route) {
53
+				$actoinArray = explode('@', $route['action']);
54
+				if (Arr::get($actoinArray, 1, false)) {
55
+
56
+					$prefix = $route['prefix'];
57
+					$module = \Str::camel(str_replace('/', '_', str_replace('api', '', $prefix)));
58
+					if($prefix === 'telescope') {
59
+						continue;
60
+					}
61
+
62
+					$controller       = $actoinArray[0];
63
+					$method           = $actoinArray[1];
64
+					$route['name']    = $method !== 'index' ? $method : 'list';
65 65
                     
66
-                    $reflectionClass  = new \ReflectionClass($controller);
67
-                    $reflectionMethod = $reflectionClass->getMethod($method);
68
-                    $classProperties  = $reflectionClass->getDefaultProperties();
69
-                    $skipLoginCheck   = Arr::get($classProperties, 'skipLoginCheck', false);
70
-                    $modelName        = explode('\\', $controller);
71
-                    $modelName        = lcfirst(str_replace('Controller', '', end($modelName)));
72
-
73
-                    $this->processDocBlock($route, $reflectionMethod);
74
-                    $this->getHeaders($route, $method, $skipLoginCheck);
75
-                    $this->getPostData($route, $reflectionMethod);
76
-
77
-                    $route['response'] = $this->getResponseObject($modelName, $route['name'], $route['returnDocBlock']);
78
-                    $docData['modules'][$module][] = $route;
79
-
80
-                    $this->getModels($modelName, $docData, $reflectionClass);
81
-                }
82
-            }
83
-        }
66
+					$reflectionClass  = new \ReflectionClass($controller);
67
+					$reflectionMethod = $reflectionClass->getMethod($method);
68
+					$classProperties  = $reflectionClass->getDefaultProperties();
69
+					$skipLoginCheck   = Arr::get($classProperties, 'skipLoginCheck', false);
70
+					$modelName        = explode('\\', $controller);
71
+					$modelName        = lcfirst(str_replace('Controller', '', end($modelName)));
72
+
73
+					$this->processDocBlock($route, $reflectionMethod);
74
+					$this->getHeaders($route, $method, $skipLoginCheck);
75
+					$this->getPostData($route, $reflectionMethod);
76
+
77
+					$route['response'] = $this->getResponseObject($modelName, $route['name'], $route['returnDocBlock']);
78
+					$docData['modules'][$module][] = $route;
79
+
80
+					$this->getModels($modelName, $docData, $reflectionClass);
81
+				}
82
+			}
83
+		}
84 84
         
85
-        $docData['errors']  = $this->getErrors();
86
-        $docData['reports'] = $this->reportService->all();
87
-        \File::put(app_path('Modules/Core/Resources/api.json'), json_encode($docData));
88
-    }
89
-
90
-    /**
91
-     * Get list of all registered routes.
92
-     *
93
-     * @return collection
94
-     */
95
-    protected function getRoutes()
96
-    {
97
-        return collect(\Route::getRoutes())->map(function ($route) {
98
-            if (strpos($route->uri(), 'api/') !== false) {
99
-                return [
100
-                    'method' => $route->methods()[0],
101
-                    'uri'    => $route->uri(),
102
-                    'action' => $route->getActionName(),
103
-                    'prefix' => $route->getPrefix()
104
-                ];
105
-            }
106
-            return false;
107
-        })->all();
108
-    }
109
-
110
-    /**
111
-     * Generate headers for the given route.
112
-     *
113
-     * @param  array  &$route
114
-     * @param  string $method
115
-     * @param  array  $skipLoginCheck
116
-     * @return void
117
-     */
118
-    protected function getHeaders(&$route, $method, $skipLoginCheck)
119
-    {
120
-        $route['headers'] = [
121
-        'Accept'       => 'application/json',
122
-        'Content-Type' => 'application/json',
123
-        'locale'       => 'The language of the returned data: ar, en or all.',
124
-        'time-zone'    => 'Your locale time zone',
125
-        ];
126
-
127
-
128
-        if (! $skipLoginCheck || ! in_array($method, $skipLoginCheck)) {
129
-            $route['headers']['Authorization'] = 'Bearer {token}';
130
-        }
131
-    }
132
-
133
-    /**
134
-     * Generate description and params for the given route
135
-     * based on the docblock.
136
-     *
137
-     * @param  array  &$route
138
-     * @param  \ReflectionMethod $reflectionMethod
139
-     * @return void
140
-     */
141
-    protected function processDocBlock(&$route, $reflectionMethod)
142
-    {
143
-        $factory                 = \phpDocumentor\Reflection\DocBlockFactory::createInstance();
144
-        $docblock                = $factory->create($reflectionMethod->getDocComment());
145
-        $route['description']    = trim(preg_replace('/\s+/', ' ', $docblock->getSummary()));
146
-        $params                  = $docblock->getTagsByName('param');
147
-        $route['returnDocBlock'] = $docblock->getTagsByName('return')[0]->getType()->getFqsen()->getName();
148
-
149
-        foreach ($params as $param) {
150
-            $name = $param->getVariableName();
151
-            if ($name !== 'request') {
152
-                $route['parametars'][$param->getVariableName()] = $param->getDescription()->render();
153
-            }
154
-        }
155
-
156
-        if ($route['name'] === 'list') {
157
-            $route['parametars']['perPage'] = 'perPage?';
158
-            $route['parametars']['sortBy']  = 'sortBy?';
159
-            $route['parametars']['desc']    = 'desc?';
160
-            $route['parametars']['trashed'] = 'trashed?';
161
-        }
162
-    }
163
-
164
-    /**
165
-     * Generate post body for the given route.
166
-     *
167
-     * @param  array  &$route
168
-     * @param  \ReflectionMethod $reflectionMethod
169
-     * @return void
170
-     */
171
-    protected function getPostData(&$route, $reflectionMethod)
172
-    {
173
-        $parameters = $reflectionMethod->getParameters();
174
-        if (count($parameters)) {
175
-            $className = optional($reflectionMethod->getParameters()[0]->getType())->getName();
176
-            if ($className) {
177
-                $reflectionClass  = new \ReflectionClass($className);
85
+		$docData['errors']  = $this->getErrors();
86
+		$docData['reports'] = $this->reportService->all();
87
+		\File::put(app_path('Modules/Core/Resources/api.json'), json_encode($docData));
88
+	}
89
+
90
+	/**
91
+	 * Get list of all registered routes.
92
+	 *
93
+	 * @return collection
94
+	 */
95
+	protected function getRoutes()
96
+	{
97
+		return collect(\Route::getRoutes())->map(function ($route) {
98
+			if (strpos($route->uri(), 'api/') !== false) {
99
+				return [
100
+					'method' => $route->methods()[0],
101
+					'uri'    => $route->uri(),
102
+					'action' => $route->getActionName(),
103
+					'prefix' => $route->getPrefix()
104
+				];
105
+			}
106
+			return false;
107
+		})->all();
108
+	}
109
+
110
+	/**
111
+	 * Generate headers for the given route.
112
+	 *
113
+	 * @param  array  &$route
114
+	 * @param  string $method
115
+	 * @param  array  $skipLoginCheck
116
+	 * @return void
117
+	 */
118
+	protected function getHeaders(&$route, $method, $skipLoginCheck)
119
+	{
120
+		$route['headers'] = [
121
+		'Accept'       => 'application/json',
122
+		'Content-Type' => 'application/json',
123
+		'locale'       => 'The language of the returned data: ar, en or all.',
124
+		'time-zone'    => 'Your locale time zone',
125
+		];
126
+
127
+
128
+		if (! $skipLoginCheck || ! in_array($method, $skipLoginCheck)) {
129
+			$route['headers']['Authorization'] = 'Bearer {token}';
130
+		}
131
+	}
132
+
133
+	/**
134
+	 * Generate description and params for the given route
135
+	 * based on the docblock.
136
+	 *
137
+	 * @param  array  &$route
138
+	 * @param  \ReflectionMethod $reflectionMethod
139
+	 * @return void
140
+	 */
141
+	protected function processDocBlock(&$route, $reflectionMethod)
142
+	{
143
+		$factory                 = \phpDocumentor\Reflection\DocBlockFactory::createInstance();
144
+		$docblock                = $factory->create($reflectionMethod->getDocComment());
145
+		$route['description']    = trim(preg_replace('/\s+/', ' ', $docblock->getSummary()));
146
+		$params                  = $docblock->getTagsByName('param');
147
+		$route['returnDocBlock'] = $docblock->getTagsByName('return')[0]->getType()->getFqsen()->getName();
148
+
149
+		foreach ($params as $param) {
150
+			$name = $param->getVariableName();
151
+			if ($name !== 'request') {
152
+				$route['parametars'][$param->getVariableName()] = $param->getDescription()->render();
153
+			}
154
+		}
155
+
156
+		if ($route['name'] === 'list') {
157
+			$route['parametars']['perPage'] = 'perPage?';
158
+			$route['parametars']['sortBy']  = 'sortBy?';
159
+			$route['parametars']['desc']    = 'desc?';
160
+			$route['parametars']['trashed'] = 'trashed?';
161
+		}
162
+	}
163
+
164
+	/**
165
+	 * Generate post body for the given route.
166
+	 *
167
+	 * @param  array  &$route
168
+	 * @param  \ReflectionMethod $reflectionMethod
169
+	 * @return void
170
+	 */
171
+	protected function getPostData(&$route, $reflectionMethod)
172
+	{
173
+		$parameters = $reflectionMethod->getParameters();
174
+		if (count($parameters)) {
175
+			$className = optional($reflectionMethod->getParameters()[0]->getType())->getName();
176
+			if ($className) {
177
+				$reflectionClass  = new \ReflectionClass($className);
178 178
     
179
-                if ($reflectionClass->hasMethod('rules')) {
180
-                    $reflectionMethod = $reflectionClass->getMethod('rules');
181
-                    $route['body'] = $reflectionMethod->invoke(new $className);
179
+				if ($reflectionClass->hasMethod('rules')) {
180
+					$reflectionMethod = $reflectionClass->getMethod('rules');
181
+					$route['body'] = $reflectionMethod->invoke(new $className);
182 182
         
183
-                    foreach ($route['body'] as &$rule) {
184
-                        if (strpos($rule, 'unique')) {
185
-                            $rule = substr($rule, 0, strpos($rule, 'unique') + 6);
186
-                        } elseif (strpos($rule, 'exists')) {
187
-                            $rule = substr($rule, 0, strpos($rule, 'exists') - 1);
188
-                        }
189
-                    }
190
-                }
191
-            }
192
-        }
193
-    }
194
-
195
-    /**
196
-     * Generate application errors.
197
-     *
198
-     * @return array
199
-     */
200
-    protected function getErrors()
201
-    {
202
-        $errors = [];
203
-        foreach (\Module::all() as $module) {
204
-            $nameSpace = 'App\\Modules\\' . $module['basename'] ;
205
-            $class = $nameSpace . '\\Errors\\'  . $module['basename'] . 'Errors';
206
-            $reflectionClass = new \ReflectionClass($class);
207
-            foreach ($reflectionClass->getMethods() as $method) {
208
-                $methodName       = $method->name;
209
-                $reflectionMethod = $reflectionClass->getMethod($methodName);
210
-                $body             = $this->getMethodBody($reflectionMethod);
211
-
212
-                preg_match('/\$error=\[\'status\'=>([^#]+)\,/iU', $body, $match);
213
-
214
-                if (count($match)) {
215
-                    $errors[$match[1]][] = $methodName;
216
-                }
217
-            }
218
-        }
219
-
220
-        return $errors;
221
-    }
222
-
223
-    /**
224
-     * Get the given method body code.
225
-     *
226
-     * @param  object $reflectionMethod
227
-     * @return string
228
-     */
229
-    protected function getMethodBody($reflectionMethod)
230
-    {
231
-        $filename   = $reflectionMethod->getFileName();
232
-        $start_line = $reflectionMethod->getStartLine() - 1;
233
-        $end_line   = $reflectionMethod->getEndLine();
234
-        $length     = $end_line - $start_line;
235
-        $source     = file($filename);
236
-        $body       = implode("", array_slice($source, $start_line, $length));
237
-        $body       = trim(preg_replace('/\s+/', '', $body));
238
-
239
-        return $body;
240
-    }
241
-
242
-    /**
243
-     * Get example object of all availble models.
244
-     *
245
-     * @param  string $modelName
246
-     * @param  array  $docData
247
-     * @return string
248
-     */
249
-    protected function getModels($modelName, &$docData, $reflectionClass)
250
-    {
251
-        if ($modelName && ! Arr::has($docData['models'], $modelName)) {
252
-            $modelClass = get_class(call_user_func_array("\Core::{$modelName}", [])->model);
253
-            $model      = factory($modelClass)->make();
254
-
255
-            $property = $reflectionClass->getProperty('modelResource');
256
-            $property->setAccessible(true);
257
-            $modelResource = $property->getValue(\App::make($reflectionClass->getName()));
258
-            $modelResource = new $modelResource($model);
259
-            $modelArr      = $modelResource->toArray([]);
260
-
261
-            foreach ($modelArr as $key => $attr) {
262
-                if (is_object($attr) && property_exists($attr, 'resource') && $attr->resource instanceof \Illuminate\Http\Resources\MissingValue) {
263
-                    unset($modelArr[$key]);
264
-                }
265
-            }
266
-
267
-            $docData['models'][$modelName] = json_encode($modelArr, JSON_PRETTY_PRINT);
268
-        }
269
-    }
270
-
271
-    /**
272
-     * Get the route response object type.
273
-     *
274
-     * @param  string $modelName
275
-     * @param  string $method
276
-     * @param  string $returnDocBlock
277
-     * @return array
278
-     */
279
-    protected function getResponseObject($modelName, $method, $returnDocBlock)
280
-    {
281
-        $relations = config('core.relations');
282
-        $relations = Arr::has($relations, $modelName) ? Arr::has($relations[$modelName], $method) ? $relations[$modelName] : false : false;
283
-        $modelName = call_user_func_array("\Core::{$returnDocBlock}", []) ? $returnDocBlock : $modelName;
284
-
285
-        return $relations ? [$modelName => $relations && $relations[$method] ? $relations[$method] : []] : false;
286
-    }
183
+					foreach ($route['body'] as &$rule) {
184
+						if (strpos($rule, 'unique')) {
185
+							$rule = substr($rule, 0, strpos($rule, 'unique') + 6);
186
+						} elseif (strpos($rule, 'exists')) {
187
+							$rule = substr($rule, 0, strpos($rule, 'exists') - 1);
188
+						}
189
+					}
190
+				}
191
+			}
192
+		}
193
+	}
194
+
195
+	/**
196
+	 * Generate application errors.
197
+	 *
198
+	 * @return array
199
+	 */
200
+	protected function getErrors()
201
+	{
202
+		$errors = [];
203
+		foreach (\Module::all() as $module) {
204
+			$nameSpace = 'App\\Modules\\' . $module['basename'] ;
205
+			$class = $nameSpace . '\\Errors\\'  . $module['basename'] . 'Errors';
206
+			$reflectionClass = new \ReflectionClass($class);
207
+			foreach ($reflectionClass->getMethods() as $method) {
208
+				$methodName       = $method->name;
209
+				$reflectionMethod = $reflectionClass->getMethod($methodName);
210
+				$body             = $this->getMethodBody($reflectionMethod);
211
+
212
+				preg_match('/\$error=\[\'status\'=>([^#]+)\,/iU', $body, $match);
213
+
214
+				if (count($match)) {
215
+					$errors[$match[1]][] = $methodName;
216
+				}
217
+			}
218
+		}
219
+
220
+		return $errors;
221
+	}
222
+
223
+	/**
224
+	 * Get the given method body code.
225
+	 *
226
+	 * @param  object $reflectionMethod
227
+	 * @return string
228
+	 */
229
+	protected function getMethodBody($reflectionMethod)
230
+	{
231
+		$filename   = $reflectionMethod->getFileName();
232
+		$start_line = $reflectionMethod->getStartLine() - 1;
233
+		$end_line   = $reflectionMethod->getEndLine();
234
+		$length     = $end_line - $start_line;
235
+		$source     = file($filename);
236
+		$body       = implode("", array_slice($source, $start_line, $length));
237
+		$body       = trim(preg_replace('/\s+/', '', $body));
238
+
239
+		return $body;
240
+	}
241
+
242
+	/**
243
+	 * Get example object of all availble models.
244
+	 *
245
+	 * @param  string $modelName
246
+	 * @param  array  $docData
247
+	 * @return string
248
+	 */
249
+	protected function getModels($modelName, &$docData, $reflectionClass)
250
+	{
251
+		if ($modelName && ! Arr::has($docData['models'], $modelName)) {
252
+			$modelClass = get_class(call_user_func_array("\Core::{$modelName}", [])->model);
253
+			$model      = factory($modelClass)->make();
254
+
255
+			$property = $reflectionClass->getProperty('modelResource');
256
+			$property->setAccessible(true);
257
+			$modelResource = $property->getValue(\App::make($reflectionClass->getName()));
258
+			$modelResource = new $modelResource($model);
259
+			$modelArr      = $modelResource->toArray([]);
260
+
261
+			foreach ($modelArr as $key => $attr) {
262
+				if (is_object($attr) && property_exists($attr, 'resource') && $attr->resource instanceof \Illuminate\Http\Resources\MissingValue) {
263
+					unset($modelArr[$key]);
264
+				}
265
+			}
266
+
267
+			$docData['models'][$modelName] = json_encode($modelArr, JSON_PRETTY_PRINT);
268
+		}
269
+	}
270
+
271
+	/**
272
+	 * Get the route response object type.
273
+	 *
274
+	 * @param  string $modelName
275
+	 * @param  string $method
276
+	 * @param  string $returnDocBlock
277
+	 * @return array
278
+	 */
279
+	protected function getResponseObject($modelName, $method, $returnDocBlock)
280
+	{
281
+		$relations = config('core.relations');
282
+		$relations = Arr::has($relations, $modelName) ? Arr::has($relations[$modelName], $method) ? $relations[$modelName] : false : false;
283
+		$modelName = call_user_func_array("\Core::{$returnDocBlock}", []) ? $returnDocBlock : $modelName;
284
+
285
+		return $relations ? [$modelName => $relations && $relations[$method] ? $relations[$method] : []] : false;
286
+	}
287 287
 }
Please login to merge, or discard this patch.
files/Kernel.php 1 patch
Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -11,39 +11,39 @@
 block discarded – undo
11 11
 
12 12
 class Kernel extends ConsoleKernel
13 13
 {
14
-    /**
15
-     * The Artisan commands provided by your application.
16
-     *
17
-     * @var array
18
-     */
19
-    protected $commands = [
20
-        GenerateDocCommand::class,
21
-        PassportInstallCommand::class,
22
-        MakeNotificationsCommand::class,
23
-        MakeModuleCommand::class
24
-    ];
14
+	/**
15
+	 * The Artisan commands provided by your application.
16
+	 *
17
+	 * @var array
18
+	 */
19
+	protected $commands = [
20
+		GenerateDocCommand::class,
21
+		PassportInstallCommand::class,
22
+		MakeNotificationsCommand::class,
23
+		MakeModuleCommand::class
24
+	];
25 25
 
26
-    /**
27
-     * Define the application's command schedule.
28
-     *
29
-     * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
30
-     * @return void
31
-     */
32
-    protected function schedule(Schedule $schedule)
33
-    {
34
-        // $schedule->command('inspire')
35
-        //          ->hourly();
36
-    }
26
+	/**
27
+	 * Define the application's command schedule.
28
+	 *
29
+	 * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
30
+	 * @return void
31
+	 */
32
+	protected function schedule(Schedule $schedule)
33
+	{
34
+		// $schedule->command('inspire')
35
+		//          ->hourly();
36
+	}
37 37
 
38
-    /**
39
-     * Register the commands for the application.
40
-     *
41
-     * @return void
42
-     */
43
-    protected function commands()
44
-    {
45
-        $this->load(__DIR__.'/Commands');
38
+	/**
39
+	 * Register the commands for the application.
40
+	 *
41
+	 * @return void
42
+	 */
43
+	protected function commands()
44
+	{
45
+		$this->load(__DIR__.'/Commands');
46 46
 
47
-        require base_path('routes/console.php');
48
-    }
47
+		require base_path('routes/console.php');
48
+	}
49 49
 }
Please login to merge, or discard this patch.
src/ApiSkeletonServiceProvider.php 1 patch
Indentation   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -6,45 +6,45 @@
 block discarded – undo
6 6
 
7 7
 class ApiSkeletonServiceProvider extends ServiceProvider
8 8
 {
9
-    /**
10
-     * Perform post-registration booting of services.
11
-     *
12
-     * @return void
13
-     */
14
-    public function boot()
15
-    {
16
-        $this->publishes([
17
-            __DIR__.'/Modules'                               => app_path('Modules'),
18
-            __DIR__.'/Modules/Core/Resources/Assets'         => base_path('public/doc/assets'),
19
-            __DIR__.'/../lang'                               => base_path('resources/lang'),
20
-            __DIR__.'/../files/Handler.php'                  => app_path('Exceptions/Handler.php'),
21
-            __DIR__.'/../files/AuthServiceProvider.php'      => app_path('Providers/AuthServiceProvider.php'),
22
-            __DIR__.'/../files/BroadcastServiceProvider.php' => app_path('Providers/BroadcastServiceProvider.php'),
23
-            __DIR__.'/../files/Kernel.php'                   => app_path('Console/Kernel.php'),
24
-            __DIR__.'/../files/HttpKernel.php'               => app_path('Http/Kernel.php'),
25
-            __DIR__.'/../files/channels.php'                 => base_path('routes/channels.php'),
26
-            __DIR__.'/../files/phpcs.xml'                    => base_path('/phpcs.xml'),
27
-            __DIR__.'/../files/docker'                       => base_path('/docker'),
28
-            __DIR__.'/../files/docker-compose.dev.yml'       => base_path('/docker-compose.dev.yml'),
29
-            __DIR__.'/../files/docker-compose.prod.yml'      => base_path('/docker-compose.prod.yml'),
30
-            __DIR__.'/../files/.dockerignore'                => base_path('/.dockerignore'),
31
-        ]);
9
+	/**
10
+	 * Perform post-registration booting of services.
11
+	 *
12
+	 * @return void
13
+	 */
14
+	public function boot()
15
+	{
16
+		$this->publishes([
17
+			__DIR__.'/Modules'                               => app_path('Modules'),
18
+			__DIR__.'/Modules/Core/Resources/Assets'         => base_path('public/doc/assets'),
19
+			__DIR__.'/../lang'                               => base_path('resources/lang'),
20
+			__DIR__.'/../files/Handler.php'                  => app_path('Exceptions/Handler.php'),
21
+			__DIR__.'/../files/AuthServiceProvider.php'      => app_path('Providers/AuthServiceProvider.php'),
22
+			__DIR__.'/../files/BroadcastServiceProvider.php' => app_path('Providers/BroadcastServiceProvider.php'),
23
+			__DIR__.'/../files/Kernel.php'                   => app_path('Console/Kernel.php'),
24
+			__DIR__.'/../files/HttpKernel.php'               => app_path('Http/Kernel.php'),
25
+			__DIR__.'/../files/channels.php'                 => base_path('routes/channels.php'),
26
+			__DIR__.'/../files/phpcs.xml'                    => base_path('/phpcs.xml'),
27
+			__DIR__.'/../files/docker'                       => base_path('/docker'),
28
+			__DIR__.'/../files/docker-compose.dev.yml'       => base_path('/docker-compose.dev.yml'),
29
+			__DIR__.'/../files/docker-compose.prod.yml'      => base_path('/docker-compose.prod.yml'),
30
+			__DIR__.'/../files/.dockerignore'                => base_path('/.dockerignore'),
31
+		]);
32 32
 
33
-        $this->publishes([
34
-            __DIR__.'/../files/auth.php'      => config_path('auth.php'),
35
-        ], 'config');
36
-    }
33
+		$this->publishes([
34
+			__DIR__.'/../files/auth.php'      => config_path('auth.php'),
35
+		], 'config');
36
+	}
37 37
 
38
-    /**
39
-     * Register any package services.
40
-     *
41
-     * @return void
42
-     */
43
-    public function register()
44
-    {
45
-        $this->mergeConfigFrom(
46
-            __DIR__.'/../config/skeleton.php',
47
-            'skeleton'
48
-        );
49
-    }
38
+	/**
39
+	 * Register any package services.
40
+	 *
41
+	 * @return void
42
+	 */
43
+	public function register()
44
+	{
45
+		$this->mergeConfigFrom(
46
+			__DIR__.'/../config/skeleton.php',
47
+			'skeleton'
48
+		);
49
+	}
50 50
 }
Please login to merge, or discard this patch.
src/Modules/Users/Providers/ModuleServiceProvider.php 2 patches
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -6,30 +6,30 @@
 block discarded – undo
6 6
 
7 7
 class ModuleServiceProvider extends ServiceProvider
8 8
 {
9
-    /**
10
-     * Bootstrap the module services.
11
-     *
12
-     * @return void
13
-     */
14
-    public function boot()
15
-    {
16
-        $this->loadTranslationsFrom(__DIR__.'/../Resources/Lang', 'users');
17
-        $this->loadViewsFrom(__DIR__.'/../Resources/Views', 'users');
9
+	/**
10
+	 * Bootstrap the module services.
11
+	 *
12
+	 * @return void
13
+	 */
14
+	public function boot()
15
+	{
16
+		$this->loadTranslationsFrom(__DIR__.'/../Resources/Lang', 'users');
17
+		$this->loadViewsFrom(__DIR__.'/../Resources/Views', 'users');
18 18
 
19
-        $this->loadMigrationsFrom(module_path('users', 'Database/Migrations', 'app'));
20
-        $this->loadFactoriesFrom(module_path('users', 'Database/Factories', 'app'));
21
-        if(!$this->app->configurationIsCached()) {
22
-            $this->loadConfigsFrom(module_path('users', 'Config', 'app'));
23
-        }
24
-    }
19
+		$this->loadMigrationsFrom(module_path('users', 'Database/Migrations', 'app'));
20
+		$this->loadFactoriesFrom(module_path('users', 'Database/Factories', 'app'));
21
+		if(!$this->app->configurationIsCached()) {
22
+			$this->loadConfigsFrom(module_path('users', 'Config', 'app'));
23
+		}
24
+	}
25 25
 
26
-    /**
27
-     * Register the module services.
28
-     *
29
-     * @return void
30
-     */
31
-    public function register()
32
-    {
33
-        $this->app->register(RouteServiceProvider::class);
34
-    }
26
+	/**
27
+	 * Register the module services.
28
+	 *
29
+	 * @return void
30
+	 */
31
+	public function register()
32
+	{
33
+		$this->app->register(RouteServiceProvider::class);
34
+	}
35 35
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
 
19 19
         $this->loadMigrationsFrom(module_path('users', 'Database/Migrations', 'app'));
20 20
         $this->loadFactoriesFrom(module_path('users', 'Database/Factories', 'app'));
21
-        if(!$this->app->configurationIsCached()) {
21
+        if ( ! $this->app->configurationIsCached()) {
22 22
             $this->loadConfigsFrom(module_path('users', 'Config', 'app'));
23 23
         }
24 24
     }
Please login to merge, or discard this patch.
src/Modules/Users/AclUser.php 1 patch
Indentation   +103 added lines, -103 removed lines patch added patch discarded remove patch
@@ -12,108 +12,108 @@
 block discarded – undo
12 12
 
13 13
 class AclUser extends User
14 14
 {
15
-    use SoftDeletes, HasApiTokens;
16
-    protected $table    = 'users';
17
-    protected $dates    = ['created_at', 'updated_at', 'deleted_at'];
18
-    protected $hidden   = ['password', 'remember_token', 'deleted_at'];
19
-    protected $guarded  = ['id'];
20
-    protected $fillable = ['profile_picture', 'name', 'email', 'password', 'locale', 'timezone'];
21
-
22
-    /**
23
-     * Encrypt the password attribute before
24
-     * saving it in the storage.
25
-     *
26
-     * @param string $value
27
-     */
28
-    public function setPasswordAttribute($value)
29
-    {
30
-        $this->attributes['password'] = \Hash::make($value);
31
-    }
32
-
33
-    /**
34
-     * Get the entity's notifications.
35
-     */
36
-    public function notifications()
37
-    {
38
-        return $this->morphMany(Notification::class, 'notifiable')->orderBy('created_at', 'desc');
39
-    }
40
-
41
-    /**
42
-     * Get the entity's read notifications.
43
-     */
44
-    public function readNotifications()
45
-    {
46
-        return $this->notifications()->whereNotNull('read_at');
47
-    }
48
-
49
-    /**
50
-     * Get the entity's unread notifications.
51
-     */
52
-    public function unreadNotifications()
53
-    {
54
-        return $this->notifications()->whereNull('read_at');
55
-    }
56
-
57
-    public function roles()
58
-    {
59
-        return $this->belongsToMany(Role::class, 'role_user', 'user_id', 'role_id')->whereNull('role_user.deleted_at')->withTimestamps();
60
-    }
61
-
62
-    public function oauthClients()
63
-    {
64
-        return $this->hasMany(OauthClient::class, 'user_id');
65
-    }
66
-
67
-    /**
68
-     * Return fcm device tokens that will be used in sending fcm notifications.
69
-     *
70
-     * @return array
71
-     */
72
-    public function routeNotificationForFCM()
73
-    {
74
-        $devices = \Core::pushNotificationDevices()->findBy(['user_id' => $this->id]);
75
-        $tokens  = [];
76
-
77
-        foreach ($devices as $device) {
78
-            if (\Core::oauthClients()->accessTokenExpiredOrRevoked($device->access_token)) {
79
-                $device->forceDelete();
80
-                continue;
81
-            }
82
-
83
-            $tokens[] = $device->device_token;
84
-        }
85
-
86
-        return $tokens;
87
-    }
88
-
89
-    /**
90
-     * The channels the user receives notification broadcasts on.
91
-     *
92
-     * @return string
93
-     */
94
-    public function receivesBroadcastNotificationsOn()
95
-    {
96
-        return 'users.'.$this->id;
97
-    }
98
-
99
-    /**
100
-     * Custom password validation.
101
-     *
102
-     * @param  string $password
103
-     * @return boolean
104
-     */
105
-    public function validateForPassportPasswordGrant($password)
106
-    {
107
-        if ($password == config('user.social_pass')) {
108
-            return true;
109
-        }
110
-
111
-        return \Hash::check($password, $this->password);
112
-    }
15
+	use SoftDeletes, HasApiTokens;
16
+	protected $table    = 'users';
17
+	protected $dates    = ['created_at', 'updated_at', 'deleted_at'];
18
+	protected $hidden   = ['password', 'remember_token', 'deleted_at'];
19
+	protected $guarded  = ['id'];
20
+	protected $fillable = ['profile_picture', 'name', 'email', 'password', 'locale', 'timezone'];
21
+
22
+	/**
23
+	 * Encrypt the password attribute before
24
+	 * saving it in the storage.
25
+	 *
26
+	 * @param string $value
27
+	 */
28
+	public function setPasswordAttribute($value)
29
+	{
30
+		$this->attributes['password'] = \Hash::make($value);
31
+	}
32
+
33
+	/**
34
+	 * Get the entity's notifications.
35
+	 */
36
+	public function notifications()
37
+	{
38
+		return $this->morphMany(Notification::class, 'notifiable')->orderBy('created_at', 'desc');
39
+	}
40
+
41
+	/**
42
+	 * Get the entity's read notifications.
43
+	 */
44
+	public function readNotifications()
45
+	{
46
+		return $this->notifications()->whereNotNull('read_at');
47
+	}
48
+
49
+	/**
50
+	 * Get the entity's unread notifications.
51
+	 */
52
+	public function unreadNotifications()
53
+	{
54
+		return $this->notifications()->whereNull('read_at');
55
+	}
56
+
57
+	public function roles()
58
+	{
59
+		return $this->belongsToMany(Role::class, 'role_user', 'user_id', 'role_id')->whereNull('role_user.deleted_at')->withTimestamps();
60
+	}
61
+
62
+	public function oauthClients()
63
+	{
64
+		return $this->hasMany(OauthClient::class, 'user_id');
65
+	}
66
+
67
+	/**
68
+	 * Return fcm device tokens that will be used in sending fcm notifications.
69
+	 *
70
+	 * @return array
71
+	 */
72
+	public function routeNotificationForFCM()
73
+	{
74
+		$devices = \Core::pushNotificationDevices()->findBy(['user_id' => $this->id]);
75
+		$tokens  = [];
76
+
77
+		foreach ($devices as $device) {
78
+			if (\Core::oauthClients()->accessTokenExpiredOrRevoked($device->access_token)) {
79
+				$device->forceDelete();
80
+				continue;
81
+			}
82
+
83
+			$tokens[] = $device->device_token;
84
+		}
85
+
86
+		return $tokens;
87
+	}
88
+
89
+	/**
90
+	 * The channels the user receives notification broadcasts on.
91
+	 *
92
+	 * @return string
93
+	 */
94
+	public function receivesBroadcastNotificationsOn()
95
+	{
96
+		return 'users.'.$this->id;
97
+	}
98
+
99
+	/**
100
+	 * Custom password validation.
101
+	 *
102
+	 * @param  string $password
103
+	 * @return boolean
104
+	 */
105
+	public function validateForPassportPasswordGrant($password)
106
+	{
107
+		if ($password == config('user.social_pass')) {
108
+			return true;
109
+		}
110
+
111
+		return \Hash::check($password, $this->password);
112
+	}
113 113
     
114
-    public static function boot()
115
-    {
116
-        parent::boot();
117
-        AclUser::observe(AclUserObserver::class);
118
-    }
114
+	public static function boot()
115
+	{
116
+		parent::boot();
117
+		AclUser::observe(AclUserObserver::class);
118
+	}
119 119
 }
Please login to merge, or discard this patch.
src/Modules/Users/Config/user.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 
3 3
 return [
4 4
 
5
-    /*
5
+	/*
6 6
     |--------------------------------------------------------------------------
7 7
     | Disable Confirm Email
8 8
     |--------------------------------------------------------------------------
@@ -11,9 +11,9 @@  discard block
 block discarded – undo
11 11
     |
12 12
     */
13 13
 
14
-    'disable_confirm_email' => env('DISABLE_CONFIRM_EMAIL', false),
14
+	'disable_confirm_email' => env('DISABLE_CONFIRM_EMAIL', false),
15 15
 
16
-    /*
16
+	/*
17 17
     |--------------------------------------------------------------------------
18 18
     | Confirm Email URL
19 19
     |--------------------------------------------------------------------------
@@ -22,9 +22,9 @@  discard block
 block discarded – undo
22 22
     |
23 23
     */
24 24
    
25
-    'confrim_email_url' => env('CONFIRM_EMAIL_URL'),
25
+	'confrim_email_url' => env('CONFIRM_EMAIL_URL'),
26 26
 
27
-    /*
27
+	/*
28 28
     |--------------------------------------------------------------------------
29 29
     | Reset Password URL
30 30
     |--------------------------------------------------------------------------
@@ -33,9 +33,9 @@  discard block
 block discarded – undo
33 33
     |
34 34
     */
35 35
    
36
-    'reset_password_url' => env('RESET_PASSWORD_URL'),
36
+	'reset_password_url' => env('RESET_PASSWORD_URL'),
37 37
 
38
-    /*
38
+	/*
39 39
     |--------------------------------------------------------------------------
40 40
     | Passport Client Id
41 41
     |--------------------------------------------------------------------------
@@ -44,9 +44,9 @@  discard block
 block discarded – undo
44 44
     |
45 45
     */
46 46
    
47
-    'passport_client_id' => env('PASSWORD_CLIENT_ID'),
47
+	'passport_client_id' => env('PASSWORD_CLIENT_ID'),
48 48
 
49
-    /*
49
+	/*
50 50
     |--------------------------------------------------------------------------
51 51
     | Passport Client Secret
52 52
     |--------------------------------------------------------------------------
@@ -55,9 +55,9 @@  discard block
 block discarded – undo
55 55
     |
56 56
     */
57 57
    
58
-    'passport_client_secret' => env('PASSWORD_CLIENT_SECRET'),
58
+	'passport_client_secret' => env('PASSWORD_CLIENT_SECRET'),
59 59
 
60
-    /*
60
+	/*
61 61
     |--------------------------------------------------------------------------
62 62
     | Token Expire In
63 63
     |--------------------------------------------------------------------------
@@ -66,9 +66,9 @@  discard block
 block discarded – undo
66 66
     |
67 67
     */
68 68
    
69
-    'token_expire_in' => env('TOKEN_EXPIRE_IN', 10),
69
+	'token_expire_in' => env('TOKEN_EXPIRE_IN', 10),
70 70
 
71
-    /*
71
+	/*
72 72
     |--------------------------------------------------------------------------
73 73
     | Refresh Token Expire In
74 74
     |--------------------------------------------------------------------------
@@ -77,9 +77,9 @@  discard block
 block discarded – undo
77 77
     |
78 78
     */
79 79
    
80
-    'refresh_token_expire_in' => env('REFRESH_TOKEN_EXPIRE_IN', 14400),
80
+	'refresh_token_expire_in' => env('REFRESH_TOKEN_EXPIRE_IN', 14400),
81 81
 
82
-    /*
82
+	/*
83 83
     |--------------------------------------------------------------------------
84 84
     | Social Pass
85 85
     |--------------------------------------------------------------------------
@@ -88,5 +88,5 @@  discard block
 block discarded – undo
88 88
     |
89 89
     */
90 90
 
91
-    'social_pass' => env('SOCIAL_PASS', false),
91
+	'social_pass' => env('SOCIAL_PASS', false),
92 92
 ];
Please login to merge, or discard this patch.
src/Modules/PushNotificationDevices/Providers/ModuleServiceProvider.php 2 patches
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -6,30 +6,30 @@
 block discarded – undo
6 6
 
7 7
 class ModuleServiceProvider extends ServiceProvider
8 8
 {
9
-    /**
10
-     * Bootstrap the module services.
11
-     *
12
-     * @return void
13
-     */
14
-    public function boot()
15
-    {
16
-        $this->loadTranslationsFrom(__DIR__.'/../Resources/Lang', 'push-notification-devices');
17
-        $this->loadViewsFrom(__DIR__.'/../Resources/Views', 'push-notification-devices');
9
+	/**
10
+	 * Bootstrap the module services.
11
+	 *
12
+	 * @return void
13
+	 */
14
+	public function boot()
15
+	{
16
+		$this->loadTranslationsFrom(__DIR__.'/../Resources/Lang', 'push-notification-devices');
17
+		$this->loadViewsFrom(__DIR__.'/../Resources/Views', 'push-notification-devices');
18 18
 
19
-        $this->loadMigrationsFrom(module_path('push-notification-devices', 'Database/Migrations', 'app'));
20
-        $this->loadFactoriesFrom(module_path('push-notification-devices', 'Database/Factories', 'app'));
21
-        if(!$this->app->configurationIsCached()) {
22
-            $this->loadConfigsFrom(module_path('push-notification-devices', 'Config', 'app'));
23
-        }
24
-    }
19
+		$this->loadMigrationsFrom(module_path('push-notification-devices', 'Database/Migrations', 'app'));
20
+		$this->loadFactoriesFrom(module_path('push-notification-devices', 'Database/Factories', 'app'));
21
+		if(!$this->app->configurationIsCached()) {
22
+			$this->loadConfigsFrom(module_path('push-notification-devices', 'Config', 'app'));
23
+		}
24
+	}
25 25
 
26
-    /**
27
-     * Register the module services.
28
-     *
29
-     * @return void
30
-     */
31
-    public function register()
32
-    {
33
-        $this->app->register(RouteServiceProvider::class);
34
-    }
26
+	/**
27
+	 * Register the module services.
28
+	 *
29
+	 * @return void
30
+	 */
31
+	public function register()
32
+	{
33
+		$this->app->register(RouteServiceProvider::class);
34
+	}
35 35
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
 
19 19
         $this->loadMigrationsFrom(module_path('push-notification-devices', 'Database/Migrations', 'app'));
20 20
         $this->loadFactoriesFrom(module_path('push-notification-devices', 'Database/Factories', 'app'));
21
-        if(!$this->app->configurationIsCached()) {
21
+        if ( ! $this->app->configurationIsCached()) {
22 22
             $this->loadConfigsFrom(module_path('push-notification-devices', 'Config', 'app'));
23 23
         }
24 24
     }
Please login to merge, or discard this patch.
src/Modules/Permissions/Providers/ModuleServiceProvider.php 2 patches
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -6,30 +6,30 @@
 block discarded – undo
6 6
 
7 7
 class ModuleServiceProvider extends ServiceProvider
8 8
 {
9
-    /**
10
-     * Bootstrap the module services.
11
-     *
12
-     * @return void
13
-     */
14
-    public function boot()
15
-    {
16
-        $this->loadTranslationsFrom(__DIR__.'/../Resources/Lang', 'permissions');
17
-        $this->loadViewsFrom(__DIR__.'/../Resources/Views', 'permissions');
9
+	/**
10
+	 * Bootstrap the module services.
11
+	 *
12
+	 * @return void
13
+	 */
14
+	public function boot()
15
+	{
16
+		$this->loadTranslationsFrom(__DIR__.'/../Resources/Lang', 'permissions');
17
+		$this->loadViewsFrom(__DIR__.'/../Resources/Views', 'permissions');
18 18
 
19
-        $this->loadMigrationsFrom(module_path('permissions', 'Database/Migrations', 'app'));
20
-        $this->loadFactoriesFrom(module_path('permissions', 'Database/Factories', 'app'));
21
-        if(!$this->app->configurationIsCached()) {
22
-            $this->loadConfigsFrom(module_path('permissions', 'Config', 'app'));
23
-        }
24
-    }
19
+		$this->loadMigrationsFrom(module_path('permissions', 'Database/Migrations', 'app'));
20
+		$this->loadFactoriesFrom(module_path('permissions', 'Database/Factories', 'app'));
21
+		if(!$this->app->configurationIsCached()) {
22
+			$this->loadConfigsFrom(module_path('permissions', 'Config', 'app'));
23
+		}
24
+	}
25 25
 
26
-    /**
27
-     * Register the module services.
28
-     *
29
-     * @return void
30
-     */
31
-    public function register()
32
-    {
33
-        $this->app->register(RouteServiceProvider::class);
34
-    }
26
+	/**
27
+	 * Register the module services.
28
+	 *
29
+	 * @return void
30
+	 */
31
+	public function register()
32
+	{
33
+		$this->app->register(RouteServiceProvider::class);
34
+	}
35 35
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
 
19 19
         $this->loadMigrationsFrom(module_path('permissions', 'Database/Migrations', 'app'));
20 20
         $this->loadFactoriesFrom(module_path('permissions', 'Database/Factories', 'app'));
21
-        if(!$this->app->configurationIsCached()) {
21
+        if ( ! $this->app->configurationIsCached()) {
22 22
             $this->loadConfigsFrom(module_path('permissions', 'Config', 'app'));
23 23
         }
24 24
     }
Please login to merge, or discard this patch.