Completed
Push — master ( b87405...9bfa56 )
by Aleksandar
09:20
created

SimpleArrayLibrary::insertSubArray()   D

Complexity

Conditions 9
Paths 7

Size

Total Lines 28
Code Lines 17

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 28
rs 4.909
cc 9
eloc 17
nc 7
nop 4
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
}