ProxyFactoryException   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 11
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A wrap() 0 4 1
1
<?php
2
3
/**
4
 * Spiral Framework. Cycle ProxyFactory
5
 *
6
 * @license MIT
7
 * @author  Valentin V (Vvval)
8
 */
9
10
declare(strict_types=1);
11
12
namespace Cycle\ORM\Promise\Exception;
13
14
use Exception;
15
use Throwable;
16
17
class ProxyFactoryException extends Exception
18
{
19
    /**
20
     * @param Throwable $e
21
     * @return ProxyFactoryException
22
     */
23
    public static function wrap(Throwable $e): self
24
    {
25
        return new self($e->getMessage(), $e->getCode(), $e);
26
    }
27
}
28