Completed
Push — master ( ba8ed9...770316 )
by Jeroen
06:11
created

AdminBundle/Twig/GoogleSignInTwigExtension.php (3 issues)

usage of deprecated classes, traits and interfaces.

Deprecated Code Minor

Upgrade to new PHP Analysis Engine

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
Deprecated Code introduced by
The class Twig_Extension has been deprecated with message: since Twig 2.7, use "Twig\Extension\AbstractExtension" 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...
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
26
     */
27
    public function getFunctions()
28
    {
29
        return array(
30
            new \Twig_SimpleFunction('google_signin_enabled', array($this, 'isGoogleSignInEnabled')),
0 ignored issues
show
Deprecated Code introduced by
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
Deprecated Code introduced by
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()
36
    {
37
        return $this->enabled;
38
    }
39
40
    /**
41
     * @return mixed
42
     */
43
    public function getClientId()
44
    {
45
        return $this->clientId;
46
    }
47
}
48