1 | <?php |
||
12 | class RollbarExtension extends \Twig_Extension |
||
13 | { |
||
14 | /** |
||
15 | * @var array |
||
16 | */ |
||
17 | protected $notifierOptions; |
||
18 | |||
19 | /** |
||
20 | * @var array |
||
21 | */ |
||
22 | protected $environmentOptions; |
||
23 | |||
24 | /** |
||
25 | * @var UserHelper |
||
26 | */ |
||
27 | private $userHelper; |
||
28 | |||
29 | /** |
||
30 | * @var CheckIgnoreFunctionProviderInterface |
||
31 | */ |
||
32 | private $checkIgnoreFunctionProvider; |
||
33 | |||
34 | /** |
||
35 | * @var TransformPayloadFunctionProviderInterface |
||
36 | */ |
||
37 | private $transformPayloadFunctionProvider; |
||
38 | |||
39 | /** |
||
40 | * @param array $notifierOptions |
||
41 | * @param array $environmentOptions |
||
42 | * @param UserHelper $userHelper |
||
43 | * @param CheckIgnoreFunctionProviderInterface $checkIgnoreFunctionProvider |
||
44 | * @param TransformPayloadFunctionProviderInterface $transformPayloadFunctionProvider |
||
45 | */ |
||
46 | public function __construct( |
||
59 | |||
60 | /** |
||
61 | * Returns a list of functions to add to the existing list. |
||
62 | * |
||
63 | * @return array An array of functions |
||
|
|||
64 | */ |
||
65 | public function getFunctions() |
||
78 | |||
79 | /** |
||
80 | * @param array $context |
||
81 | * |
||
82 | * @return string |
||
83 | */ |
||
84 | public function getInitRollbarCode(array $context) |
||
130 | |||
131 | /** |
||
132 | * Configure and return JS for "ignore errors" feature. |
||
133 | * |
||
134 | * @return string |
||
135 | */ |
||
136 | protected function getCheckIgnoreConfig() |
||
197 | |||
198 | /** |
||
199 | * Returns the name of the extension. |
||
200 | * |
||
201 | * @return string The extension name |
||
202 | */ |
||
203 | public function getName() |
||
207 | } |
||
208 |
This check looks for the generic type
array
as a return type and suggests a more specific type. This type is inferred from the actual code.