Completed
Branch testing (7f3043)
by Hennik
05:13
created
tests/Unit/Schema/BuilderTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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);
Please login to merge, or discard this patch.
tests/Unit/Eloquent/SpatialTraitTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -483,7 +483,7 @@
 block discarded – undo
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',
Please login to merge, or discard this patch.
tests/Integration/Tools/ClassFinder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
tests/Integration/Migrations/CreateTables.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -13,10 +13,10 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
         });
Please login to merge, or discard this patch.
tests/Integration/Migrations/UpdateTables.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
tests/Integration/MysqlTest.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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();
Please login to merge, or discard this patch.
tests/bootstrap.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
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
 |--------------------------------------------------------------------------
Please login to merge, or discard this patch.