general: use byval for array_map

pull/460/head
Varun Patil 2023-02-23 23:50:09 -08:00
parent e93571c7f6
commit 9295f2d026
3 changed files with 4 additions and 4 deletions

View File

@ -228,7 +228,7 @@ class PlacesSetup extends Command
}
if (GIS_TYPE_MYSQL === $this->gisType) {
$points = implode(',', array_map(function (&$point) {
$points = implode(',', array_map(function ($point) {
$x = $point[0];
$y = $point[1];
@ -237,7 +237,7 @@ class PlacesSetup extends Command
$geometry = "POLYGON(({$points}))";
} elseif (GIS_TYPE_POSTGRES === $this->gisType) {
$geometry = implode(',', array_map(function (&$point) {
$geometry = implode(',', array_map(function ($point) {
$x = $point[0];
$y = $point[1];

View File

@ -90,7 +90,7 @@ class PlacesController extends ApiBase
shuffle($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'];
}, $list));
}

View File

@ -92,7 +92,7 @@ class TagsController extends ApiBase
shuffle($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'];
}, $list));
}