Completed
Push — master ( 437363...c9c204 )
by Jakub
02:12
created

Numbers   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 8
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A range() 0 2 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Nexendrie\Utils;
5
6
/**
7
 * Numbers
8
 *
9
 * @author Jakub Konečný
10
 */
11 1
class Numbers {
12 1
  use \Nette\StaticClass;
13
  
14
  /**
15
   * Ensure that a number is within boundaries
16
   */
17
  public static function range(int $number, int $min, int $max): int {
18 1
    return min(max($number, $min), $max);
19
  }
20
}
21
?>