Completed
Push — master ( 4677af...c41001 )
by Elf
07:36
created

HashidsIntegerDriver::decode()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
nc 1
nop 1
dl 0
loc 6
rs 9.4285
c 1
b 0
f 0
1
<?php
2
3
namespace ElfSundae\Laravel\Hashid;
4
5
class HashidsIntegerDriver extends HashidsDriver
6
{
7
    /**
8
     * Decode the data.
9
     *
10
     * @param  mixed  $data
11
     * @return int
12
     */
13
    public function decode($data)
14
    {
15
        $result = parent::decode($data);
16
17
        return (int) reset($result);
18
    }
19
}
20