mirror of
https://github.com/kevachat/webapp.git
synced 2025-01-23 13:04:20 +00:00
fix private method call
This commit is contained in:
parent
238c008738
commit
13506cf44c
@ -131,7 +131,7 @@ class AppExtension extends AbstractExtension
|
|||||||
return sprintf(
|
return sprintf(
|
||||||
'%s %s',
|
'%s %s',
|
||||||
$round,
|
$round,
|
||||||
$this->plural(
|
$this->_plural(
|
||||||
$round,
|
$round,
|
||||||
$value
|
$value
|
||||||
)
|
)
|
||||||
@ -192,13 +192,6 @@ class AppExtension extends AbstractExtension
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function plural(int $number, array $texts)
|
|
||||||
{
|
|
||||||
$cases = [2, 0, 1, 1, 1, 2];
|
|
||||||
|
|
||||||
return $texts[(($number % 100) > 4 && ($number % 100) < 20) ? 2 : $cases[min($number % 10, 5)]];
|
|
||||||
}
|
|
||||||
|
|
||||||
public function kevaNamespaceValue(
|
public function kevaNamespaceValue(
|
||||||
string $namespace
|
string $namespace
|
||||||
): string
|
): string
|
||||||
@ -227,4 +220,11 @@ class AppExtension extends AbstractExtension
|
|||||||
// Return original hash if no success
|
// Return original hash if no success
|
||||||
return $namespace;
|
return $namespace;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function _plural(int $number, array $texts)
|
||||||
|
{
|
||||||
|
$cases = [2, 0, 1, 1, 1, 2];
|
||||||
|
|
||||||
|
return $texts[(($number % 100) > 4 && ($number % 100) < 20) ? 2 : $cases[min($number % 10, 5)]];
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user