diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-03-26 09:30:18 +0100 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-03-26 16:34:56 +0100 |
commit | b80ebc96748b45fd2e0ba9323308657c4b00b7ec (patch) | |
tree | ec20e0ffa2f86b9b54939a83a785407319f94559 /lib/private/Avatar | |
parent | 62403d0932be7d620c7bdadc6b4e13eb496fcd6f (diff) | |
download | nextcloud-server-b80ebc96748b45fd2e0ba9323308657c4b00b7ec.tar.gz nextcloud-server-b80ebc96748b45fd2e0ba9323308657c4b00b7ec.zip |
Use the short array syntax, everywhere
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/private/Avatar')
-rw-r--r-- | lib/private/Avatar/Avatar.php | 8 |
1 files changed, 4 insertions, 4 deletions
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++) { |