@@ -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', |
@@ -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 | } |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | public function up() |
| 15 | 15 | { |
| 16 | - Schema::create('notifications', function (Blueprint $table) { |
|
| 16 | + Schema::create('notifications', function(Blueprint $table) { |
|
| 17 | 17 | $table->uuid('id')->primary(); |
| 18 | 18 | $table->string('type'); |
| 19 | 19 | $table->morphs('notifiable'); |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | |
| 50 | 50 | public function getUserByUserInfo($userInfo) |
| 51 | 51 | { |
| 52 | - return $this->upsertUser($userInfo['profile']); |
|
| 52 | + return $this->upsertUser($userInfo[ 'profile' ]); |
|
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | protected function upsertUser($profile) |
@@ -58,8 +58,8 @@ discard block |
||
| 58 | 58 | throw new BadRequestHttpException('Missing token information: Auth0 user id is not set'); |
| 59 | 59 | } |
| 60 | 60 | $identifier = explode('|', $profile->user_id); |
| 61 | - $identityProvider = $identifier[0]; |
|
| 62 | - $id = $identifier[1]; |
|
| 61 | + $identityProvider = $identifier[ 0 ]; |
|
| 62 | + $id = $identifier[ 1 ]; |
|
| 63 | 63 | |
| 64 | 64 | $user = $this->service->findByIdentityId($id); |
| 65 | 65 | if ($user === null) { |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | |
| 96 | 96 | public function getTestUserToken() |
| 97 | 97 | { |
| 98 | - return Cache::remember('testing:http_access_token', 60, function () { |
|
| 98 | + return Cache::remember('testing:http_access_token', 60, function() { |
|
| 99 | 99 | try { |
| 100 | 100 | $httpClient = new Client(); |
| 101 | 101 | $response = $httpClient->post(env('AUTH0_DOMAIN').'oauth/token', [ |