forked from Snck3rs/contao-leaflet-maps
Convert array syntax and other minor code style adjustments.
This commit is contained in:
@@ -28,13 +28,13 @@ class DataController
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private $input = array(
|
||||
private $input = [
|
||||
'format' => 'geojson',
|
||||
'type' => 'layer',
|
||||
'id' => null,
|
||||
'filter' => null,
|
||||
'values' => null
|
||||
);
|
||||
'values' => null,
|
||||
];
|
||||
|
||||
/**
|
||||
* Debug mode.
|
||||
@@ -140,9 +140,9 @@ class DataController
|
||||
default:
|
||||
$error = true;
|
||||
|
||||
return array($data, $error);
|
||||
return [$data, $error];
|
||||
}
|
||||
|
||||
return array($data, $error);
|
||||
return [$data, $error];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,12 +57,12 @@ class RequestUrl implements \JsonSerializable
|
||||
*/
|
||||
public static function create($dataId, $type = null, $format = null, Request $request = null)
|
||||
{
|
||||
$params = array(
|
||||
$params = [
|
||||
'for' => $request ? $request->getMapIdentifier() : null,
|
||||
'type' => $type != 'layer' ? $type : null,
|
||||
'id' => $dataId,
|
||||
'format' => $format != 'geojson' ? $format : null
|
||||
);
|
||||
'format' => $format != 'geojson' ? $format : null,
|
||||
];
|
||||
|
||||
$hash = base64_encode(implode(',', $params));
|
||||
$query = 'leaflet=' . $hash;
|
||||
|
||||
Reference in New Issue
Block a user