@@ -51,6 +51,9 @@ discard block |
||
51 | 51 | $this->addTypeFromImportVocabulary( $property, current( $dataItems ) ); |
52 | 52 | } |
53 | 53 | |
54 | + /** |
|
55 | + * @param DIProperty $property |
|
56 | + */ |
|
54 | 57 | private function addTypeFromImportVocabulary( $property, $dataItem ) { |
55 | 58 | |
56 | 59 | $importValue = DataValueFactory::getInstance()->newDataItemValue( |
@@ -80,6 +83,9 @@ discard block |
||
80 | 83 | $this->replaceAnyTypeByImportType( $property, $dataValue ); |
81 | 84 | } |
82 | 85 | |
86 | + /** |
|
87 | + * @param \SMWDataValue $dataValue |
|
88 | + */ |
|
83 | 89 | private function replaceAnyTypeByImportType( DIProperty $property, $dataValue ) { |
84 | 90 | |
85 | 91 | foreach ( $this->getSemanticData()->getPropertyValues( $property ) as $dataItem ) { |
@@ -3,7 +3,6 @@ |
||
3 | 3 | namespace SMW\Tests\SQLStore; |
4 | 4 | |
5 | 5 | use SMW\SQLStore\SQLStoreFactory; |
6 | -use SMW\Store; |
|
7 | 6 | use SMWSQLStore3; |
8 | 7 | |
9 | 8 | /** |
@@ -122,6 +122,10 @@ discard block |
||
122 | 122 | return $this->findMatchesFor( '_SUBC', $category->getDBKey(), $category ); |
123 | 123 | } |
124 | 124 | |
125 | + /** |
|
126 | + * @param string $id |
|
127 | + * @param string $key |
|
128 | + */ |
|
125 | 129 | private function hasMatchFor( $id, $key, DIWikiPage $subject ) { |
126 | 130 | |
127 | 131 | $key = 'm#' . $id . '#' . $key; |
@@ -147,6 +151,10 @@ discard block |
||
147 | 151 | return $result !== array(); |
148 | 152 | } |
149 | 153 | |
154 | + /** |
|
155 | + * @param string $id |
|
156 | + * @param string $key |
|
157 | + */ |
|
150 | 158 | private function findMatchesFor( $id, $key, DIWikiPage $subject ) { |
151 | 159 | |
152 | 160 | $key = 'f#' . $id . '#' . $key; |
@@ -54,7 +54,6 @@ |
||
54 | 54 | * |
55 | 55 | * @since 2.2 |
56 | 56 | * |
57 | - * @param array $declarationProperties |
|
58 | 57 | */ |
59 | 58 | public function setPropertiesToCompare( array $propertiesToCompare ) { |
60 | 59 | $this->propertiesToCompare = $propertiesToCompare; |
@@ -99,6 +99,10 @@ |
||
99 | 99 | return SMW_CATEGORY_QUERY; |
100 | 100 | } |
101 | 101 | |
102 | + /** |
|
103 | + * @param integer $maxsize |
|
104 | + * @param integer $maxdepth |
|
105 | + */ |
|
102 | 106 | public function prune( &$maxsize, &$maxdepth, &$log ) { |
103 | 107 | |
104 | 108 | if ( $maxsize >= $this->getSize() ) { |
@@ -442,7 +442,6 @@ discard block |
||
442 | 442 | * Extend the given SPARQL condition by a suitable order by variable, |
443 | 443 | * possibly adding conditions if required for the type of data. |
444 | 444 | * |
445 | - * @param Condition $sparqlCondition condition to modify |
|
446 | 445 | * @param string $mainVariable the variable that represents the value to be ordered |
447 | 446 | * @param integer $diType DataItem type id |
448 | 447 | */ |
@@ -487,6 +486,9 @@ discard block |
||
487 | 486 | } |
488 | 487 | } |
489 | 488 | |
489 | + /** |
|
490 | + * @param string $propertyKey |
|
491 | + */ |
|
490 | 492 | private function addOrderForUnknownPropertyKey( Condition &$condition, $propertyKey ) { |
491 | 493 | |
492 | 494 | if ( $propertyKey === '' ) { // order by result page sortkey |
@@ -11,7 +11,6 @@ |
||
11 | 11 | use SMW\Query\Language\Description; |
12 | 12 | use SMW\Query\Language\SomeProperty; |
13 | 13 | use SMW\Query\Language\ThingDescription; |
14 | -use SMW\SPARQLStore\HierarchyFinder; |
|
15 | 14 | use SMW\SPARQLStore\QueryEngine\Condition\Condition; |
16 | 15 | use SMW\SPARQLStore\QueryEngine\Condition\SingletonCondition; |
17 | 16 | use SMW\SPARQLStore\QueryEngine\Condition\TrueCondition; |
@@ -82,6 +82,9 @@ discard block |
||
82 | 82 | return $result; |
83 | 83 | } |
84 | 84 | |
85 | + /** |
|
86 | + * @param string $joinVariable |
|
87 | + */ |
|
85 | 88 | private function mapCategoriesToConditionElements( array $categories, $joinVariable ) { |
86 | 89 | |
87 | 90 | $condition = ''; |
@@ -109,6 +112,9 @@ discard block |
||
109 | 112 | return array( $condition, $namespaces ); |
110 | 113 | } |
111 | 114 | |
115 | + /** |
|
116 | + * @param string $categoryExpName |
|
117 | + */ |
|
112 | 118 | private function tryToAddClassHierarchyPattern( $category, &$categoryExpName ) { |
113 | 119 | |
114 | 120 | if ( !$this->compoundConditionBuilder->canUseQFeature( SMW_SPARQL_QF_SUBC ) ) { |
@@ -100,6 +100,10 @@ discard block |
||
100 | 100 | return $result; |
101 | 101 | } |
102 | 102 | |
103 | + /** |
|
104 | + * @param string $joinVariable |
|
105 | + * @param \SMW\DIProperty|null $orderByProperty |
|
106 | + */ |
|
103 | 107 | private function doPreliminarySubDescriptionCheck( $subDescriptions, $joinVariable, $orderByProperty ) { |
104 | 108 | |
105 | 109 | $count = count( $subDescriptions ); |
@@ -126,6 +130,9 @@ discard block |
||
126 | 130 | return null; |
127 | 131 | } |
128 | 132 | |
133 | + /** |
|
134 | + * @param string $joinVariable |
|
135 | + */ |
|
129 | 136 | private function doResolveSubDescriptionsRecursively( $subDescriptions, $joinVariable ) { |
130 | 137 | |
131 | 138 | // Using a stdClass as data container for simpler handling in follow-up tasks |
@@ -195,6 +202,9 @@ discard block |
||
195 | 202 | return $subConditionElements; |
196 | 203 | } |
197 | 204 | |
205 | + /** |
|
206 | + * @param \stdClass $subConditionElements |
|
207 | + */ |
|
198 | 208 | private function createConditionFromSubConditionElements( $subConditionElements ) { |
199 | 209 | |
200 | 210 | if ( $subConditionElements->singletonMatchElement instanceof ExpElement ) { |
@@ -107,6 +107,10 @@ discard block |
||
107 | 107 | return $result; |
108 | 108 | } |
109 | 109 | |
110 | + /** |
|
111 | + * @param string $joinVariable |
|
112 | + * @param \SMW\DIProperty|null $orderByProperty |
|
113 | + */ |
|
110 | 114 | private function doPreliminarySubDescriptionCheck( $subDescriptions, $joinVariable, $orderByProperty ) { |
111 | 115 | |
112 | 116 | $count = count( $subDescriptions ); |
@@ -131,6 +135,10 @@ discard block |
||
131 | 135 | return null; |
132 | 136 | } |
133 | 137 | |
138 | + /** |
|
139 | + * @param string $joinVariable |
|
140 | + * @param \SMW\DIProperty|null $orderByProperty |
|
141 | + */ |
|
134 | 142 | private function doResolveSubDescriptionsRecursively( $subDescriptions, $joinVariable, $orderByProperty ) { |
135 | 143 | |
136 | 144 | // Using a stdClass as data container for simpler handling in follow-up tasks |
@@ -213,6 +221,9 @@ discard block |
||
213 | 221 | return $subConditionElements; |
214 | 222 | } |
215 | 223 | |
224 | + /** |
|
225 | + * @param string $joinVariable |
|
226 | + */ |
|
216 | 227 | private function createConditionFromSubConditionElements( $subConditionElements, $joinVariable ) { |
217 | 228 | |
218 | 229 | if ( $subConditionElements->unionCondition === '' ) { |
@@ -150,6 +150,9 @@ discard block |
||
150 | 150 | return array( $innerOrderByProperty, $innerCondition, $innerJoinVariable ); |
151 | 151 | } |
152 | 152 | |
153 | + /** |
|
154 | + * @param string $innerJoinVariable |
|
155 | + */ |
|
153 | 156 | private function findObjectNameFromInnerCondition( $innerCondition, $innerJoinVariable, &$namespaces ) { |
154 | 157 | |
155 | 158 | if ( !$innerCondition instanceof SingletonCondition ) { |
@@ -201,6 +204,10 @@ discard block |
||
201 | 204 | return TurtleSerializer::getTurtleNameForExpElement( $propertyExpElement ); |
202 | 205 | } |
203 | 206 | |
207 | + /** |
|
208 | + * @param string $objectName |
|
209 | + * @param string $joinVariable |
|
210 | + */ |
|
204 | 211 | private function doExchangeForWhenInversePropertyIsUsed( DIProperty $property, $objectName, $joinVariable ) { |
205 | 212 | |
206 | 213 | $subjectName = '?' . $joinVariable; |
@@ -239,6 +246,7 @@ discard block |
||
239 | 246 | * can be found using the "zero or more" will resolve the complete path |
240 | 247 | * |
241 | 248 | * @see http://www.w3.org/TR/sparql11-query/#propertypath-arbitrary-length |
249 | + * @param string $propertyName |
|
242 | 250 | */ |
243 | 251 | private function tryToAddPropertyPathForSaturatedHierarchy( &$condition, DIProperty $property, &$propertyName ) { |
244 | 252 |