Completed
Push — master ( 269a50...019c60 )
by Tobias
04:32
created

TestController   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 21
rs 10
c 0
b 0
f 0
1
<?php
2
3
4
namespace App\Controller\Test;
5
6
7
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
8
9
class TestController extends Controller
10
{
11
    public function foo()
12
    {
13
        $foo = [
14
            ['label' => $this->get('translator')->trans('this.should.be.translated.without.errors')], //ERROR: Form label is not a scalar string
15
            [/** @Ignore */'label' => $this->get('translator')->trans('this.should.be.translated.without.errors.and.now.it.works')],
16
            ['label_' => $this->get('translator')->trans('this.works.correctly')],
17
            ['label' => $this->shouldBeIgnored()], //ERROR: Form label is not a scalar string
18
            [/** @Ignore */'label' => $this->shouldBeIgnoredAndGoesWithoutError()],
19
        ];
20
    }
21
22
    private function shouldBeIgnored()
23
    {
24
    }
25
26
    private function shouldBeIgnoredAndGoesWithoutError()
27
    {
28
    }
29
}
30