@@ -34,7 +34,7 @@ |
||
| 34 | 34 | */ |
| 35 | 35 | public function show(Position $position) |
| 36 | 36 | { |
| 37 | - return $position; |
|
| 37 | + return $position; |
|
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | /** |
@@ -68,10 +68,10 @@ |
||
| 68 | 68 | { |
| 69 | 69 | $dataPosition = $position->data(); |
| 70 | 70 | |
| 71 | - if($request->input('name') !== null) { |
|
| 71 | + if ($request->input('name') !== null) { |
|
| 72 | 72 | $dataPosition->setName($request->input('name')); |
| 73 | 73 | } |
| 74 | - if($request->input('description') !== null) { |
|
| 74 | + if ($request->input('description') !== null) { |
|
| 75 | 75 | $dataPosition->setDescription($request->input('description')); |
| 76 | 76 | } |
| 77 | 77 | |
@@ -59,13 +59,13 @@ |
||
| 59 | 59 | */ |
| 60 | 60 | public function update(GroupTagCategory $groupTagCategory, GroupTagCategoryUpdateRequest $request) |
| 61 | 61 | { |
| 62 | - if($request->input('name') !== null) { |
|
| 62 | + if ($request->input('name') !== null) { |
|
| 63 | 63 | $groupTagCategory->setName($request->input('name')); |
| 64 | 64 | } |
| 65 | - if($request->input('description') !== null) { |
|
| 65 | + if ($request->input('description') !== null) { |
|
| 66 | 66 | $groupTagCategory->setDescription($request->input('description')); |
| 67 | 67 | } |
| 68 | - if($request->input('reference') !== null) { |
|
| 68 | + if ($request->input('reference') !== null) { |
|
| 69 | 69 | $groupTagCategory->setReference($request->input('reference')); |
| 70 | 70 | } |
| 71 | 71 | |
@@ -62,16 +62,16 @@ |
||
| 62 | 62 | */ |
| 63 | 63 | public function update(PositionTag $positionTag, PositionTagUpdateRequest $request) |
| 64 | 64 | { |
| 65 | - if($request->input('name') !== null) { |
|
| 65 | + if ($request->input('name') !== null) { |
|
| 66 | 66 | $positionTag->setName($request->input('name')); |
| 67 | 67 | } |
| 68 | - if($request->input('description') !== null) { |
|
| 68 | + if ($request->input('description') !== null) { |
|
| 69 | 69 | $positionTag->setDescription($request->input('description')); |
| 70 | 70 | } |
| 71 | - if($request->input('reference') !== null) { |
|
| 71 | + if ($request->input('reference') !== null) { |
|
| 72 | 72 | $positionTag->setReference($request->input('reference')); |
| 73 | 73 | } |
| 74 | - if($request->input('tag_category_id') !== null) { |
|
| 74 | + if ($request->input('tag_category_id') !== null) { |
|
| 75 | 75 | $positionTag->setTagCategoryId($request->input('tag_category_id')); |
| 76 | 76 | } |
| 77 | 77 | |
@@ -112,10 +112,10 @@ discard block |
||
| 112 | 112 | */ |
| 113 | 113 | public function getAdditionalAttributesAttribute() |
| 114 | 114 | { |
| 115 | - if(!array_key_exists($this->getColumnName(), $this->attributes)) { |
|
| 115 | + if (!array_key_exists($this->getColumnName(), $this->attributes)) { |
|
| 116 | 116 | return []; |
| 117 | 117 | } |
| 118 | - if(is_string($this->attributes[$this->getColumnName()])) { |
|
| 118 | + if (is_string($this->attributes[$this->getColumnName()])) { |
|
| 119 | 119 | return (json_decode($this->attributes[$this->getColumnName()], true) ?? []); |
| 120 | 120 | } |
| 121 | 121 | return $this->attributes[$this->getColumnName()]; |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | $additionalAccessors = array_map(function($propertyKey) { |
| 148 | 148 | return 'get'.Str::studly($propertyKey).'Attribute'; |
| 149 | 149 | }, $this->additionalProperties); |
| 150 | - if(in_array($method, $additionalAccessors)) { |
|
| 150 | + if (in_array($method, $additionalAccessors)) { |
|
| 151 | 151 | return $this->getAdditionalAttribute( |
| 152 | 152 | Str::snake(Str::substr(Str::substr($method, 3), 0, -9)) |
| 153 | 153 | ); |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | $additionalAccessors = array_map(function($propertyKey) { |
| 158 | 158 | return 'set'.Str::studly($propertyKey).'Attribute'; |
| 159 | 159 | }, $this->additionalProperties); |
| 160 | - if(in_array($method, $additionalAccessors)) { |
|
| 160 | + if (in_array($method, $additionalAccessors)) { |
|
| 161 | 161 | $this->setAdditionalAttribute( |
| 162 | 162 | Str::snake(Str::substr(Str::substr($method, 3), 0, -9)), $args[0] |
| 163 | 163 | ); |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | * @return void |
| 28 | 28 | */ |
| 29 | 29 | public function addProperty(string $model, string $key): void { |
| 30 | - if(!$this->hasProperties($model)) { |
|
| 30 | + if (!$this->hasProperties($model)) { |
|
| 31 | 31 | $this->properties[$model] = []; |
| 32 | 32 | } |
| 33 | 33 | $this->properties[$model][] = $key; |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | */ |
| 53 | 53 | public function getProperties(string $model): array |
| 54 | 54 | { |
| 55 | - if($this->hasProperties($model)) { |
|
| 55 | + if ($this->hasProperties($model)) { |
|
| 56 | 56 | return $this->properties[$model]; |
| 57 | 57 | } |
| 58 | 58 | return []; |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | |
| 102 | 102 | public function boot() |
| 103 | 103 | { |
| 104 | - $this->app->make(Factory::class)->load(__DIR__ . '/../database/factories'); |
|
| 104 | + $this->app->make(Factory::class)->load(__DIR__.'/../database/factories'); |
|
| 105 | 105 | $this->setupRouteModelBinding(); |
| 106 | 106 | $this->setupRoutes(); |
| 107 | 107 | } |
@@ -111,10 +111,10 @@ discard block |
||
| 111 | 111 | */ |
| 112 | 112 | protected function registerConfig() |
| 113 | 113 | { |
| 114 | - $this->publishes([__DIR__ .'/../config/config.php' => config_path('control.php'), |
|
| 114 | + $this->publishes([__DIR__.'/../config/config.php' => config_path('control.php'), |
|
| 115 | 115 | ], 'config'); |
| 116 | 116 | $this->mergeConfigFrom( |
| 117 | - __DIR__ .'/../config/control.php', 'control' |
|
| 117 | + __DIR__.'/../config/control.php', 'control' |
|
| 118 | 118 | ); |
| 119 | 119 | } |
| 120 | 120 | |
@@ -126,13 +126,13 @@ discard block |
||
| 126 | 126 | public function registerFactories() |
| 127 | 127 | { |
| 128 | 128 | if (!app()->environment('production')) { |
| 129 | - $this->app->make(Factory::class)->load(__DIR__ .'/../database/factories'); |
|
| 129 | + $this->app->make(Factory::class)->load(__DIR__.'/../database/factories'); |
|
| 130 | 130 | } |
| 131 | 131 | } |
| 132 | 132 | |
| 133 | 133 | public function registerMigrations() |
| 134 | 134 | { |
| 135 | - $this->loadMigrationsFrom(__DIR__ . '/../database/migrations'); |
|
| 135 | + $this->loadMigrationsFrom(__DIR__.'/../database/migrations'); |
|
| 136 | 136 | } |
| 137 | 137 | |
| 138 | 138 | public function bindContracts() |
@@ -256,7 +256,7 @@ discard block |
||
| 256 | 256 | Route::prefix(config('control.api_prefix')) |
| 257 | 257 | ->middleware(config('control.api_middleware')) |
| 258 | 258 | ->namespace('BristolSU\ControlDB\Http\Controllers') |
| 259 | - ->group(__DIR__ . '/../routes/api.php'); |
|
| 259 | + ->group(__DIR__.'/../routes/api.php'); |
|
| 260 | 260 | } |
| 261 | 261 | |
| 262 | 262 | |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | public function up() |
| 15 | 15 | { |
| 16 | - Schema::create('control_data_user', function (Blueprint $table) { |
|
| 16 | + Schema::create('control_data_user', function(Blueprint $table) { |
|
| 17 | 17 | $table->bigIncrements('id'); |
| 18 | 18 | $table->string('first_name')->nullable(); |
| 19 | 19 | $table->string('last_name')->nullable(); |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | public function up() |
| 15 | 15 | { |
| 16 | - Schema::create('control_groups', function (Blueprint $table) { |
|
| 16 | + Schema::create('control_groups', function(Blueprint $table) { |
|
| 17 | 17 | $table->bigIncrements('id'); |
| 18 | 18 | $table->unsignedInteger('data_provider_id')->unique(); |
| 19 | 19 | $table->timestamps(); |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | public function up() |
| 15 | 15 | { |
| 16 | - Schema::create('control_users', function (Blueprint $table) { |
|
| 16 | + Schema::create('control_users', function(Blueprint $table) { |
|
| 17 | 17 | $table->bigIncrements('id'); |
| 18 | 18 | $table->unsignedBigInteger('data_provider_id')->unique(); |
| 19 | 19 | $table->timestamps(); |