Completed
Push — master ( 29a805...bdeb81 )
by Eugene
06:00
created

ConnectionFailed   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 7
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A fromUriAndReason() 0 4 1
1
<?php
2
3
/**
4
 * This file is part of the Tarantool Client package.
5
 *
6
 * (c) Eugene Leonovich <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
14
namespace Tarantool\Client\Exception;
15
16
final class ConnectionFailed extends \RuntimeException
17
{
18
    public static function fromUriAndReason(string $uri, string $reason) : self
19
    {
20
        throw new self(\sprintf('Failed to connect to %s: %s', $uri, $reason));
21
    }
22
}
23