Scrutinizer fixes
This commit is contained in:
parent
0b79ac3596
commit
285a132d35
@ -15,7 +15,7 @@ class HummingbirdAuth {
|
||||
/**
|
||||
* Anime API Model
|
||||
*
|
||||
* @var AnimeModel
|
||||
* @var \Aviat\AnimeClient\Model\API
|
||||
*/
|
||||
protected $model;
|
||||
|
||||
@ -48,7 +48,8 @@ class HummingbirdAuth {
|
||||
*/
|
||||
public function authenticate($password)
|
||||
{
|
||||
$username = $this->config->get('hummingbird_username');
|
||||
$username = $this->container->get('config')
|
||||
->get('hummingbird_username');
|
||||
$auth_token = $this->model->authenticate($username, $password);
|
||||
|
||||
if (FALSE !== $auth_token)
|
||||
|
@ -84,10 +84,8 @@ class Config {
|
||||
{
|
||||
$this->map->set($key, $value);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new InvalidArgumentException("Key must be integer, string, or array, and cannot be empty");
|
||||
}
|
||||
else throw
|
||||
new InvalidArgumentException("Key must be integer, string, or array, and cannot be empty");
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
@ -9,7 +9,6 @@ use Aviat\Ion\Di\ContainerInterface;
|
||||
use Aviat\AnimeClient\Controller as BaseController;
|
||||
use Aviat\AnimeClient\Hummingbird\Enum\AnimeWatchingStatus;
|
||||
use Aviat\AnimeClient\Model\Anime as AnimeModel;
|
||||
use Aviat\AnimeClient\Model\AnimeCollection as AnimeCollectionModel;
|
||||
|
||||
/**
|
||||
* Controller for Anime-related pages
|
||||
@ -22,12 +21,6 @@ class Anime extends BaseController {
|
||||
*/
|
||||
protected $model;
|
||||
|
||||
/**
|
||||
* The anime collection model
|
||||
* @var object $collection_model
|
||||
*/
|
||||
private $collection_model;
|
||||
|
||||
/**
|
||||
* Data to ve sent to all routes in this controller
|
||||
* @var array $base_data
|
||||
@ -44,7 +37,6 @@ class Anime extends BaseController {
|
||||
parent::__construct($container);
|
||||
|
||||
$this->model = new AnimeModel($container);
|
||||
$this->collection_model = new AnimeCollectionModel($container);
|
||||
$this->base_data = array_merge($this->base_data, [
|
||||
'menu_name' => 'anime_list',
|
||||
'message' => '',
|
||||
|
@ -53,7 +53,7 @@ class Anime extends API {
|
||||
'body' => $data
|
||||
]);
|
||||
|
||||
return json_decode($result->getBody(), TRUE);
|
||||
return json_decode($response->getBody(), TRUE);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -44,7 +44,7 @@ class AnimeCollection extends DB {
|
||||
{
|
||||
if ( ! file_exists($db_file_name))
|
||||
{
|
||||
$this->valid_data = FALSE;
|
||||
$this->valid_database = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user