Completed
Push — master ( 14f2a3...e42cf7 )
by Iman
10:04
created

InputNormalizer::normalizeInput()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 1
nc 2
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Imanghafoori\HeyMan\Normilizers;
4
5
trait InputNormalizer
6
{
7
    /**
8
     * @param $url
9
     *
10
     * @return array
11
     */
12
    private function normalizeInput(array $url): array
13
    {
14
        return is_array($url[0]) ? $url[0] : $url;
15
    }
16
}