@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -$factory->define(App\Modules\V1\Acl\AclPermission::class, function (Faker\Generator $faker) { |
|
3 | +$factory->define(App\Modules\V1\Acl\AclPermission::class, function(Faker\Generator $faker) { |
|
4 | 4 | return [ |
5 | 5 | 'name' => $faker->randomElement(['save', 'delete', 'find', 'paginate']), |
6 | 6 | 'model' => $faker->randomElement(['users', 'groups', 'settings', 'notifications']), |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -$factory->define(App\Modules\V1\Reporting\Report::class, function (Faker\Generator $faker) { |
|
3 | +$factory->define(App\Modules\V1\Reporting\Report::class, function(Faker\Generator $faker) { |
|
4 | 4 | return [ |
5 | 5 | 'report_name' => $faker->randomElement(['Users Count', 'Low Stock Products', 'Active Users']), |
6 | 6 | 'view_name' => $faker->word(), |
@@ -64,7 +64,7 @@ |
||
64 | 64 | if ($this->cacheConfig && $this->cacheConfig == 'cache') |
65 | 65 | { |
66 | 66 | $page = \Request::get('page') !== null ? \Request::get('page') : '1'; |
67 | - $cacheKey = $name . $page . \Session::get('locale') . serialize($arguments); |
|
67 | + $cacheKey = $name.$page.\Session::get('locale').serialize($arguments); |
|
68 | 68 | return $this->cache->tags([$this->cacheTag])->rememberForever($cacheKey, function() use ($arguments, $name) { |
69 | 69 | return call_user_func_array([$this->repo, $name], $arguments); |
70 | 70 | }); |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -$factory->define(App\Modules\V1\Core\Settings::class, function (Faker\Generator $faker) { |
|
3 | +$factory->define(App\Modules\V1\Core\Settings::class, function(Faker\Generator $faker) { |
|
4 | 4 | return [ |
5 | 5 | 'name' => $faker->randomElement(['Company Name', 'Title', 'Header Image']), |
6 | 6 | 'value' => $faker->word(), |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -$factory->define(App\Modules\V1\Notifications\PushNotificationDevice::class, function (Faker\Generator $faker) { |
|
3 | +$factory->define(App\Modules\V1\Notifications\PushNotificationDevice::class, function(Faker\Generator $faker) { |
|
4 | 4 | return [ |
5 | 5 | 'device_token' => $faker->sha1(), |
6 | 6 | 'user_id' => $faker->randomDigitNotNull(), |
@@ -12,7 +12,7 @@ |
||
12 | 12 | */ |
13 | 13 | public function up() |
14 | 14 | { |
15 | - Schema::create('push_notifications_devices', function (Blueprint $table) { |
|
15 | + Schema::create('push_notifications_devices', function(Blueprint $table) { |
|
16 | 16 | $table->increments('id'); |
17 | 17 | $table->string('device_token'); |
18 | 18 | $table->integer('user_id'); |
@@ -13,7 +13,7 @@ |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::create('jobs', function (Blueprint $table) { |
|
16 | + Schema::create('jobs', function(Blueprint $table) { |
|
17 | 17 | $table->bigIncrements('id'); |
18 | 18 | $table->string('queue'); |
19 | 19 | $table->longText('payload'); |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | $this->getPostData($route, $reflectionMethod, $validationRules); |
63 | 63 | |
64 | 64 | preg_match('/api\/v1\/([^#]+)\//iU', $route['uri'], $module); |
65 | - $docData['modules'][$module[1]][substr($route['prefix'], strlen('/api/v1/' . $module[1] . '/') - 1)][] = $route; |
|
65 | + $docData['modules'][$module[1]][substr($route['prefix'], strlen('/api/v1/'.$module[1].'/') - 1)][] = $route; |
|
66 | 66 | |
67 | 67 | $this->getModels($classProperties['model'], $docData); |
68 | 68 | } |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | */ |
80 | 80 | protected function getRoutes() |
81 | 81 | { |
82 | - return collect(\Route::getRoutes())->map(function ($route) { |
|
82 | + return collect(\Route::getRoutes())->map(function($route) { |
|
83 | 83 | if (strpos($route->uri(), 'api/v') !== false) |
84 | 84 | { |
85 | 85 | return [ |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | ]; |
113 | 113 | |
114 | 114 | |
115 | - if (! $skipLoginCheck || ! in_array($method, $skipLoginCheck)) |
|
115 | + if ( ! $skipLoginCheck || ! in_array($method, $skipLoginCheck)) |
|
116 | 116 | { |
117 | 117 | $route['headers']['Authrization'] = 'bearer {token}'; |
118 | 118 | } |
@@ -165,16 +165,16 @@ discard block |
||
165 | 165 | } |
166 | 166 | else |
167 | 167 | { |
168 | - $route['body'] = eval('return ' . $match[1] . ';'); |
|
168 | + $route['body'] = eval('return '.$match[1].';'); |
|
169 | 169 | } |
170 | 170 | |
171 | 171 | foreach ($route['body'] as &$rule) |
172 | 172 | { |
173 | - if(strpos($rule, 'unique')) |
|
173 | + if (strpos($rule, 'unique')) |
|
174 | 174 | { |
175 | 175 | $rule = substr($rule, 0, strpos($rule, 'unique') + 6); |
176 | 176 | } |
177 | - elseif(strpos($rule, 'exists')) |
|
177 | + elseif (strpos($rule, 'exists')) |
|
178 | 178 | { |
179 | 179 | $rule = substr($rule, 0, strpos($rule, 'exists') - 1); |
180 | 180 | } |
@@ -247,10 +247,10 @@ discard block |
||
247 | 247 | $model = factory($modelClass)->make(); |
248 | 248 | $modelArr = $model->toArray(); |
249 | 249 | |
250 | - if ( $model->trans && ! $model->trans->count()) |
|
250 | + if ($model->trans && ! $model->trans->count()) |
|
251 | 251 | { |
252 | 252 | $modelArr['trans'] = [ |
253 | - 'en' => factory($modelClass . 'Translation')->make()->toArray() |
|
253 | + 'en' => factory($modelClass.'Translation')->make()->toArray() |
|
254 | 254 | ]; |
255 | 255 | } |
256 | 256 |
@@ -13,14 +13,14 @@ |
||
13 | 13 | * to preform actions like (add, edit ... etc). |
14 | 14 | * @var string |
15 | 15 | */ |
16 | - protected $model = 'oauthClients'; |
|
16 | + protected $model = 'oauthClients'; |
|
17 | 17 | |
18 | 18 | /** |
19 | 19 | * The validations rules used by the base api controller |
20 | 20 | * to check before add. |
21 | 21 | * @var array |
22 | 22 | */ |
23 | - protected $validationRules = [ |
|
23 | + protected $validationRules = [ |
|
24 | 24 | 'name' => 'required|max:255', |
25 | 25 | 'redirect' => 'required|url', |
26 | 26 | 'user_id' => 'required|array|exists:users,id' |