@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | } |
| 43 | 43 | $randomIndex = random_int(0, count($array) - 1); |
| 44 | 44 | |
| 45 | - return $array[$randomIndex]; |
|
| 45 | + return $array[ $randomIndex ]; |
|
| 46 | 46 | } |
| 47 | 47 | } |
| 48 | 48 | if (!function_exists('create_multiple_from_factory')) { |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | |
| 92 | 92 | $traits = array_flip(class_uses_recursive($class)); |
| 93 | 93 | |
| 94 | - return isset($traits[$trait]); |
|
| 94 | + return isset($traits[ $trait ]); |
|
| 95 | 95 | } |
| 96 | 96 | } |
| 97 | 97 | if (!function_exists('array_keys_exists')) { |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | if (!function_exists('is_associative_array')) { |
| 136 | 136 | function is_associative_array(array $arr) |
| 137 | 137 | { |
| 138 | - if ([] === $arr) { |
|
| 138 | + if ([ ] === $arr) { |
|
| 139 | 139 | return false; |
| 140 | 140 | } |
| 141 | 141 | |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | public function boot() |
| 16 | 16 | { |
| 17 | 17 | Broadcast::routes([ |
| 18 | - 'middleware' => ['api'], |
|
| 18 | + 'middleware' => [ 'api' ], |
|
| 19 | 19 | 'domain' => env('API_URL'), |
| 20 | 20 | ]); |
| 21 | 21 | |
@@ -111,7 +111,7 @@ |
||
| 111 | 111 | $profile = $this->transformer->transformProfile($this->profile); |
| 112 | 112 | |
| 113 | 113 | if ($this->profileHasChanged()) { |
| 114 | - $profile['provider'] = $this->identityProvider; |
|
| 114 | + $profile[ 'provider' ] = $this->identityProvider; |
|
| 115 | 115 | $this->user->fill($profile); |
| 116 | 116 | $this->user->save(); |
| 117 | 117 | } |
@@ -2,7 +2,7 @@ |
||
| 2 | 2 | |
| 3 | 3 | use Faker\Generator as Faker; |
| 4 | 4 | |
| 5 | -$factory->define(Modules\Machine\Entities\Machine::class, function (Faker $faker) { |
|
| 5 | +$factory->define(Modules\Machine\Entities\Machine::class, function(Faker $faker) { |
|
| 6 | 6 | $os = [ |
| 7 | 7 | 'MAC', |
| 8 | 8 | 'WINDOWS', |
@@ -13,9 +13,9 @@ |
||
| 13 | 13 | |
| 14 | 14 | use Modules\Authorization\Entities\Permission; |
| 15 | 15 | |
| 16 | -Route::get('/{id}', 'MachineController@show')->middleware(['permission:'.Permission::SHOW_MACHINE]); |
|
| 17 | -Route::patch('/{id}', 'MachineController@update')->middleware(['permission:'.Permission::UPDATE_MACHINE]); |
|
| 18 | -Route::delete('/{id}', 'MachineController@destroy')->middleware(['permission:'.Permission::DELETE_MACHINE]); |
|
| 16 | +Route::get('/{id}', 'MachineController@show')->middleware([ 'permission:'.Permission::SHOW_MACHINE ]); |
|
| 17 | +Route::patch('/{id}', 'MachineController@update')->middleware([ 'permission:'.Permission::UPDATE_MACHINE ]); |
|
| 18 | +Route::delete('/{id}', 'MachineController@destroy')->middleware([ 'permission:'.Permission::DELETE_MACHINE ]); |
|
| 19 | 19 | |
| 20 | -Route::post('/', 'MachineController@store')->middleware(['permission:'.Permission::CREATE_MACHINE]); |
|
| 21 | -Route::get('/', 'MachineController@index')->middleware(['permission:'.Permission::SHOW_MACHINE]); |
|
| 20 | +Route::post('/', 'MachineController@store')->middleware([ 'permission:'.Permission::CREATE_MACHINE ]); |
|
| 21 | +Route::get('/', 'MachineController@index')->middleware([ 'permission:'.Permission::SHOW_MACHINE ]); |
|
@@ -14,5 +14,5 @@ |
||
| 14 | 14 | use Modules\Authorization\Entities\Permission; |
| 15 | 15 | |
| 16 | 16 | Route::get('/me', 'UserController@show'); |
| 17 | -Route::patch('/{id}', 'UserController@update')->middleware(['permission:'.Permission::ASSIGN_ROLES]); |
|
| 18 | -Route::get('/', 'UserController@index')->middleware(['permission:'.Permission::INDEX_USERS]); |
|
| 17 | +Route::patch('/{id}', 'UserController@update')->middleware([ 'permission:'.Permission::ASSIGN_ROLES ]); |
|
| 18 | +Route::get('/', 'UserController@index')->middleware([ 'permission:'.Permission::INDEX_USERS ]); |
|
@@ -2,14 +2,14 @@ |
||
| 2 | 2 | |
| 3 | 3 | use Modules\User\Entities\User; |
| 4 | 4 | |
| 5 | -$factory->define(User::class, function (Faker\Generator $faker) { |
|
| 5 | +$factory->define(User::class, function(Faker\Generator $faker) { |
|
| 6 | 6 | return [ |
| 7 | 7 | 'identity_id' => (new \MongoDB\BSON\ObjectId())->__toString(), |
| 8 | 8 | 'name' => $faker->name, |
| 9 | 9 | 'username' => $faker->userName, |
| 10 | 10 | 'email' => $faker->unique()->safeEmail, |
| 11 | 11 | 'email_verified' => $faker->boolean, |
| 12 | - 'gender' => get_random_array_element(['male', 'female', 'unknown']), |
|
| 12 | + 'gender' => get_random_array_element([ 'male', 'female', 'unknown' ]), |
|
| 13 | 13 | 'avatar' => 'https://i1.wp.com/cdn.auth0.com/avatars/ad.png', |
| 14 | 14 | 'provider' => 'database', |
| 15 | 15 | ]; |
@@ -179,6 +179,6 @@ |
||
| 179 | 179 | public function testGetClassConstants() |
| 180 | 180 | { |
| 181 | 181 | $this->assertArrayHasKey('TEST_CONSTANT', get_class_constants(static::class)); |
| 182 | - $this->assertEquals(self::TEST_CONSTANT, get_class_constants(static::class)['TEST_CONSTANT']); |
|
| 182 | + $this->assertEquals(self::TEST_CONSTANT, get_class_constants(static::class)[ 'TEST_CONSTANT' ]); |
|
| 183 | 183 | } |
| 184 | 184 | } |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | */ |
| 26 | 26 | public function register() |
| 27 | 27 | { |
| 28 | - $this->app->bind(NotificationServiceContract::class, function () { |
|
| 28 | + $this->app->bind(NotificationServiceContract::class, function() { |
|
| 29 | 29 | return new NotificationService(new UserService()); |
| 30 | 30 | }); |
| 31 | 31 | } |