EmptyException   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 5
dl 0
loc 14
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A cannotAccessWhenEmpty() 0 6 1
1
<?php namespace Mbh\Exceptions;
2
3
/**
4
 * MBHFramework
5
 *
6
 * @link      https://github.com/MBHFramework/mbh-framework
7
 * @copyright Copyright (c) 2017 Ulises Jeremias Cornejo Fandos
8
 * @license   https://github.com/MBHFramework/mbh-framework/blob/master/LICENSE (MIT License)
9
 */
10
11
use UnderflowException;
12
13
/**
14
 *
15
 * @package structures
16
 * @author Ulises Jeremias Cornejo Fandos <[email protected]>
17
 */
18
class EmptyException extends UnderflowException
19
{
20
    /**
21
     * @param string $class
22
     * @param string $method
23
     *
24
     * @return static
25
     */
26
    public static function cannotAccessWhenEmpty($class, $method)
27
    {
28
        return new static(sprintf(
29
            '`%s` cannot be called when the `%s` structure is empty',
30
            $method,
31
            $class
32
        ));
33
    }
34
}
35