1 | <?php |
||
13 | class CustomTranslateExtension extends \Twig_Extension { |
||
14 | use SingletonTrait; |
||
15 | |||
16 | const CUSTOM_LOCALE_SESSION_KEY = '__PSFS_CUSTOM_LOCALE_KEY__'; |
||
17 | |||
18 | protected static $translations = []; |
||
19 | protected static $locale = 'es_ES'; |
||
20 | |||
21 | /** |
||
22 | * @param string $custom_key |
||
|
|||
23 | * @param bool $force_reload |
||
24 | */ |
||
25 | 1 | protected static function checkLoad($custom_key = null, $force_reload = false) { |
|
38 | |||
39 | /** |
||
40 | * {@inheritdoc} |
||
41 | */ |
||
42 | 1 | public function getTokenParsers() |
|
46 | |||
47 | /** |
||
48 | * {@inheritdoc} |
||
49 | */ |
||
50 | public function getFilters() |
||
58 | |||
59 | /** |
||
60 | * {@inheritdoc} |
||
61 | */ |
||
62 | 1 | public function getName() |
|
66 | |||
67 | /** |
||
68 | * @param $message |
||
69 | * @param string $custom_key |
||
70 | * @param bool $force_reload |
||
71 | * @return mixed|string |
||
72 | */ |
||
73 | 1 | public static function _($message, $custom_key = null, $force_reload = false) { |
|
81 | } |
This check looks for
@param
annotations where the type inferred by our type inference engine differs from the declared type.It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.