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

TypeHelper   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 15
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A checkIfTypeMismatch() 0 4 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