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

HashidsIntegerDriver   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 15
rs 10
c 1
b 0
f 0
wmc 1
lcom 0
cbo 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A decode() 0 6 1
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