Failed Conditions
Push — drone-ci ( 0bc55b...0254d4 )
by Michael
50:57
created

OCI8Exception::fromErrorInfo()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 3
ccs 0
cts 3
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 1
crap 2
1
<?php
2
3
namespace Doctrine\DBAL\Driver\OCI8;
4
5
use Doctrine\DBAL\Driver\AbstractDriverException;
6
7
class OCI8Exception extends AbstractDriverException
8
{
9
    /**
10
     * @param mixed[] $error
11
     *
12
     * @return \Doctrine\DBAL\Driver\OCI8\OCI8Exception
13
     */
14
    public static function fromErrorInfo($error)
15
    {
16
        return new self($error['message'], null, $error['code']);
17
    }
18
}
19