@@ -30,7 +30,7 @@ |
||
30 | 30 | */ |
31 | 31 | public function register() |
32 | 32 | { |
33 | - $this->app->singleton('geometry', function ($app) { |
|
33 | + $this->app->singleton('geometry', function($app) { |
|
34 | 34 | return $app->make(Geometry::class, [new geoPHP(), new TypeMapper(), $app]); |
35 | 35 | }); |
36 | 36 | } |
@@ -98,7 +98,7 @@ |
||
98 | 98 | throw new InvalidArgumentException("The geometry object cannot be null when building the name to the proxy class."); |
99 | 99 | } |
100 | 100 | |
101 | - $class = __NAMESPACE__ . '\Geometries\\' . get_class($geometry); |
|
101 | + $class = __NAMESPACE__.'\Geometries\\'.get_class($geometry); |
|
102 | 102 | |
103 | 103 | if (class_exists($class)) { |
104 | 104 | return $class; |
@@ -110,8 +110,8 @@ discard block |
||
110 | 110 | } |
111 | 111 | |
112 | 112 | // Shortcut to the getters |
113 | - if (method_exists($this, 'get' . studly_case($name))) { |
|
114 | - return $this->{'get' . studly_case($name)}(); |
|
113 | + if (method_exists($this, 'get'.studly_case($name))) { |
|
114 | + return $this->{'get'.studly_case($name)}(); |
|
115 | 115 | } |
116 | 116 | |
117 | 117 | throw new RuntimeException(sprintf("Undefined property: %s", $name)); |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | return $area; |
221 | 221 | } |
222 | 222 | |
223 | - for ($i = 0; $i < $length; $i ++) { |
|
223 | + for ($i = 0; $i < $length; $i++) { |
|
224 | 224 | list($lower_index, $middle_index, $upper_index) = $this->determineCoordinateIndices($i, $length); |
225 | 225 | |
226 | 226 | $point1 = $coordinates[$lower_index]; |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | public function toArray() |
244 | 244 | { |
245 | 245 | if (is_null($this->geometry_array)) { |
246 | - $this->geometry_array = (array)json_decode($this->toJson(), true); |
|
246 | + $this->geometry_array = (array) json_decode($this->toJson(), true); |
|
247 | 247 | } |
248 | 248 | |
249 | 249 | return $this->geometry_array; |
@@ -136,7 +136,7 @@ |
||
136 | 136 | * @param int $index |
137 | 137 | * @param int $length |
138 | 138 | * |
139 | - * @return array |
|
139 | + * @return integer[] |
|
140 | 140 | */ |
141 | 141 | private function determineCoordinateIndices($index, $length) |
142 | 142 | { |