TranslationsNotFoundException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 13 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace steevanb\DevBundle\Exception;
6
7
class TranslationsNotFoundException extends \Exception
8
{
9
    public function __construct(array $messages)
10
    {
11
        $missings = array();
12
        foreach ($messages as $message) {
13
            $missing = '[ id : ' . $message['id'] . ', ';
14
            $missing .= 'domain : ' . $message['domain'] . ', ';
15
            $missing .= 'locale : ' . $message['locale'] . ' ]';
16
17
            $missings[] = $missing;
18
        }
19
20
        parent::__construct('Translations not found : ' . implode(', ', $missings));
21
    }
22
}
23