From b80ebc96748b45fd2e0ba9323308657c4b00b7ec Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Thu, 26 Mar 2020 09:30:18 +0100 Subject: Use the short array syntax, everywhere Signed-off-by: Christoph Wurst --- lib/private/Avatar/Avatar.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/private/Avatar') diff --git a/lib/private/Avatar/Avatar.php b/lib/private/Avatar/Avatar.php index 8f8e5e449cc..86df8aada73 100644 --- a/lib/private/Avatar/Avatar.php +++ b/lib/private/Avatar/Avatar.php @@ -232,7 +232,7 @@ abstract class Avatar implements IAvatar { $x = intval(($xi - $xr) / 2); $y = intval(($yi + $yr) / 2); - return array($x, $y); + return [$x, $y]; } /** @@ -242,7 +242,7 @@ abstract class Avatar implements IAvatar { * @return array [r,g,b] steps for each color to go from $steps to $ends */ private function stepCalc($steps, $ends) { - $step = array(); + $step = []; $step[0] = ($ends[1]->r - $ends[0]->r) / $steps; $step[1] = ($ends[1]->g - $ends[0]->g) / $steps; $step[2] = ($ends[1]->b - $ends[0]->b) / $steps; @@ -256,7 +256,7 @@ abstract class Avatar implements IAvatar { * @return int[] between 0 and $maximum */ private function mixPalette($steps, $color1, $color2) { - $palette = array($color1); + $palette = [$color1]; $step = $this->stepCalc($steps, [$color1, $color2]); for ($i = 1; $i < $steps; $i++) { $r = intval($color1->r + ($step[0] * $i)); @@ -275,7 +275,7 @@ abstract class Avatar implements IAvatar { */ private function hashToInt($hash, $maximum) { $final = 0; - $result = array(); + $result = []; // Splitting evenly the string for ($i = 0; $i < strlen($hash); $i++) { -- cgit v1.2.3