DB   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
dl 0
loc 26
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 3

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
1
<?php declare(strict_types=1);
2
/**
3
 * Anime List Client
4
 *
5
 * An API client for Kitsu and MyAnimeList to manage anime and manga watch lists
6
 *
7
 * PHP version 7
8
 *
9
 * @package     AnimeListClient
10
 * @author      Timothy J. Warren <[email protected]>
11
 * @copyright   2015 - 2017  Timothy J. Warren
12
 * @license     http://www.opensource.org/licenses/mit-license.html  MIT License
13
 * @version     4.0
14
 * @link        https://github.com/timw4mail/HummingBirdAnimeClient
15
 */
16
17
namespace Aviat\AnimeClient\Model;
18
19
use Aviat\Ion\Di\ContainerInterface;
20
use Aviat\Ion\Model;
21
22
/**
23
 * Base model for database interaction
24
 */
25
class DB extends Model {
26
	use \Aviat\Ion\Di\ContainerAware;
27
28
	/**
29
	 * The query builder object
30
	 * @var object $db
31
	 */
32
	protected $db;
33
34
	/**
35
	 * The database connection information array
36
	 * @var array $db_config
37
	 */
38
	protected $db_config;
39
40
	/**
41
	 * Constructor
42
	 *
43
	 * @param ContainerInterface $container
44
	 */
45
	public function __construct(ContainerInterface $container)
46
	{
47
		$this->db_config = $container->get('config')->get('database');
48
		$this->setContainer($container);
49
	}
50
}
51
// End of DB.php