Passed
Pull Request — master (#35)
by Akmal
01:51
created

VarHelper   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 9
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A isScalar() 0 3 1
1
<?php declare(strict_types=1);
2
3
namespace OpenEngine\Mika\Core\Helpers;
4
5
class VarHelper
6
{
7
    /**
8
     * @param string $typeName
9
     * @return bool
10
     */
11
    public static function isScalar(string $typeName): bool
12
    {
13
        return \in_array($typeName, ['int', 'string', 'float', 'bool']);
14
    }
15
}
16