Scrutinizer fixes

This commit is contained in:
Timothy Warren 2015-10-16 12:53:55 -04:00
parent 23122964d2
commit f22015635e
5 changed files with 8 additions and 17 deletions

View File

@ -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)

View File

@ -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;
}

View File

@ -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' => '',

View File

@ -53,7 +53,7 @@ class Anime extends API {
'body' => $data
]);
return json_decode($result->getBody(), TRUE);
return json_decode($response->getBody(), TRUE);
}
/**

View File

@ -44,7 +44,7 @@ class AnimeCollection extends DB {
{
if ( ! file_exists($db_file_name))
{
$this->valid_data = FALSE;
$this->valid_database = FALSE;
}
else
{