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

TableStructMiddlewareTrait   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\struct;
3
4
use suda\orm\TableStruct;
5
use suda\orm\middleware\Middleware;
6
use suda\orm\struct\TableStructMiddleware;
7
8
/**
9
 * 感知表结构
10
 */
11
trait TableStructMiddlewareTrait
12
{
13
    public static function createMiddleware(TableStruct $struct):Middleware
14
    {
15
        return new TableStructMiddleware(static::class, $struct);
16
    }
17
}
18