mirror of
https://github.com/kevachat/webapp.git
synced 2025-01-23 04:54:32 +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(
|
||||
'%s %s',
|
||||
$round,
|
||||
$this->plural(
|
||||
$this->_plural(
|
||||
$round,
|
||||
$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(
|
||||
string $namespace
|
||||
): string
|
||||
@ -227,4 +220,11 @@ class AppExtension extends AbstractExtension
|
||||
// Return original hash if no success
|
||||
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