@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | /** |
| 84 | 84 | * Specifies the expressions to select. |
| 85 | 85 | * |
| 86 | - * @param string|string[] $expressions |
|
| 86 | + * @param string $expressions |
|
| 87 | 87 | * @return self |
| 88 | 88 | * @throws InvalidArgumentException |
| 89 | 89 | * @throws RuntimeException |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | * |
| 103 | 103 | * @since 0.3 |
| 104 | 104 | * |
| 105 | - * @param string|string[] $expressions |
|
| 105 | + * @param string $expressions |
|
| 106 | 106 | * @return self |
| 107 | 107 | * @throws InvalidArgumentException |
| 108 | 108 | * @throws RuntimeException |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | * |
| 123 | 123 | * @since 0.3 |
| 124 | 124 | * |
| 125 | - * @param string|string[] $expressions |
|
| 125 | + * @param string $expressions |
|
| 126 | 126 | * @return self |
| 127 | 127 | * @throws InvalidArgumentException |
| 128 | 128 | * @throws RuntimeException |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | * |
| 143 | 143 | * @since 0.4 |
| 144 | 144 | * |
| 145 | - * @param string|string[] $expressions |
|
| 145 | + * @param string $expressions |
|
| 146 | 146 | * @return self |
| 147 | 147 | * @throws InvalidArgumentException |
| 148 | 148 | * @throws RuntimeException |
@@ -160,6 +160,9 @@ discard block |
||
| 160 | 160 | return $this; |
| 161 | 161 | } |
| 162 | 162 | |
| 163 | + /** |
|
| 164 | + * @param string $queryForm |
|
| 165 | + */ |
|
| 163 | 166 | private function setQueryForm( $queryForm ) { |
| 164 | 167 | if ( $this->queryForm !== null ) { |
| 165 | 168 | throw new RuntimeException( 'Query type is already set to ' . $this->queryForm ); |
@@ -251,7 +254,7 @@ discard block |
||
| 251 | 254 | * |
| 252 | 255 | * @since 0.3 |
| 253 | 256 | * |
| 254 | - * @param string|GraphBuilder $subject |
|
| 257 | + * @param GraphBuilder $subject |
|
| 255 | 258 | * @param string|null $predicate |
| 256 | 259 | * @param string|null $object |
| 257 | 260 | * @return self |
@@ -283,7 +286,7 @@ discard block |
||
| 283 | 286 | * |
| 284 | 287 | * @since 0.3 |
| 285 | 288 | * |
| 286 | - * @param GraphBuilder|GraphBuilder[] $graphs |
|
| 289 | + * @param GraphBuilder $graphs |
|
| 287 | 290 | * @return self |
| 288 | 291 | * @throws InvalidArgumentException |
| 289 | 292 | */ |
@@ -327,7 +330,7 @@ discard block |
||
| 327 | 330 | /** |
| 328 | 331 | * Sets the GROUP BY modifier. |
| 329 | 332 | * |
| 330 | - * @param string|string[] $expressions |
|
| 333 | + * @param string $expressions |
|
| 331 | 334 | * @return self |
| 332 | 335 | * @throws InvalidArgumentException |
| 333 | 336 | */ |
@@ -68,6 +68,9 @@ |
||
| 68 | 68 | return $result['results']; |
| 69 | 69 | } |
| 70 | 70 | |
| 71 | + /** |
|
| 72 | + * @param string $query |
|
| 73 | + */ |
|
| 71 | 74 | private function getResult( $query ) { |
| 72 | 75 | $result = $this->http->request( $this->url, array( |
| 73 | 76 | $this->options['queryParam'] => $query, |
@@ -58,6 +58,9 @@ |
||
| 58 | 58 | return strtr( implode( $this->formattedParts ), $this->replacements ); |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | + /** |
|
| 62 | + * @param string $string |
|
| 63 | + */ |
|
| 61 | 64 | private function split( $string ) { |
| 62 | 65 | return preg_split( |
| 63 | 66 | '/(\W)/', |
@@ -93,10 +93,16 @@ |
||
| 93 | 93 | $this->definedPrefixes = array_merge( $this->definedPrefixes, $prefixes ); |
| 94 | 94 | } |
| 95 | 95 | |
| 96 | + /** |
|
| 97 | + * @param string $expression |
|
| 98 | + */ |
|
| 96 | 99 | private function matchVariables( $expression ) { |
| 97 | 100 | return $this->regexHelper->getMatches( '(^|\W)(?<!AS )\{variable}', $expression, 2 ); |
| 98 | 101 | } |
| 99 | 102 | |
| 103 | + /** |
|
| 104 | + * @param string $expression |
|
| 105 | + */ |
|
| 100 | 106 | private function matchPrefixes( $expression ) { |
| 101 | 107 | return $this->regexHelper->getMatches( '(^|\W)(\{prefix}):\{name}', $expression, 2 ); |
| 102 | 108 | } |