mirror of
https://github.com/friendica/friendica
synced 2025-05-03 05:04:15 +02:00
Use short form array syntax everywhere
- Add short form array syntax to po2php.php generation
This commit is contained in:
parent
77dfbaa0bf
commit
e36f2bb1fb
212 changed files with 5160 additions and 5160 deletions
|
@ -171,7 +171,7 @@ class Photo
|
|||
$micro = System::baseUrl() . '/images/person-48.jpg';
|
||||
}
|
||||
|
||||
return array($image_url, $thumb, $micro);
|
||||
return [$image_url, $thumb, $micro];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -184,9 +184,9 @@ class Photo
|
|||
$degrees = count($exifCoord) > 0 ? self::gps2Num($exifCoord[0]) : 0;
|
||||
$minutes = count($exifCoord) > 1 ? self::gps2Num($exifCoord[1]) : 0;
|
||||
$seconds = count($exifCoord) > 2 ? self::gps2Num($exifCoord[2]) : 0;
|
||||
|
||||
|
||||
$flip = ($hemi == 'W' || $hemi == 'S') ? -1 : 1;
|
||||
|
||||
|
||||
return floatval($flip * ($degrees + ($minutes / 60) + ($seconds / 3600)));
|
||||
}
|
||||
|
||||
|
@ -197,15 +197,15 @@ class Photo
|
|||
private static function gps2Num($coordPart)
|
||||
{
|
||||
$parts = explode('/', $coordPart);
|
||||
|
||||
|
||||
if (count($parts) <= 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (count($parts) == 1) {
|
||||
return $parts[0];
|
||||
}
|
||||
|
||||
|
||||
return floatval($parts[0]) / floatval($parts[1]);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue