ContainerNotEmpty   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 4
Bugs 1 Features 0
Metric Value
wmc 1
c 4
b 1
f 0
lcom 0
cbo 1
dl 0
loc 19
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
1
<?php
2
/**
3
 * For the full copyright and license information, please view the LICENSE
4
 * file that was distributed with this source code.
5
 *
6
 * @author Nikita Vershinin <[email protected]>
7
 * @license MIT
8
 */
9
namespace OpenStackStorage\Exceptions;
10
11
/**
12
 * Raised when attempting to delete a container that still contains objects.
13
 */
14
class ContainerNotEmpty extends Error
15
{
16
17
    /**
18
     * The class constructor.
19
     *
20
     * @param string     $containerName
21
     * @param integer    $code
22
     * @param \Exception $previous
23
     */
24
    public function __construct($containerName, $code = 0, \Exception $previous = null)
25
    {
26
        parent::__construct(
27
            'Cannot delete non-empty container ' . $containerName,
28
            $code,
29
            $previous
30
        );
31
    }
32
}
33