Completed
Pull Request — master (#22)
by Sergey
14:58
created

ElasticsearchModel::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
namespace Isswp101\Persimmon\Test\Models;
4
5
use Elasticsearch\Client;
6
use Isswp101\Persimmon\DAL\ElasticsearchDAL;
7
use Isswp101\Persimmon\ElasticsearchModel as Model;
8
use Isswp101\Persimmon\Test\Models\Events\DALEmitter;
9
10
class ElasticsearchModel extends Model
11
{
12
    public function __construct(array $attributes = [])
13
    {
14
        $dal = new ElasticsearchDAL($this, app(Client::class), app(DALEmitter::class));
15
16
        parent::__construct($dal, $attributes);
17
    }
18
19
    public static function createInstance()
20
    {
21
        return new static();
22
    }
23
}
24