NotImportableException::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 5
nc 1
nop 3
1
<?php
2
3
namespace Saxulum\ModelImporter;
4
5
class NotImportableException extends \Exception
6
{
7
    const ACTION_CREATE = 'create';
8
    const ACTION_UPDATE = 'update';
9
    const ACTION_PERSIST = 'persist';
10
11
    /**
12
     * @param string          $action
13
     * @param int             $code
14
     * @param \Exception|null $previous
15
     */
16
    public function __construct($action, $code = 0, \Exception $previous = null)
17
    {
18
        parent::__construct(
19
            sprintf('Model with identifier {identifier} is not importable, cause %s failed', $action),
20
            $code,
21
            $previous
22
        );
23
    }
24
}
25