| Conditions | 3 |
| Paths | 4 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | 16 | public function __construct(ObjectManager $em, TokenStorageInterface $user) |
|
| 19 | { |
||
| 20 | 16 | $matches = array(); |
|
| 21 | 16 | $controllo = new \ReflectionClass(get_class($this)); |
|
| 22 | |||
| 23 | 16 | preg_match('/(.*)\\\(.*)\\\Controller\\\(.*)Controller/', $controllo->name, $matches); |
|
| 24 | 16 | if (count($matches) == 0) { |
|
| 25 | 9 | preg_match('/(.*)(.*)\\\Controller\\\(.*)Controller/', $controllo->name, $matches); |
|
| 26 | } |
||
| 27 | |||
| 28 | 16 | $this->bundle = ($matches[count($matches) - 2] ? $matches[count($matches) - 2] : $matches[count($matches) - 3]); |
|
| 29 | 16 | $this->controller = $matches[count($matches) - 1]; |
|
| 30 | 16 | $this->permessi = new PermessiUtils($em, $this->getController(), $user->getToken()->getUser()); |
|
| 31 | 16 | } |
|
| 45 |