Passed
Pull Request — master (#259)
by Arnaud
08:22
created

ClassNotSupportedException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
eloc 3
c 1
b 1
f 0
dl 0
loc 5
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
namespace LAG\AdminBundle\Exception\DataHandler;
4
5
use Exception;
6
use LAG\AdminBundle\DataProvider\DataSourceInterface;
7
8
class ClassNotSupportedException extends Exception
9
{
10
    public function __construct(DataSourceInterface $dataSource)
11
    {
12
        parent::__construct(sprintf(
13
            'The data of type "%s" is not supported by any data handlers',
14
            get_class($dataSource->getData())
15
        ));
16
    }
17
}
18