Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Avatar/Avatar.php')
-rw-r--r--lib/private/Avatar/Avatar.php8
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++) {