Passed
Push — master ( a325c0...46b506 )
by 世昌
02:20
created

ObjectMiddlewareTrait   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 5
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 5
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A createMiddleware() 0 3 1
1
<?php
2
namespace suda\orm\middleware;
3
4
use suda\orm\TableStruct;
5
use suda\orm\middleware\Middleware;
6
use suda\orm\middleware\ObjectMiddleware;
7
8
/**
9
 * 感知表结构
10
 */
11
trait ObjectMiddlewareTrait
12
{
13
    public static function createMiddleware(TableStruct $struct):Middleware
1 ignored issue
show
Unused Code introduced by
The parameter $struct is not used and could be removed. ( Ignorable by Annotation )

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

13
    public static function createMiddleware(/** @scrutinizer ignore-unused */ TableStruct $struct):Middleware

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

Loading history...
14
    {
15
        return new ObjectMiddleware(static::class);
16
    }
17
}
18