Convert array syntax and other minor code style adjustments.

This commit is contained in:
David Molineus
2017-10-17 18:11:28 +02:00
parent 6ded7441d9
commit c465b724f4
63 changed files with 413 additions and 404 deletions

View File

@@ -41,7 +41,7 @@ class MarkerModel extends AbstractActiveModel
public static function findByFilter($pid, Filter $filter = null)
{
if (!$filter) {
return static::findActiveBy('pid', $pid, array('order' => 'sorting'));
return static::findActiveBy('pid', $pid, ['order' => 'sorting']);
}
switch ($filter->getName()) {
@@ -63,23 +63,23 @@ class MarkerModel extends AbstractActiveModel
*/
public static function findByBBoxFilter($pid, BboxFilter $filter)
{
$columns = array(
$columns = [
'active=1',
'pid=?',
'latitude > ? AND latitude < ?',
'longitude > ? AND longitude < ?'
);
'longitude > ? AND longitude < ?',
];
/** @var LatLngBounds $bounds */
$bounds = $filter->getValues()['bounds'];
$values = array(
$values = [
$pid,
$bounds->getSouthWest()->getLatitude(),
$bounds->getNorthEast()->getLatitude(),
$bounds->getSouthWest()->getLongitude(),
$bounds->getNorthEast()->getLongitude()
);
$bounds->getNorthEast()->getLongitude(),
];
return static::findBy($columns, $values, array('order' => 'sorting'));
return static::findBy($columns, $values, ['order' => 'sorting']);
}
}