@@ -129,6 +129,10 @@ |
||
| 129 | 129 | $resource->image->name = $image->getTitle(); |
| 130 | 130 | } |
| 131 | 131 | |
| 132 | + /** |
|
| 133 | + * @param string $image |
|
| 134 | + * @param string $target |
|
| 135 | + */ |
|
| 132 | 136 | private function newViewAction(array $nameTerms, $image, $target) { |
| 133 | 137 | $actionResource = new stdClass(); |
| 134 | 138 | $actionResource->{'@type'} = 'ViewAction'; |
@@ -58,6 +58,9 @@ |
||
| 58 | 58 | return $this->entityIdsToEntityIdValues($this->getEntityIdsForValue($value)); |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | + /** |
|
| 62 | + * @param string $value |
|
| 63 | + */ |
|
| 61 | 64 | private function getEntityIdsForValue($value) { |
| 62 | 65 | $languageCode = $this->getOption(ValueParser::OPT_LANG); |
| 63 | 66 | $term = new Term($languageCode, $value); |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | } else { |
| 37 | 37 | try { |
| 38 | 38 | $annotated[] = $this->annotateResourceNode($resource, $type); |
| 39 | - } catch (ParseException $e) { |
|
| 39 | + } catch(ParseException $e) { |
|
| 40 | 40 | //We ignore this value |
| 41 | 41 | } |
| 42 | 42 | } |
@@ -99,6 +99,9 @@ discard block |
||
| 99 | 99 | return $this->formatQueryResult($entityIds); |
| 100 | 100 | } |
| 101 | 101 | |
| 102 | + /** |
|
| 103 | + * @return \Ask\Language\Description\Description |
|
| 104 | + */ |
|
| 102 | 105 | private function buildQueryForNode(AbstractNode $node) { |
| 103 | 106 | if($node instanceof UnionNode) { |
| 104 | 107 | return $this->buildQueryForUnion($node); |
@@ -205,6 +208,9 @@ discard block |
||
| 205 | 208 | ); |
| 206 | 209 | } |
| 207 | 210 | |
| 211 | + /** |
|
| 212 | + * @return \Ask\Language\Description\Description |
|
| 213 | + */ |
|
| 208 | 214 | private function buildValueDescriptionsForObjects(ResourceListNode $objectList) { |
| 209 | 215 | $valueDescriptions = array(); |
| 210 | 216 | |
@@ -65,7 +65,7 @@ |
||
| 65 | 65 | } catch(OutOfBoundsException $e) { |
| 66 | 66 | try { |
| 67 | 67 | return $item->getFingerprint()->getLabel($this->getOption(ValueFormatter::OPT_LANG))->getText(); |
| 68 | - } catch (OutOfBoundsException $e) { |
|
| 68 | + } catch(OutOfBoundsException $e) { |
|
| 69 | 69 | throw new FormattingException('No unit symbol and no label for IRI ' . $value); |
| 70 | 70 | } |
| 71 | 71 | } |
@@ -23,11 +23,11 @@ |
||
| 23 | 23 | FormatterOptions $options = null, |
| 24 | 24 | ValueFormatter $formatter = null |
| 25 | 25 | ) { |
| 26 | - if ( $formatter === null ) { |
|
| 27 | - $formatter = $this->getInstance( $options ); |
|
| 26 | + if($formatter === null) { |
|
| 27 | + $formatter = $this->getInstance($options); |
|
| 28 | 28 | } |
| 29 | 29 | |
| 30 | - $this->assertEquals( $expected, $formatter->format( $value ) ); |
|
| 30 | + $this->assertEquals($expected, $formatter->format($value)); |
|
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | } |