Completed
Push — master ( e176fb...1749e7 )
by Tim
05:08 queued 05:03
created

StrngIndexOutOfBoundsException::forIndex()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
/**
4
 * \AppserverIo\Lang\StrngIndexOutOfBoundsException
5
 *
6
 * NOTICE OF LICENSE
7
 *
8
 * This source file is subject to the Open Software License (OSL 3.0)
9
 * that is available through the world-wide-web at this URL:
10
 * http://opensource.org/licenses/osl-3.0.php
11
 *
12
 * PHP version 5
13
 *
14
 * @author    Tim Wagner <[email protected]>
15
 * @copyright 2015 TechDivision GmbH <[email protected]>
16
 * @license   http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
17
 * @link      https://github.com/appserver-io/lang
18
 * @link      http://www.appserver.io
19
 */
20
21
namespace AppserverIo\Lang;
22
23
/**
24
 * Thrown to indicate that the application has attempted to convert
25
 * a string to one of the numeric types, but that the string does not
26
 * have the appropriate format.
27
 *
28
 * @author    Tim Wagner <[email protected]>
29
 * @copyright 2015 TechDivision GmbH <[email protected]>
30
 * @license   http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
31
 * @link      https://github.com/appserver-io/lang
32
 * @link      http://www.appserver.io
33
 */
34
class StrngIndexOutOfBoundsException extends \Exception
35
{
36
37
    /**
38
     * Constructs a new <code>StrngIndexOutOfBoundsException</code>
39
     * class with an argument indicating the illegal index.
40
     *
41
     * @param integer $index The illegal index
42
     *
43
     * @return void
44
     * @throws StrngIndexOutOfBoundsException
45
     */
46
    public static function forIndex($index)
47
    {
48
        throw new StrngIndexOutOfBoundsException('String index out of range: ' . $index);
49
    }
50
}
51