Passed
Push — sudav3 ( b29c56...468d62 )
by 世昌
02:20
created

TableStructMiddleware   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getFieldName() 0 3 1
1
<?php
2
namespace suda\orm\struct;
3
4
use ReflectionProperty;
5
use suda\orm\middleware\ObjectMiddleware;
6
7
/**
8
 * 结构中间件
9
 */
10
class TableStructMiddleware extends ObjectMiddleware
11
{
12
    /**
13
     * 获取字段名
14
     *
15
     * @param ReflectionProperty $property
16
     * @return string
17
     */
18
    protected function getFieldName(ReflectionProperty $property)
19
    {
20
        return TableStructBuilder::getFieldName($property);
21
    }
22
}
23