Completed
Push — master ( 8cd137...5bbfdc )
by recca
07:09
created

FileModel::initializeTable()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 1
dl 0
loc 6
ccs 4
cts 4
cp 1
crap 1
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace Recca0120\Repository;
4
5
abstract class FileModel extends SqliteModel
6
{
7
    /**
8
     * loadFromResource.
9
     *
10
     * @return \Illuminate\Support\Collection
11
     */
12
    abstract protected function loadFromResource();
13
14
    /**
15
     * initializeTable.
16
     *
17
     * @param $table
18
     * @return void
19
     */
20
    protected function initializeTable($table)
0 ignored issues
show
Unused Code introduced by
The parameter $table is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
21
    {
22 1
        $this->loadFromResource()->chunk(10)->each(function ($items) {
23 1
            $this->newQuery()->insert($items->toArray());
24 1
        });
25 1
    }
26
}
27