Upgrade to 3.8.0

This commit is contained in:
Bastian Allgeier
2022-10-06 10:11:54 +02:00
parent a9ed4e45ca
commit 7d168aae58
332 changed files with 26337 additions and 21977 deletions

View File

@@ -14,19 +14,8 @@ namespace Kirby\Image;
*/
class Location
{
/**
* latitude
*
* @var float|null
*/
protected $lat;
/**
* longitude
*
* @var float|null
*/
protected $lng;
protected float|null $lat = null;
protected float|null $lng = null;
/**
* Constructor
@@ -47,32 +36,24 @@ class Location
/**
* Returns the latitude
*
* @return float|null
*/
public function lat()
public function lat(): float|null
{
return $this->lat;
}
/**
* Returns the longitude
*
* @return float|null
*/
public function lng()
public function lng(): float|null
{
return $this->lng;
}
/**
* Converts the gps coordinates
*
* @param string|array $coord
* @param string $hemi
* @return float
*/
protected function gps($coord, string $hemi): float
protected function gps(array $coord, string $hemi): float
{
$degrees = count($coord) > 0 ? $this->num($coord[0]) : 0;
$minutes = count($coord) > 1 ? $this->num($coord[1]) : 0;
@@ -86,9 +67,6 @@ class Location
/**
* Converts coordinates to floats
*
* @param string $part
* @return float
*/
protected function num(string $part): float
{
@@ -103,8 +81,6 @@ class Location
/**
* Converts the object into a nicely readable array
*
* @return array
*/
public function toArray(): array
{
@@ -116,8 +92,6 @@ class Location
/**
* Echos the entire location as lat, lng
*
* @return string
*/
public function __toString(): string
{
@@ -126,8 +100,6 @@ class Location
/**
* Improved `var_dump` output
*
* @return array
*/
public function __debugInfo(): array
{