Skip to content
This repository has been archived by the owner on Nov 4, 2021. It is now read-only.

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmichot authored and StyleCIBot committed Mar 7, 2019
1 parent 2c0b75c commit 50bb43f
Show file tree
Hide file tree
Showing 50 changed files with 420 additions and 427 deletions.
8 changes: 4 additions & 4 deletions config/scout_elastic.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
return [
'client' => [
'hosts' => [
env('SCOUT_ELASTIC_HOST', 'localhost:9200')
]
env('SCOUT_ELASTIC_HOST', 'localhost:9200'),
],
],
'update_mapping' => env('SCOUT_ELASTIC_UPDATE_MAPPING', true),
'indexer' => env('SCOUT_ELASTIC_INDEXER', 'single'),
'document_refresh' => env('SCOUT_ELASTIC_DOCUMENT_REFRESH')
];
'document_refresh' => env('SCOUT_ELASTIC_DOCUMENT_REFRESH'),
];
18 changes: 9 additions & 9 deletions docker/laravel/app/Stubs/Car.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace App\Stubs;

use ScoutElastic\Searchable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use ScoutElastic\Searchable;

class Car extends Model
{
Expand All @@ -19,7 +19,7 @@ class Car extends Model
* @var array
*/
protected $fillable = [
'title'
'title',
];

/**
Expand All @@ -28,20 +28,20 @@ class Car extends Model
protected $mapping = [
'properties' => [
'title' => [
'type' => 'text'
'type' => 'text',
],
'maker' => [
'type' => 'keyword'
'type' => 'keyword',
],
'created_at' => [
'type' => 'date',
'format' => 'yyyy-MM-dd HH:mm:ss'
'format' => 'yyyy-MM-dd HH:mm:ss',
],
'updated_at' => [
'type' => 'date',
'format' => 'yyyy-MM-dd HH:mm:ss'
]
]
'format' => 'yyyy-MM-dd HH:mm:ss',
],
],
];

/**
Expand All @@ -53,7 +53,7 @@ public function maker()
}

/**
* @inheritdoc
* {@inheritdoc}
*/
public function toSearchableArray()
{
Expand Down
2 changes: 1 addition & 1 deletion docker/laravel/app/Stubs/CarIndexConfigurator.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace App\Stubs;

use ScoutElastic\IndexConfigurator;
use ScoutElastic\Migratable;
use ScoutElastic\IndexConfigurator;

class CarIndexConfigurator extends IndexConfigurator
{
Expand Down
4 changes: 2 additions & 2 deletions docker/laravel/app/Stubs/Maker.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Maker extends Model
* @var array
*/
protected $fillable = [
'title'
'title',
];

/**
Expand All @@ -21,4 +21,4 @@ public function cars()
{
return $this->hasMany(Car::class);
}
}
}
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?php

use App\Stubs\CarIndexConfigurator;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCarsTable extends Migration
{
/**
* @inheritdoc
* {@inheritdoc}
*/
public function up()
{
Expand All @@ -27,15 +27,15 @@ public function up()
}

/**
* @inheritdoc
* {@inheritdoc}
*/
public function down()
{
Artisan::call(
'elastic:drop-index',
['index-configurator' => CarIndexConfigurator::class]
);

Schema::dropIfExists('cars');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
class CreateMakersTable extends Migration
{
/**
* @inheritdoc
* {@inheritdoc}
*/
public function up()
{
Expand All @@ -19,7 +19,7 @@ public function up()
}

/**
* @inheritdoc
* {@inheritdoc}
*/
public function down()
{
Expand Down
12 changes: 6 additions & 6 deletions docker/laravel/database/seeds/CarsTableSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
class CarsTableSeeder extends Seeder
{
/**
* @inheritdoc
* {@inheritdoc}
*/
public function run()
{
Expand All @@ -21,7 +21,7 @@ public function run()
->saveMany([
new Car(['title' => 'A3']),
new Car(['title' => 'A4']),
new Car(['title' => 'Q3'])
new Car(['title' => 'Q3']),
]);

Maker::where('title', 'BMW')
Expand All @@ -30,7 +30,7 @@ public function run()
->saveMany([
new Car(['title' => '1 Series']),
new Car(['title' => '3 Series']),
new Car(['title' => 'X1'])
new Car(['title' => 'X1']),
]);

Maker::where('title', 'Volkswagen')
Expand All @@ -39,15 +39,15 @@ public function run()
->saveMany([
new Car(['title' => 'Golf']),
new Car(['title' => 'Passat']),
new Car(['title' => 'Tiguan'])
new Car(['title' => 'Tiguan']),
]);

Maker::where('title', 'Volvo')
->firstOrFail()
->cars()
->saveMany([
new Car(['title' => 'S60']),
new Car(['title' => 'XC40'])
new Car(['title' => 'XC40']),
]);

Maker::where('title', 'Kia')
Expand All @@ -56,7 +56,7 @@ public function run()
->saveMany([
new Car(['title' => 'Rio']),
new Car(['title' => 'Cerato']),
new Car(['title' => 'Stinger'])
new Car(['title' => 'Stinger']),
]);
}
}
4 changes: 2 additions & 2 deletions docker/laravel/database/seeds/DatabaseSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
class DatabaseSeeder extends Seeder
{
/**
* @inheritdoc
* {@inheritdoc}
*/
public function run()
{
$this->call([
MakersTableSeeder::class,
CarsTableSeeder::class
CarsTableSeeder::class,
]);
}
}
2 changes: 1 addition & 1 deletion docker/laravel/database/seeds/MakersTableSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
class MakersTableSeeder extends Seeder
{
/**
* @inheritdoc
* {@inheritdoc}
*/
public function run()
{
Expand Down
Loading

0 comments on commit 50bb43f

Please sign in to comment.