FileModel   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 22
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
loadFromResource() 0 1 ?
A initializeTable() 0 6 1
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 1
        $this->loadFromResource()->chunk(10)->each(function ($items) {
23 1
            $this->newQuery()->insert($items->toArray());
24 1
        });
25 1
    }
26
}
27