Issues (10)

src/traits/Revision.php (2 issues)

Labels
Severity
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
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
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