Completed
Pull Request — master (#11)
by ARCANEDEV
06:08
created

helpers.php ➔ hasher()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
if ( ! function_exists('hasher')) {
4
    /**
5
     * Get the Hash Manager instance.
6
     *
7
     * @return \Arcanedev\Hasher\Contracts\HashManager
8
     */
9
    function hasher()
10
    {
11
        return app(Arcanedev\Hasher\Contracts\HashManager::class);
12
    }
13
}
14
15
if ( ! function_exists('hash_with')) {
16
    /**
17
     * Get the Hash Driver instance.
18
     *
19
     * @param  string       $option
20
     * @param  string|null  $driver
21
     *
22
     * @return \Arcanedev\Hasher\Contracts\HashDriver
23
     */
24
    function hash_with($option, $driver = null)
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
25
    {
26
        return hasher()->with($option, $driver);
27
    }
28
}
29