AbstractModel::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 7
ccs 5
cts 5
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 1
crap 1
1
<?php namespace Arcanedev\LaravelSeo\Models;
2
3
use Arcanedev\LaravelSeo\Seo;
4
use Arcanedev\Support\Database\Model;
5
6
/**
7
 * Class     AbstractModel
8
 *
9
 * @package  Arcanedev\LaravelSeo\Models
10
 * @author   ARCANEDEV <[email protected]>
11
 */
12
abstract class AbstractModel extends Model
13
{
14
    /* -----------------------------------------------------------------
15
     |  Constructor
16
     | -----------------------------------------------------------------
17
     */
18
19
    /**
20
     * Create a new Eloquent model instance.
21
     *
22
     * @param  array  $attributes
23
     */
24 26
    public function __construct(array $attributes = [])
25
    {
26 26
        parent::__construct($attributes);
27
28 26
        $this->setConnection(Seo::getConfig('database.connection', null));
29 26
        $this->setPrefix(Seo::getConfig('database.prefix', 'seo_'));
30 26
    }
31
}
32