zvermafia /
larastate
| 1 | <?php |
||||
| 2 | |||||
| 3 | declare(strict_types=1); |
||||
| 4 | |||||
| 5 | namespace Zvermafia\Larastate\Traits; |
||||
| 6 | |||||
| 7 | use function trans; |
||||
| 8 | |||||
| 9 | trait LocaleValuesTrait |
||||
| 10 | { |
||||
| 11 | use LocaleKeysTrait; |
||||
| 12 | |||||
| 13 | /** |
||||
| 14 | * Get a localization for the given state and its value. |
||||
| 15 | * |
||||
| 16 | * @param string $state_name |
||||
| 17 | * @param mixed $state_value |
||||
| 18 | * @return string |
||||
| 19 | */ |
||||
| 20 | private function getLocale(string $state_name, $state_value): string |
||||
| 21 | { |
||||
| 22 | return trans($this->getLocaleKey($state_name, $state_value)); |
||||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||||
| 23 | } |
||||
| 24 | |||||
| 25 | /** |
||||
| 26 | * Get a localizations for the given state. |
||||
| 27 | * |
||||
| 28 | * @param string $state_name |
||||
| 29 | * @return array |
||||
| 30 | */ |
||||
| 31 | private function getLocales(string $state_name): array |
||||
| 32 | { |
||||
| 33 | return trans($this->getLocalesKey($state_name)); |
||||
|
0 ignored issues
–
show
The function
trans was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 34 | } |
||||
| 35 | } |
||||
| 36 |