Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Completed
Pull Request — master (#265)
by Jérémiah
23:39 queued 10:37
created

NewObjectTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 12
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getFunctions() 0 4 1
A testNewObject() 0 4 1
1
<?php
2
3
namespace Overblog\GraphQLBundle\Tests\ExpressionLanguage\ExpressionFunction;
4
5
use Overblog\GraphQLBundle\ExpressionLanguage\ExpressionFunction\NewObject;
6
use Overblog\GraphQLBundle\Tests\ExpressionLanguage\TestCase;
7
8
class NewObjectTest extends TestCase
9
{
10
    protected function getFunctions()
11
    {
12
        return [new NewObject()];
13
    }
14
15
    public function testNewObject()
16
    {
17
        $this->assertInstanceOf('stdClass', eval('return '.$this->expressionLanguage->compile(sprintf('newObject("%s")', 'stdClass')).';'));
0 ignored issues
show
Coding Style introduced by
It is generally not recommended to use eval unless absolutely required.

On one hand, eval might be exploited by malicious users if they somehow manage to inject dynamic content. On the other hand, with the emergence of faster PHP runtimes like the HHVM, eval prevents some optimization that they perform.

Loading history...
18
    }
19
}
20