InvalidArgumentException   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A invalidNumeric() 0 4 1
1
<?php
2
/*
3
 * This file is part of the Borobudur-Config package.
4
 *
5
 * (c) Hexacodelabs <http://hexacodelabs.com>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace Borobudur\Config\Exception;
12
13
/**
14
 * @author      Iqbal Maulana <[email protected]>
15
 * @created     8/10/15
16
 */
17
class InvalidArgumentException extends \InvalidArgumentException
18
{
19
    /**
20
     * Invalid numeric exception.
21
     *
22
     * @param string $name
23
     * @param mixed  $value
24
     *
25
     * @return self
26
     */
27
    public static function invalidNumeric($name, $value)
28
    {
29
        return new self(sprintf('Value for "%s" should be numeric, "%s" given.', $name, gettype($value)));
30
    }
31
}
32