Passed
Push — master ( 566a3a...fbef46 )
by 世昌
02:19
created

ObjectMiddlewareTrait   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 10
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\database\middleware;
3
4
use ReflectionException;
5
use suda\database\struct\TableStruct;
6
7
/**
8
 * 感知表结构
9
 */
10
trait ObjectMiddlewareTrait
11
{
12
    /**
13
     * @param TableStruct $struct
14
     * @return Middleware
15
     * @throws ReflectionException
16
     */
17
    public static function createMiddleware(TableStruct $struct):Middleware
18
    {
19
        return new ObjectMiddleware(static::class);
20
    }
21
}
22