@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | |
19 | 19 | $mock = Mockery::mock(Builder::class, [$connection]); |
20 | 20 | $mock->makePartial()->shouldAllowMockingProtectedMethods(); |
21 | - $blueprint = $mock->createBlueprint('test', function () { |
|
21 | + $blueprint = $mock->createBlueprint('test', function() { |
|
22 | 22 | }); |
23 | 23 | |
24 | 24 | $this->assertInstanceOf(Blueprint::class, $blueprint); |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | |
32 | 32 | $mock = Mockery::mock(Builder::class, [$connection]); |
33 | 33 | $mock->makePartial()->shouldAllowMockingProtectedMethods(); |
34 | - $blueprint = $mock->createBlueprint('test', function () { |
|
34 | + $blueprint = $mock->createBlueprint('test', function() { |
|
35 | 35 | }); |
36 | 36 | |
37 | 37 | $this->assertInstanceOf(Blueprint::class, $blueprint); |
@@ -483,7 +483,7 @@ |
||
483 | 483 | { |
484 | 484 | use SpatialTrait; |
485 | 485 | |
486 | - protected $spatialFields = [ // TODO: only required when fetching, not saving |
|
486 | + protected $spatialFields = [// TODO: only required when fetching, not saving |
|
487 | 487 | 'point', |
488 | 488 | 'linestring', |
489 | 489 | 'polygon', |
@@ -41,7 +41,7 @@ |
||
41 | 41 | if ($this->tokenIsNamespace($token)) { |
42 | 42 | $namespace = $this->getNamespace($key + 2, $tokens); |
43 | 43 | } elseif ($this->tokenIsClassOrInterface($token)) { |
44 | - return ltrim($namespace.'\\'.$this->getClass($key + 2, $tokens), '\\'); |
|
44 | + return ltrim($namespace . '\\' . $this->getClass($key + 2, $tokens), '\\'); |
|
45 | 45 | } |
46 | 46 | } |
47 | 47 | } |
@@ -13,10 +13,10 @@ discard block |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::create('test_geometries', function (Blueprint $table) { |
|
16 | + Schema::create('test_geometries', function(Blueprint $table) { |
|
17 | 17 | $table->increments('id'); |
18 | 18 | $table->geometry('geo')->default(null)->nullable(); |
19 | - $table->point('location'); // required to be not null in order to add an index |
|
19 | + $table->point('location'); // required to be not null in order to add an index |
|
20 | 20 | $table->lineString('line')->default(null)->nullable(); |
21 | 21 | $table->polygon('shape')->default(null)->nullable(); |
22 | 22 | $table->multiPoint('multi_locations')->default(null)->nullable(); |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | $table->timestamps(); |
27 | 27 | }); |
28 | 28 | |
29 | - Schema::create('no_spatial_fields', function (Blueprint $table) { |
|
29 | + Schema::create('no_spatial_fields', function(Blueprint $table) { |
|
30 | 30 | $table->increments('id'); |
31 | 31 | $table->geometry('geometry')->default(null)->nullable(); |
32 | 32 | }); |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | */ |
15 | 15 | public function up() |
16 | 16 | { |
17 | - Schema::table('test_geometries', function (Blueprint $table) { |
|
17 | + Schema::table('test_geometries', function(Blueprint $table) { |
|
18 | 18 | // Make sure point is not nullable |
19 | 19 | $table->point('location')->change(); |
20 | 20 | |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | \DB::statement('ALTER TABLE test_geometries ENGINE = MyISAM'); |
35 | 35 | } |
36 | 36 | |
37 | - Schema::table('test_geometries', function (Blueprint $table) { |
|
37 | + Schema::table('test_geometries', function(Blueprint $table) { |
|
38 | 38 | // Add a spatial index on the location field |
39 | 39 | $table->spatialIndex('location'); |
40 | 40 | }); |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | */ |
48 | 48 | public function down() |
49 | 49 | { |
50 | - Schema::table('test_geometries', function (Blueprint $table) { |
|
50 | + Schema::table('test_geometries', function(Blueprint $table) { |
|
51 | 51 | $table->dropSpatialIndex(['location']); // either an array of column names or the index name |
52 | 52 | }); |
53 | 53 | |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | \DB::statement('ALTER TABLE test_geometries ENGINE = InnoDB'); |
56 | 56 | } |
57 | 57 | |
58 | - Schema::table('test_geometries', function (Blueprint $table) { |
|
58 | + Schema::table('test_geometries', function(Blueprint $table) { |
|
59 | 59 | $table->point('location')->nullable()->change(); |
60 | 60 | }); |
61 | 61 | } |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | */ |
25 | 25 | public function createApplication() |
26 | 26 | { |
27 | - $app = require __DIR__.'/../../vendor/laravel/laravel/bootstrap/app.php'; |
|
27 | + $app = require __DIR__ . '/../../vendor/laravel/laravel/bootstrap/app.php'; |
|
28 | 28 | $app->register(SpatialServiceProvider::class); |
29 | 29 | |
30 | 30 | $app->make('Illuminate\Contracts\Console\Kernel')->bootstrap(); |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | |
58 | 58 | $this->after_fix = $this->isMySQL8AfterFix(); |
59 | 59 | |
60 | - $this->onMigrations(function ($migrationClass) { |
|
60 | + $this->onMigrations(function($migrationClass) { |
|
61 | 61 | (new $migrationClass())->up(); |
62 | 62 | }); |
63 | 63 | |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | |
69 | 69 | public function tearDown() |
70 | 70 | { |
71 | - $this->onMigrations(function ($migrationClass) { |
|
71 | + $this->onMigrations(function($migrationClass) { |
|
72 | 72 | (new $migrationClass())->down(); |
73 | 73 | }, true); |
74 | 74 | |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | $fileSystem = new Filesystem(); |
108 | 108 | $classFinder = new Tools\ClassFinder(); |
109 | 109 | |
110 | - $migrations = $fileSystem->files(__DIR__.'/Migrations'); |
|
110 | + $migrations = $fileSystem->files(__DIR__ . '/Migrations'); |
|
111 | 111 | $reverse_sort ? rsort($migrations, SORT_STRING) : sort($migrations, SORT_STRING); |
112 | 112 | |
113 | 113 | foreach ($migrations as $file) { |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | $geo = new GeometryModel(); |
153 | 153 | |
154 | 154 | $geo->location = new Point([1, 2]); |
155 | - $geo->shape = new Polygon([[[0, 10],[10, 10],[10, 0],[0, 0],[0, 10]]]); |
|
155 | + $geo->shape = new Polygon([[[0, 10], [10, 10], [10, 0], [0, 0], [0, 10]]]); |
|
156 | 156 | $geo->save(); |
157 | 157 | $this->assertDatabaseHas($geo->getTable(), ['id' => $geo->id]); |
158 | 158 | } |
@@ -174,8 +174,8 @@ discard block |
||
174 | 174 | $geo->location = new Point([1, 2]); |
175 | 175 | |
176 | 176 | $geo->multi_shapes = new MultiPolygon([ |
177 | - new Polygon([[[0, 10],[10, 10],[10, 0],[0, 0],[0, 10]]]), |
|
178 | - new Polygon([[[0, 0],[0, 5],[5, 5],[5, 0],[0, 0]]]), |
|
177 | + new Polygon([[[0, 10], [10, 10], [10, 0], [0, 0], [0, 10]]]), |
|
178 | + new Polygon([[[0, 0], [0, 5], [5, 5], [5, 0], [0, 0]]]), |
|
179 | 179 | ]); |
180 | 180 | $geo->save(); |
181 | 181 | $this->assertDatabaseHas($geo->getTable(), ['id' => $geo->id]); |
@@ -188,8 +188,8 @@ discard block |
||
188 | 188 | $geo->location = new Point([1, 2]); |
189 | 189 | |
190 | 190 | $geo->multi_geometries = new GeometryCollection([ |
191 | - new Polygon([[[0, 10],[10, 10],[10, 0],[0, 0],[0, 10]]]), |
|
192 | - new Polygon([[[0, 0],[0, 5],[5, 5],[5, 0],[0, 0]]]), |
|
191 | + new Polygon([[[0, 10], [10, 10], [10, 0], [0, 0], [0, 10]]]), |
|
192 | + new Polygon([[[0, 0], [0, 5], [5, 5], [5, 0], [0, 0]]]), |
|
193 | 193 | new Point([0, 0]), |
194 | 194 | ]); |
195 | 195 | $geo->save(); |
@@ -12,7 +12,7 @@ |
||
12 | 12 | | |
13 | 13 | */ |
14 | 14 | |
15 | -require dirname(__DIR__).'/vendor/autoload.php'; |
|
15 | +require dirname(__DIR__) . '/vendor/autoload.php'; |
|
16 | 16 | |
17 | 17 | /* |
18 | 18 | |-------------------------------------------------------------------------- |