EmptyException::cannotAccessWhenEmpty()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
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