@@ -13,7 +13,7 @@ |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::create('control_tag_categories', function (Blueprint $table) { |
|
16 | + Schema::create('control_tag_categories', function(Blueprint $table) { |
|
17 | 17 | $table->bigIncrements('id'); |
18 | 18 | $table->string('name'); |
19 | 19 | $table->text('description'); |
@@ -13,7 +13,7 @@ |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::create('control_data_group', function (Blueprint $table) { |
|
16 | + Schema::create('control_data_group', function(Blueprint $table) { |
|
17 | 17 | $table->bigIncrements('id'); |
18 | 18 | $table->string('name')->nullable(); |
19 | 19 | $table->string('email')->nullable(); |
@@ -13,7 +13,7 @@ |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::create('control_data_position', function (Blueprint $table) { |
|
16 | + Schema::create('control_data_position', function(Blueprint $table) { |
|
17 | 17 | $table->bigIncrements('id'); |
18 | 18 | $table->string('name')->nullable(); |
19 | 19 | $table->text('description')->nullable(); |
@@ -13,7 +13,7 @@ |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::create('control_role_user', function (Blueprint $table) { |
|
16 | + Schema::create('control_role_user', function(Blueprint $table) { |
|
17 | 17 | $table->bigIncrements('id'); |
18 | 18 | $table->unsignedInteger('user_id'); |
19 | 19 | $table->unsignedInteger('role_id'); |
@@ -56,8 +56,8 @@ discard block |
||
56 | 56 | } |
57 | 57 | |
58 | 58 | // Tag groups |
59 | - factory(GroupTagCategory::class, 15)->create()->each(function (GroupTagCategory $groupTagCategory) { |
|
60 | - factory(GroupTag::class, 15)->create(['tag_category_id' => $groupTagCategory->id()])->each(function (GroupTag $groupTag) { |
|
59 | + factory(GroupTagCategory::class, 15)->create()->each(function(GroupTagCategory $groupTagCategory) { |
|
60 | + factory(GroupTag::class, 15)->create(['tag_category_id' => $groupTagCategory->id()])->each(function(GroupTag $groupTag) { |
|
61 | 61 | foreach (Group::all()->random(10) as $group) { |
62 | 62 | app(GroupGroupTag::class)->addTagToGroup($groupTag, $group); |
63 | 63 | } |
@@ -65,8 +65,8 @@ discard block |
||
65 | 65 | }); |
66 | 66 | |
67 | 67 | // Tag users |
68 | - factory(UserTagCategory::class, 15)->create()->each(function (UserTagCategory $userTagCategory) { |
|
69 | - factory(UserTag::class, 15)->create(['tag_category_id' => $userTagCategory->id()])->each(function (UserTag $userTag) { |
|
68 | + factory(UserTagCategory::class, 15)->create()->each(function(UserTagCategory $userTagCategory) { |
|
69 | + factory(UserTag::class, 15)->create(['tag_category_id' => $userTagCategory->id()])->each(function(UserTag $userTag) { |
|
70 | 70 | foreach (User::all()->random(10) as $user) { |
71 | 71 | app(UserUserTag::class)->addTagToUser($userTag, $user); |
72 | 72 | } |
@@ -74,8 +74,8 @@ discard block |
||
74 | 74 | }); |
75 | 75 | |
76 | 76 | // Tag roles |
77 | - factory(RoleTagCategory::class, 15)->create()->each(function (RoleTagCategory $roleTagCategory) { |
|
78 | - factory(RoleTag::class, 15)->create(['tag_category_id' => $roleTagCategory->id()])->each(function (RoleTag $roleTag) { |
|
77 | + factory(RoleTagCategory::class, 15)->create()->each(function(RoleTagCategory $roleTagCategory) { |
|
78 | + factory(RoleTag::class, 15)->create(['tag_category_id' => $roleTagCategory->id()])->each(function(RoleTag $roleTag) { |
|
79 | 79 | foreach (Role::all()->random(10) as $role) { |
80 | 80 | app(RoleRoleTag::class)->addTagToRole($roleTag, $role); |
81 | 81 | } |
@@ -83,8 +83,8 @@ discard block |
||
83 | 83 | }); |
84 | 84 | |
85 | 85 | // Tag positions |
86 | - factory(PositionTagCategory::class, 15)->create()->each(function (PositionTagCategory $positionTagCategory) { |
|
87 | - factory(PositionTag::class, 15)->create(['tag_category_id' => $positionTagCategory->id()])->each(function (PositionTag $positionTag) { |
|
86 | + factory(PositionTagCategory::class, 15)->create()->each(function(PositionTagCategory $positionTagCategory) { |
|
87 | + factory(PositionTag::class, 15)->create(['tag_category_id' => $positionTagCategory->id()])->each(function(PositionTag $positionTag) { |
|
88 | 88 | foreach (Position::all()->random(10) as $position) { |
89 | 89 | app(PositionPositionTag::class)->addTagToPosition($positionTag, $position); |
90 | 90 | } |
@@ -31,7 +31,7 @@ |
||
31 | 31 | */ |
32 | 32 | public function fullReference(): string |
33 | 33 | { |
34 | - return $this->category()->reference() . '.' . $this->reference(); |
|
34 | + return $this->category()->reference().'.'.$this->reference(); |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | /** |
@@ -31,7 +31,7 @@ |
||
31 | 31 | */ |
32 | 32 | public function fullReference(): string |
33 | 33 | { |
34 | - return $this->category()->reference() . '.' . $this->reference(); |
|
34 | + return $this->category()->reference().'.'.$this->reference(); |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | /** |
@@ -31,7 +31,7 @@ |
||
31 | 31 | */ |
32 | 32 | public function fullReference(): string |
33 | 33 | { |
34 | - return $this->category()->reference() . '.' . $this->reference(); |
|
34 | + return $this->category()->reference().'.'.$this->reference(); |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | /** |
@@ -126,10 +126,10 @@ discard block |
||
126 | 126 | */ |
127 | 127 | public function getAdditionalAttributesAttribute() |
128 | 128 | { |
129 | - if(!array_key_exists($this->getColumnName(), $this->attributes)) { |
|
129 | + if (!array_key_exists($this->getColumnName(), $this->attributes)) { |
|
130 | 130 | return []; |
131 | 131 | } |
132 | - if(is_string($this->attributes[$this->getColumnName()])) { |
|
132 | + if (is_string($this->attributes[$this->getColumnName()])) { |
|
133 | 133 | return (json_decode($this->attributes[$this->getColumnName()], true) ?? []); |
134 | 134 | } |
135 | 135 | return $this->attributes[$this->getColumnName()]; |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | $additionalAccessors = array_map(function($propertyKey) { |
162 | 162 | return 'get'.Str::studly($propertyKey).'Attribute'; |
163 | 163 | }, static::getAdditionalAttributes()); |
164 | - if(in_array($method, $additionalAccessors)) { |
|
164 | + if (in_array($method, $additionalAccessors)) { |
|
165 | 165 | return $this->getAdditionalAttribute( |
166 | 166 | Str::snake(Str::substr(Str::substr($method, 3), 0, -9)) |
167 | 167 | ); |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | $additionalAccessors = array_map(function($propertyKey) { |
172 | 172 | return 'set'.Str::studly($propertyKey).'Attribute'; |
173 | 173 | }, static::getAdditionalAttributes()); |
174 | - if(in_array($method, $additionalAccessors)) { |
|
174 | + if (in_array($method, $additionalAccessors)) { |
|
175 | 175 | $this->setAdditionalAttribute( |
176 | 176 | Str::snake(Str::substr(Str::substr($method, 3), 0, -9)), $args[0] |
177 | 177 | ); |