ConnectionFailed   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
1
<?php
2
/**
3
 * Caridea
4
 *
5
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
 * use this file except in compliance with the License. You may obtain a copy of
7
 * the License at
8
 *
9
 * http://www.apache.org/licenses/LICENSE-2.0
10
 *
11
 * Unless required by applicable law or agreed to in writing, software
12
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
 * License for the specific language governing permissions and limitations under
15
 * the License.
16
 *
17
 * @copyright 2015-2018 LibreWorks contributors
18
 * @license   Apache-2.0
19
 */
20
namespace Caridea\Auth\Exception;
21
22
/**
23
 * Exception for the inability to connect to the credentials source.
24
 *
25
 * This exception should be used when a failure occurs in connecting to some
26
 * source repository, such as a database, an LDAP directory, or an IMAP server.
27
 *
28
 * @copyright 2015-2018 LibreWorks contributors
29
 * @license   Apache-2.0
30
 */
31
class ConnectionFailed extends \RuntimeException implements \Caridea\Auth\Exception
32
{
33
    /**
34
     * Creates a new exception
35
     *
36
     * @param \Exception $previous Optional preceding exception
37
     */
38 2
    public function __construct(\Exception $previous = null)
39
    {
40 2
        parent::__construct("Cannot read from source data", 0, $previous);
41 2
    }
42
}
43