Completed
Push — master ( c49337...a3b85d )
by Elf
05:13
created

helpers.php ➔ optimus_decode()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
ccs 0
cts 1
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
if (! function_exists('optimus_encode')) {
4
    /**
5
     * Encode a number with Optimus.
6
     *
7
     * @param  int  $number
8
     * @return int
9
     */
10
    function optimus_encode($number)
11
    {
12
        return app('optimus')->encode($number);
13
    }
14
}
15
16
if (! function_exists('optimus_decode')) {
17
    /**
18
     * Decode a number with Optimus.
19
     *
20
     * @param  int  $number
21
     * @return int
22
     */
23
    function optimus_decode($number)
24
    {
25
        return app('optimus')->decode($number);
26
    }
27
}
28