Completed
Push — master ( 3d6a71...4fcc05 )
by Peter
05:12
created

OutOfRangeException::out()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 2
crap 1
1
<?php
2
/**
3
 * GpsLab component.
4
 *
5
 * @author    Peter Gribanov <[email protected]>
6
 * @copyright Copyright (c) 2011, Peter Gribanov
7
 * @license   http://opensource.org/licenses/MIT
8
 */
9
10
namespace GpsLab\Bundle\PaginationBundle\Exception;
11
12
class OutOfRangeException extends \OutOfRangeException
13
{
14
    /**
15
     * @param int $current_page
16
     * @param int $total_pages
17
     *
18
     * @return static
19
     */
20 1
    public static function out($current_page, $total_pages)
21
    {
22 1
        return new static(sprintf('Select page "%s" is out of range "%s".', $current_page, $total_pages));
23
    }
24
}
25