Completed
Push — master ( 72d645...a1ccb9 )
by Mr
03:56 queued 41s
created

TypeHelper::checkIfTypeMismatch()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

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
nc 1
nop 3
crap 1
1
<?php
2
3
namespace RouterOS\Helpers;
4
5
/**
6
 * Class TypeHelper
7
 *
8
 * @package RouterOS\Helpers
9
 * @since   0.7
10
 */
11
class TypeHelper
12
{
13
    /**
14
     * Compare data types of some value
15
     *
16
     * @param   string $name     Name of value
17
     * @param   mixed  $whatType What type has value
18
     * @param   mixed  $isType   What type should be
19
     * @return  bool
20
     */
21 9
    public static function checkIfTypeMismatch(string $name, $whatType, $isType): bool
0 ignored issues
show
Unused Code introduced by
The parameter $name is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
22
    {
23 9
        return ($whatType !== $isType);
24
    }
25
}
26