GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — master ( 3a133f...0c15e3 )
by halfpastfour
01:20 queued 11s
created

NumberUtils   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
dl 0
loc 29
rs 10
c 1
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A recursiveToInt() 0 7 1
A recursiveToFloat() 0 7 1
1
<?php
2
3
namespace Halfpastfour\PHPChartJS\Delegate;
4
5
/**
6
 * Trait NumberUtils
7
 *
8
 * @package Halfpastfour\PHPChartJS\Delegate
9
 */
10
trait NumberUtils
11
{
12
13
    /**
14
     * @param array $input
15
     *
16
     * @return array
17
     */
18
    public function recursiveToFloat(array $input)
19
    {
20
        array_walk_recursive($input, function (&$value) {
21
            $value = floatval($value);
22
        });
23
24
        return $input;
25
    }
26
27
    /**
28
     * @param array $input
29
     *
30
     * @return array
31
     */
32
    public function recursiveToInt(array $input)
33
    {
34
        array_walk_recursive($input, function (&$value) {
35
            $value = intval($value);
36
        });
37
38
        return $input;
39
    }
40
}
41