general: use byval for array_map
parent
e93571c7f6
commit
9295f2d026
|
@ -228,7 +228,7 @@ class PlacesSetup extends Command
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GIS_TYPE_MYSQL === $this->gisType) {
|
if (GIS_TYPE_MYSQL === $this->gisType) {
|
||||||
$points = implode(',', array_map(function (&$point) {
|
$points = implode(',', array_map(function ($point) {
|
||||||
$x = $point[0];
|
$x = $point[0];
|
||||||
$y = $point[1];
|
$y = $point[1];
|
||||||
|
|
||||||
|
@ -237,7 +237,7 @@ class PlacesSetup extends Command
|
||||||
|
|
||||||
$geometry = "POLYGON(({$points}))";
|
$geometry = "POLYGON(({$points}))";
|
||||||
} elseif (GIS_TYPE_POSTGRES === $this->gisType) {
|
} elseif (GIS_TYPE_POSTGRES === $this->gisType) {
|
||||||
$geometry = implode(',', array_map(function (&$point) {
|
$geometry = implode(',', array_map(function ($point) {
|
||||||
$x = $point[0];
|
$x = $point[0];
|
||||||
$y = $point[1];
|
$y = $point[1];
|
||||||
|
|
||||||
|
|
|
@ -90,7 +90,7 @@ class PlacesController extends ApiBase
|
||||||
shuffle($list);
|
shuffle($list);
|
||||||
|
|
||||||
// Get preview from image list
|
// Get preview from image list
|
||||||
return $this->getPreviewFromImageList(array_map(static function (&$item) {
|
return $this->getPreviewFromImageList(array_map(function ($item) {
|
||||||
return (int) $item['fileid'];
|
return (int) $item['fileid'];
|
||||||
}, $list));
|
}, $list));
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,7 +92,7 @@ class TagsController extends ApiBase
|
||||||
shuffle($list);
|
shuffle($list);
|
||||||
|
|
||||||
// Get preview from image list
|
// Get preview from image list
|
||||||
return $this->getPreviewFromImageList(array_map(static function (&$item) {
|
return $this->getPreviewFromImageList(array_map(function ($item) {
|
||||||
return (int) $item['fileid'];
|
return (int) $item['fileid'];
|
||||||
}, $list));
|
}, $list));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue