Completed
Pull Request — master (#5)
by
unknown
02:22 queued 32s
created

FileModel::initializeTable()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 1
dl 0
loc 6
ccs 0
cts 4
cp 0
crap 2
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 string $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
        $this->loadFromResource()->chunk(10)->each(function ($items) {
23
            $this->newQuery()->insert($items->toArray());
24
        });
25
    }
26
}
27