Completed
Push — master ( 7e98cc...2d9b54 )
by ARCANEDEV
10s
created

HashEmail   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 19
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A hashEmail() 0 4 1
1
<?php namespace Arcanedev\Gravatar\Concerns;
2
3
/**
4
 * Trait     HashEmail
5
 *
6
 * @package  Arcanedev\Gravatar\Concerns
7
 * @author   ARCANEDEV <[email protected]>
8
 */
9
trait HashEmail
10
{
11
    /* -----------------------------------------------------------------
12
     |  Main Methods
13
     | -----------------------------------------------------------------
14
     */
15
16
    /**
17
     * Get a hashed email.
18
     *
19
     * @param  string  $email
20
     *
21
     * @return string
22
     */
23 36
    public static function hashEmail($email)
24
    {
25 36
        return hash('md5', strtolower(trim($email)));
26
    }
27
}
28