@@ -18,7 +18,7 @@ |
||
| 18 | 18 | * |
| 19 | 19 | * @var array |
| 20 | 20 | */ |
| 21 | - protected $fillable = ['name', 'location']; |
|
| 21 | + protected $fillable = [ 'name', 'location' ]; |
|
| 22 | 22 | |
| 23 | 23 | /** |
| 24 | 24 | * Purchases from this supplier. |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | * |
| 20 | 20 | * @var array |
| 21 | 21 | */ |
| 22 | - protected $fillable = ['name']; |
|
| 22 | + protected $fillable = [ 'name' ]; |
|
| 23 | 23 | |
| 24 | 24 | /** |
| 25 | 25 | * Racks in the warehouse. |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | public function addOrUpdateRack($rack) |
| 99 | 99 | { |
| 100 | 100 | (array_has($rack, 'id')) ? |
| 101 | - $this->racks()->find($rack['id'])->update($rack) : $this->addRack($rack); |
|
| 101 | + $this->racks()->find($rack[ 'id' ])->update($rack) : $this->addRack($rack); |
|
| 102 | 102 | |
| 103 | 103 | return $this; |
| 104 | 104 | } |
@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | * |
| 13 | 13 | * @var array |
| 14 | 14 | */ |
| 15 | - protected $availableIncludes = ['purchases']; |
|
| 15 | + protected $availableIncludes = [ 'purchases' ]; |
|
| 16 | 16 | |
| 17 | 17 | /** |
| 18 | 18 | * Turn this item object into a generic array. |
@@ -24,9 +24,9 @@ discard block |
||
| 24 | 24 | public function transform(Supplier $supplier) |
| 25 | 25 | { |
| 26 | 26 | return [ |
| 27 | - 'id' => (int)$supplier->id, |
|
| 28 | - 'name' => (string)$supplier->name, |
|
| 29 | - 'location' => (string)$supplier->location, |
|
| 27 | + 'id' => (int) $supplier->id, |
|
| 28 | + 'name' => (string) $supplier->name, |
|
| 29 | + 'location' => (string) $supplier->location, |
|
| 30 | 30 | ]; |
| 31 | 31 | } |
| 32 | 32 | |
@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | * |
| 13 | 13 | * @var array |
| 14 | 14 | */ |
| 15 | - protected $availableIncludes = ['racks']; |
|
| 15 | + protected $availableIncludes = [ 'racks' ]; |
|
| 16 | 16 | |
| 17 | 17 | /** |
| 18 | 18 | * Turn this item object into a generic array. |
@@ -24,8 +24,8 @@ discard block |
||
| 24 | 24 | public function transform(Warehouse $warehouse) |
| 25 | 25 | { |
| 26 | 26 | return [ |
| 27 | - 'id' => (int)$warehouse->id, |
|
| 28 | - 'name' => (string)$warehouse->name, |
|
| 27 | + 'id' => (int) $warehouse->id, |
|
| 28 | + 'name' => (string) $warehouse->name, |
|
| 29 | 29 | ]; |
| 30 | 30 | } |
| 31 | 31 | |
@@ -8,7 +8,7 @@ |
||
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | 10 | $uri = urldecode( |
| 11 | - parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) |
|
| 11 | + parse_url($_SERVER[ 'REQUEST_URI' ], PHP_URL_PATH) |
|
| 12 | 12 | ); |
| 13 | 13 | |
| 14 | 14 | // This file allows us to emulate Apache's "mod_rewrite" functionality from the |
@@ -105,6 +105,6 @@ |
||
| 105 | 105 | | |
| 106 | 106 | */ |
| 107 | 107 | |
| 108 | - 'attributes' => [], |
|
| 108 | + 'attributes' => [ ], |
|
| 109 | 109 | |
| 110 | 110 | ]; |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | */ |
| 13 | 13 | public function up() |
| 14 | 14 | { |
| 15 | - Schema::create('warehouses', function (Blueprint $table) { |
|
| 15 | + Schema::create('warehouses', function(Blueprint $table) { |
|
| 16 | 16 | $table->increments('id'); |
| 17 | 17 | $table->string('name'); |
| 18 | 18 | }); |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | */ |
| 13 | 13 | public function up() |
| 14 | 14 | { |
| 15 | - Schema::create('purchases', function (Blueprint $table) { |
|
| 15 | + Schema::create('purchases', function(Blueprint $table) { |
|
| 16 | 16 | $table->increments('id'); |
| 17 | 17 | $table->integer('supplier_id')->unsigned(); |
| 18 | 18 | $table->foreign('supplier_id')->references('id')->on('suppliers')->onDelete('cascade'); |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | */ |
| 13 | 13 | public function up() |
| 14 | 14 | { |
| 15 | - Schema::create('shops', function (Blueprint $table) { |
|
| 15 | + Schema::create('shops', function(Blueprint $table) { |
|
| 16 | 16 | $table->increments('id'); |
| 17 | 17 | $table->string('name'); |
| 18 | 18 | $table->string('address'); |