Revision   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 6
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 3
c 1
b 0
f 1
dl 0
loc 6
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A getRevisionTable() 0 4 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace aspirantzhang\octopusRevision\traits;
6
7
use think\facade\Config;
8
9
trait Revision
10
{
11
    public function getRevisionTable()
12
    {
13
        $this->loadModelConfig();
0 ignored issues
show
Bug introduced by
It seems like loadModelConfig() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

13
        $this->/** @scrutinizer ignore-call */ 
14
               loadModelConfig();
Loading history...
14
        return Config::get($this->getModelName() . '.revisionTable') ?: [];
0 ignored issues
show
Bug introduced by
It seems like getModelName() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

14
        return Config::get($this->/** @scrutinizer ignore-call */ getModelName() . '.revisionTable') ?: [];
Loading history...
15
    }
16
}
17