Conditions | 4 |
Paths | 3 |
Total Lines | 17 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
16 | protected function expandAlias($key) |
||
17 | { |
||
18 | $aliased = $this->getAliasedObject(); |
||
|
|||
19 | |||
20 | if (is_object($aliased) || ! empty(static::OBJECT_TYPE)) { |
||
21 | /** |
||
22 | * Automatically alias shorthand syntax for type_name |
||
23 | * Eg: 'post_content' is aliased to 'content' |
||
24 | */ |
||
25 | $expanded = static::OBJECT_TYPE . '_' . $key; |
||
26 | |||
27 | if (property_exists($aliased, $expanded)) { |
||
28 | return $expanded; |
||
29 | } |
||
30 | } |
||
31 | |||
32 | return parent::expandAlias($key); |
||
33 | } |
||
35 |