These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | namespace Kunstmaan\AdminBundle\Twig; |
||
4 | |||
5 | use Twig_Extension; |
||
6 | |||
7 | /** |
||
8 | * Class GoogleSignInTwigExtension |
||
9 | */ |
||
10 | class GoogleSignInTwigExtension extends Twig_Extension |
||
0 ignored issues
–
show
|
|||
11 | { |
||
12 | private $enabled; |
||
13 | |||
14 | private $clientId; |
||
15 | |||
16 | public function __construct($enabled, $clientId) |
||
17 | { |
||
18 | $this->enabled = $enabled; |
||
19 | $this->clientId = $clientId; |
||
20 | } |
||
21 | |||
22 | /** |
||
23 | * Returns a list of functions to add to the existing list. |
||
24 | * |
||
25 | * @return array An array of functions |
||
0 ignored issues
–
show
|
|||
26 | */ |
||
27 | public function getFunctions() |
||
28 | { |
||
29 | return array( |
||
30 | new \Twig_SimpleFunction('google_signin_enabled', array($this, 'isGoogleSignInEnabled')), |
||
0 ignored issues
–
show
The class
Twig_SimpleFunction has been deprecated with message: since Twig 2.7, use "Twig\TwigFunction" instead
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.
Loading history...
|
|||
31 | new \Twig_SimpleFunction('google_signin_client_id', array($this, 'getClientId')), |
||
0 ignored issues
–
show
The class
Twig_SimpleFunction has been deprecated with message: since Twig 2.7, use "Twig\TwigFunction" instead
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.
Loading history...
|
|||
32 | ); |
||
33 | } |
||
34 | |||
35 | public function isGoogleSignInEnabled() |
||
0 ignored issues
–
show
The return type could not be reliably inferred; please add a
@return annotation.
Our type inference engine in quite powerful, but sometimes the code does not
provide enough clues to go by. In these cases we request you to add a
Loading history...
|
|||
36 | { |
||
37 | return $this->enabled; |
||
38 | } |
||
39 | |||
40 | /** |
||
41 | * @return mixed |
||
42 | */ |
||
43 | public function getClientId() |
||
44 | { |
||
45 | return $this->clientId; |
||
46 | } |
||
47 | } |
||
48 |
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.