Run composer require checker and solve issues.

This commit is contained in:
David Molineus
2018-08-23 14:35:25 +02:00
parent e73a4d4bdf
commit 3d45f6b2eb
29 changed files with 98 additions and 50 deletions

View File

@@ -13,6 +13,7 @@
namespace Netzmacht\Contao\Leaflet\Mapper\Control;
use Contao\Model;
use Contao\StringUtil;
use Netzmacht\Contao\Leaflet\Mapper\DefinitionMapper;
use Netzmacht\Contao\Leaflet\Mapper\Request;
use Netzmacht\LeafletPHP\Definition;
@@ -68,7 +69,7 @@ class AttributionControlMapper extends AbstractControlMapper
$parent->setAttributionControl(false);
}
$attributions = deserialize($model->attributions, true);
$attributions = StringUtil::deserialize($model->attributions, true);
foreach ($attributions as $attribution) {
$definition->addAttribution($attribution);

View File

@@ -170,7 +170,7 @@ class MarkersLayerMapper extends AbstractLayerMapper implements GeoJsonMapper
* @param Model $model The layer model.
* @param Request $request Optional building request.
*
* @return \Model\Collection|null
* @return \Contao\Model\Collection|null
*/
protected function loadMarkerModels(Model $model, Request $request = null)
{

View File

@@ -13,6 +13,7 @@
namespace Netzmacht\Contao\Leaflet\Mapper\Layer;
use Contao\Model;
use Contao\StringUtil;
use Netzmacht\Contao\Leaflet\Definition\Layer\OverpassLayer;
use Netzmacht\Contao\Leaflet\Mapper\DefinitionMapper;
use Netzmacht\Contao\Leaflet\Mapper\Request;
@@ -146,7 +147,7 @@ class OverpassLayerMapper extends AbstractLayerMapper
*/
private function filterAmenityIconsConfig($amenityIconsConfig)
{
$amenityIconsConfig = deserialize($amenityIconsConfig, true);
$amenityIconsConfig = StringUtil::deserialize($amenityIconsConfig, true);
$amenityIconsMap = [];
foreach ($amenityIconsConfig as $config) {

View File

@@ -188,11 +188,11 @@ class VectorsLayerMapper extends AbstractLayerMapper implements GeoJsonMapper
* Add javascript callbacks.
*
* @param GeoJson $definition The definition.
* @param \Model $model The database model.
* @param Model $model The database model.
*
* @return void
*/
protected function addCallbacks(GeoJson $definition, \Model $model)
protected function addCallbacks(GeoJson $definition, Model $model)
{
if ($model->pointToLayer) {
$definition->setPointToLayer(new Expression($model->pointToLayer));

View File

@@ -13,6 +13,7 @@
namespace Netzmacht\Contao\Leaflet\Mapper;
use Contao\Model;
use Contao\StringUtil;
use Netzmacht\Contao\Leaflet\Model\ControlModel;
use Netzmacht\Contao\Leaflet\Model\MapModel;
use Netzmacht\Contao\Toolkit\Data\Model\RepositoryManager;
@@ -195,7 +196,7 @@ class MapMapper extends AbstractMapper
*/
private function buildBoundsCalculation(Map $map, MapModel $model)
{
$adjustBounds = deserialize($model->adjustBounds, true);
$adjustBounds = StringUtil::deserialize($model->adjustBounds, true);
if (in_array('deferred', $adjustBounds)) {
$map->setOption('adjustBounds', true);

View File

@@ -131,7 +131,7 @@ class OptionsBuilder
* Build options and conditional options.
*
* @param Definition $definition The definition being built.
* @param \Model $model The model.
* @param Model $model The model.
*
* @return $this
*/
@@ -147,7 +147,7 @@ class OptionsBuilder
* Build options.
*
* @param Definition $definition The definition being built.
* @param \Model $model The model.
* @param Model $model The model.
*
* @return void
*/
@@ -160,11 +160,11 @@ class OptionsBuilder
* Build conditional options.
*
* @param Definition $definition The definition being built.
* @param \Model $model The model.
* @param Model $model The model.
*
* @return void
*/
private function buildConditionals($definition, \Model $model)
private function buildConditionals($definition, Model $model)
{
foreach ($this->conditional as $column => $conditions) {
foreach ($conditions as $value => $options) {

View File

@@ -12,6 +12,7 @@
namespace Netzmacht\Contao\Leaflet\Mapper\Type;
use Contao\File;
use Contao\FilesModel;
use Contao\Model;
use Netzmacht\Contao\Leaflet\Mapper\DefinitionMapper;
@@ -118,7 +119,7 @@ class ImageIconMapper extends AbstractIconMapper
if ($file) {
$definition->setIconUrl($file->path);
$file = new \File($file->path);
$file = new File($file->path);
$definition->setIconSize([$file->width, $file->height]);
if (!$model->iconAnchor) {
@@ -162,7 +163,7 @@ class ImageIconMapper extends AbstractIconMapper
if ($file) {
$definition->setShadowUrl($file->path);
$file = new \File($file->path);
$file = new File($file->path);
$definition->setShadowSize([$file->width, $file->height]);
if (!$model->shadowAnchor) {

View File

@@ -13,6 +13,7 @@
namespace Netzmacht\Contao\Leaflet\Mapper\UI;
use Contao\Model;
use Contao\StringUtil;
use Netzmacht\Contao\Leaflet\Mapper\AbstractMapper;
use Netzmacht\Contao\Leaflet\Mapper\DefinitionMapper;
use Netzmacht\Contao\Leaflet\Mapper\Request;
@@ -76,9 +77,9 @@ class PopupMapper extends AbstractMapper
if ($model->autoPan) {
$padding = array_map(
function ($value) {
return array_map('intval', trimsplit(',', $value));
return array_map('intval', StringUtil::trimsplit(',', $value));
},
deserialize($model->autoPanPadding, true)
StringUtil::deserialize($model->autoPanPadding, true)
);
if ($padding[0] === $padding[1]) {

View File

@@ -13,6 +13,7 @@
namespace Netzmacht\Contao\Leaflet\Mapper\Vector;
use Contao\Model;
use Contao\StringUtil;
use Netzmacht\Contao\Leaflet\Mapper\DefinitionMapper;
use Netzmacht\Contao\Leaflet\Mapper\Request;
use Netzmacht\LeafletPHP\Definition;
@@ -67,7 +68,7 @@ class MultiPolylineMapper extends AbstractVectorMapper
*/
protected function createLatLngs(Polyline $definition, Model $model)
{
foreach (deserialize($model->multiData, true) as $ring => $data) {
foreach (StringUtil::deserialize($model->multiData, true) as $ring => $data) {
$latLngs = array_map(
function ($row) {
return LatLng::fromString($row);

View File

@@ -13,6 +13,7 @@
namespace Netzmacht\Contao\Leaflet\Mapper\Vector;
use Contao\Model;
use Contao\StringUtil;
use Netzmacht\Contao\Leaflet\Mapper\DefinitionMapper;
use Netzmacht\Contao\Leaflet\Mapper\Request;
use Netzmacht\LeafletPHP\Definition\Vector\Rectangle;
@@ -53,7 +54,7 @@ class RectangleMapper extends AbstractVectorMapper
function ($latLng) {
return LatLng::fromString($latLng);
},
deserialize($model->bounds, true)
StringUtil::deserialize($model->bounds, true)
);
$arguments = parent::buildConstructArguments($model, $mapper, $request, $elementId);