GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

BaseTestCase::compile()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 2
1
<?php
2
3
namespace JMS\TwigJsBundle\Tests\TwigJs\Compiler;
4
5
use TwigJs\JsCompiler;
6
7
abstract class BaseTestCase extends \PHPUnit_Framework_TestCase
8
{
9
    /**
10
     * @var \Twig_Environment
11
     */
12
    protected $env;
13
14
    /**
15
     * @var JsCompiler
16
     */
17
    protected $compiler;
18
19
    /**
20
     * @param string $source
21
     * @param string|null $name
22
     * @return string
23
     */
24
    protected function compile($source, $name = null)
25
    {
26
        return $this->env->compileSource($source, $name);
27
    }
28
29
    /**
30
     * @param string $source
31
     * @param string|null $name
32
     * @return \Twig_Node_Module
33
     */
34
    protected function getNodes($source, $name = null)
35
    {
36
        return $this->env->parse($this->env->tokenize($source, $name));
37
    }
38
39
    /**
40
     * {@inheritdoc}
41
     */
42
    protected function setUp()
43
    {
44
        $this->env = $env = new \Twig_Environment();
45
        $env->addExtension(new \Twig_Extension_Core());
46
        $env->setCompiler($this->compiler = new JsCompiler($env));
47
    }
48
}
49