Test Failed
Push — master ( f82b48...e7e248 )
by Maximo
03:08
created

api/controllers/AuthController.php (2 issues)

1
<?php
0 ignored issues
show
End of line character is invalid; expected "\n" but found "\r\n"
Loading history...
2
3
declare(strict_types=1);
4
5
namespace Gewaer\Api\Controllers;
6
7
use Exception;
8
use Gewaer\Models\Users;
9
use Gewaer\Models\UserLinkedSources;
10
11
/**
12
 * Base controller
13
 *
14
 */
15
class AuthController extends \Baka\Auth\AuthController
16
{
17
    /**
18
     * Setup for this controller
19
     *
20
     * @return void
21
     */
22
    public function onConstruct()
23
    {
24
        $this->userLinkedSourcesModel = new UserLinkedSources();
25
        $this->userModel = new Users();
26
27
        if (!isset($this->config->jwt)) {
0 ignored issues
show
Bug Best Practice introduced by
The property config does not exist on Gewaer\Api\Controllers\AuthController. Since you implemented __get, consider adding a @property annotation.
Loading history...
28
            throw new Exception('You need to configure your app JWT');
29
        }
30
    }
31
}
32