| Conditions | 2 |
| Paths | 2 |
| Total Lines | 20 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 2.108 |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | 3 | public function storeGeoJson( string $geoJson ) { |
|
| 30 | // $this->parserData->getSemanticData()->addPropertyObjectValue( |
||
| 31 | // new DIProperty( 'HasNumber' ), |
||
| 32 | // new \SMWDINumber( 44 ) |
||
| 33 | // ); |
||
| 34 | |||
| 35 | 3 | foreach ( $this->subObjectBuilder->getSubObjectsFromGeoJson( $geoJson ) as $subObject ) { |
|
| 36 | $this->parserData->getSemanticData()->addPropertyObjectValue( |
||
| 37 | new DIProperty( DIProperty::TYPE_SUBOBJECT ), |
||
| 38 | new SMWDIContainer( $subObject->toContainerSemanticData( $this->subjectPage->getTitleValue() ) ) |
||
| 39 | ); |
||
| 40 | } |
||
| 41 | |||
| 42 | 3 | $this->parserData->copyToParserOutput(); |
|
| 43 | |||
| 44 | 3 | $this->smwEventDispatcher->dispatch( |
|
| 45 | 3 | 'InvalidateEntityCache', |
|
| 46 | 3 | [ 'title' => $this->subjectPage, 'context' => 'GeoJsonContent' ] |
|
| 47 | ); |
||
| 48 | 3 | } |
|
| 49 | |||
| 51 |