@@ -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 | 'id' => $faker->randomDigitNotNull(), |
6 | 6 | 'name' => $faker->randomElement(['Company Name', 'Title', 'Header Image']), |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -$factory->define(App\Modules\V1\Core\Log::class, function (Faker\Generator $faker) { |
|
3 | +$factory->define(App\Modules\V1\Core\Log::class, function(Faker\Generator $faker) { |
|
4 | 4 | return [ |
5 | 5 | 'id' => $faker->randomDigitNotNull(), |
6 | 6 | 'action' => $faker->randomElement(['create', 'delete', 'update']), |
@@ -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 | - preg_match('/api\/v1\/' . $module[1] . '\/([^#]+)\//iU', $route['uri'], $model); |
|
65 | + preg_match('/api\/v1\/'.$module[1].'\/([^#]+)\//iU', $route['uri'], $model); |
|
66 | 66 | $docData['modules'][$module[1]][$model[1]][] = $route; |
67 | 67 | |
68 | 68 | $this->getModels($classProperties['model'], $docData); |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | */ |
81 | 81 | protected function getRoutes() |
82 | 82 | { |
83 | - return collect(\Route::getRoutes())->map(function ($route) { |
|
83 | + return collect(\Route::getRoutes())->map(function($route) { |
|
84 | 84 | if (strpos($route->uri(), 'api/v') !== false) |
85 | 85 | { |
86 | 86 | 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 | } |
@@ -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 | 'id' => $faker->randomDigitNotNull(), |
6 | 6 | 'report_name' => $faker->randomElement(['Users Count', 'Low Stock Products', 'Active Users']), |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -$factory->define(App\Modules\V1\Notifications\Notification::class, function (Faker\Generator $faker) { |
|
3 | +$factory->define(App\Modules\V1\Notifications\Notification::class, function(Faker\Generator $faker) { |
|
4 | 4 | return [ |
5 | 5 | 'id' => $faker->randomDigitNotNull(), |
6 | 6 | 'key' => $faker->randomElement(['low_stock', 'order_added', 'new_request']), |
@@ -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 | 'id' => $faker->randomDigitNotNull(), |
6 | 6 | 'device_token' => $faker->sha1(), |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -$factory->define(App\Modules\V1\Acl\AclUser::class, function (Faker\Generator $faker) { |
|
3 | +$factory->define(App\Modules\V1\Acl\AclUser::class, function(Faker\Generator $faker) { |
|
4 | 4 | return [ |
5 | 5 | 'id' => $faker->randomDigitNotNull(), |
6 | 6 | 'name' => $faker->name(), |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -$factory->define(App\Modules\V1\Acl\AclGroup::class, function (Faker\Generator $faker) { |
|
3 | +$factory->define(App\Modules\V1\Acl\AclGroup::class, function(Faker\Generator $faker) { |
|
4 | 4 | return [ |
5 | 5 | 'id' => $faker->randomDigitNotNull(), |
6 | 6 | 'name' => $faker->randomElement(['Admin', 'Editor', 'Publisher']), |
@@ -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 | 'id' => $faker->randomDigitNotNull(), |
6 | 6 | 'name' => $faker->randomElement(['save', 'delete', 'find', 'paginate']), |