SimpleArrayLibrary   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 5

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 5
dl 0
loc 23
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A isLogicallyCastableToInt() 0 4 2
1
<?php
2
3
namespace SimpleArrayLibrary;
4
5
use SimpleArrayLibrary\Categories\Changers;
6
use SimpleArrayLibrary\Categories\Checkers;
7
use SimpleArrayLibrary\Categories\Counters;
8
use SimpleArrayLibrary\Categories\Getters;
9
use SimpleArrayLibrary\Categories\Inspectors;
10
11
class SimpleArrayLibrary
12
{
13
    use Changers, Checkers, Counters, Getters, Inspectors;
14
15
    const TYPE_INT = 'int';
16
    const TYPE_STRING = 'string';
17
    const TYPE_FLOAT = 'float';
18
    const TYPE_BOOL = 'bool';
19
    const TYPE_ARRAY = 'array';
20
    const TYPE_OBJECT = 'object';
21
22
    /**
23
     * Check whether casting a variable to int would conway useful information
24
     *
25
     * @param mixed $input
26
     *
27
     * @return bool
28
     */
29
    private static function isLogicallyCastableToInt($input)
0 ignored issues
show
Unused Code introduced by
This method is not used, and could be removed.
Loading history...
30
    {
31
        return !is_bool($input) && filter_var($input, FILTER_VALIDATE_INT) !== false;
32
    }
33
}