| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 64 | public function getMapping() |
||
| 65 | { |
||
| 66 | if (empty($this->mapping)) { |
||
| 67 | /** @var AbstractMappingProvider $mappingProvider */ |
||
| 68 | $mappingProvider = \Yii::createObject('opus\elastic\spooler\AbstractMappingProvider'); |
||
| 69 | $attributes = $mappingProvider->build($this->languages); |
||
| 70 | |||
| 71 | $this->mapping = [ |
||
| 72 | $this->getTypeName() => $attributes |
||
| 73 | ]; |
||
| 74 | } |
||
| 75 | return $this->mapping; |
||
| 76 | |||
| 77 | } |
||
| 78 | |||
| 85 |
Adding explicit visibility (
private,protected, orpublic) is generally recommend to communicate to other developers how, and from where this method is intended to be used.