Completed
Push — master ( fc3d6f...f7b1d9 )
by Sergi Tur
28:05
created

src/Console/HasEmail.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
namespace Acacha\AdminLTETemplateLaravel\Console;
4
5
/**
6
 * Class HasEmail.
7
 *
8
 * @package Acacha\AdminLTETemplateLaravel\Console
9
 */
10
trait HasEmail
11
{
12
    /**
13
     * Obtain admin email.
14
     *
15
     * @return bool|string
16
     */
17
    protected function email()
18
    {
19
        if (($email = env('ADMIN_EMAIL', null)) != null) {
20
            return $email;
21
        }
22
23
        if (($email = git_user_email()) != null) {
0 ignored issues
show
Are you sure the assignment to $email is correct as git_user_email() seems to always returns null.
Loading history...
24
            return $email;
25
        }
26
27
        return "[email protected]";
28
    }
29
}
30