@@ -35,6 +35,7 @@ discard block |
||
35 | 35 | * |
36 | 36 | * @param string|string[] one or more names of parameters the cached values of which to invalidate; |
37 | 37 | * <tt>null</tt> invalidates everything |
38 | + * @return void |
|
38 | 39 | */ |
39 | 40 | function invalidateCache($paramName = null); |
40 | 41 | |
@@ -47,6 +48,7 @@ discard block |
||
47 | 48 | * |
48 | 49 | * @param string|string[] $paramName one or more names of parameters to disabled caching values of; |
49 | 50 | * <tt>null</tt> disables the caching altogether |
51 | + * @return void |
|
50 | 52 | */ |
51 | 53 | function disableCaching($paramName = null); |
52 | 54 | |
@@ -58,6 +60,7 @@ discard block |
||
58 | 60 | * argument (which is the default). |
59 | 61 | * |
60 | 62 | * @param string|string[] $paramName |
63 | + * @return void |
|
61 | 64 | */ |
62 | 65 | function enableCaching($paramName = null); |
63 | 66 | } |
@@ -53,11 +53,13 @@ discard block |
||
53 | 53 | |
54 | 54 | /** |
55 | 55 | * @param ITypeDictionaryUndefinedHandler|null $undefinedTypeHandler |
56 | + * @return void |
|
56 | 57 | */ |
57 | 58 | function setUndefinedTypeHandler($undefinedTypeHandler); |
58 | 59 | |
59 | 60 | /** |
60 | 61 | * @param string[] $schemaList |
62 | + * @return void |
|
61 | 63 | */ |
62 | 64 | function setTypeSearchPath(array $schemaList); |
63 | 65 | |
@@ -65,6 +67,7 @@ discard block |
||
65 | 67 | * Attach connection-dependent objects in this dictionary to a connection. |
66 | 68 | * |
67 | 69 | * @param IConnection $connection connection to attach the dictionary to |
70 | + * @return void |
|
68 | 71 | */ |
69 | 72 | function attachToConnection(IConnection $connection); |
70 | 73 | |
@@ -72,6 +75,7 @@ discard block |
||
72 | 75 | * Detach any objects in this dictionary from the database connection. |
73 | 76 | * |
74 | 77 | * After this operation, the dictionary must be safe for serialization. |
78 | + * @return void |
|
75 | 79 | */ |
76 | 80 | function detachFromConnection(); |
77 | 81 | } |
@@ -58,8 +58,7 @@ |
||
58 | 58 | $type = $column->getType(); |
59 | 59 | if ($type === null) { |
60 | 60 | $colIdent = ($column->getName() !== null ? |
61 | - 'column ' . $column->getName() : |
|
62 | - StringUtils::englishOrd($i+1) . ' column' |
|
61 | + 'column ' . $column->getName() : StringUtils::englishOrd($i + 1) . ' column' |
|
63 | 62 | ); |
64 | 63 | throw new \InvalidArgumentException("Invalid relation for serialization - $colIdent has unknown type"); |
65 | 64 | } |
@@ -310,6 +310,9 @@ |
||
310 | 310 | } |
311 | 311 | } |
312 | 312 | |
313 | + /** |
|
314 | + * @param IType $item |
|
315 | + */ |
|
313 | 316 | private static function removeAll(array &$array, $item) |
314 | 317 | { |
315 | 318 | while (($key = array_search($item, $array, true)) !== false) { |
@@ -328,7 +328,7 @@ discard block |
||
328 | 328 | // necessary for the forward reference to be valid once the aliased type finally appears in the type map |
329 | 329 | $this->qualNameTypeMap[$schemaName] = []; |
330 | 330 | } |
331 | - $this->typeAliases[$alias] =& $this->qualNameTypeMap[$schemaName][$typeName]; |
|
331 | + $this->typeAliases[$alias] = & $this->qualNameTypeMap[$schemaName][$typeName]; |
|
332 | 332 | } |
333 | 333 | |
334 | 334 | /** |
@@ -345,7 +345,7 @@ discard block |
||
345 | 345 | foreach ($this->typeSearchPath as $schemaName) { |
346 | 346 | foreach (($this->qualNameTypeMap[$schemaName] ?? []) as $typeName => $type) { |
347 | 347 | if (!isset($this->searchedNameCache[$typeName])) { |
348 | - $this->searchedNameCache[$typeName] =& $this->qualNameTypeMap[$schemaName][$typeName]; |
|
348 | + $this->searchedNameCache[$typeName] = & $this->qualNameTypeMap[$schemaName][$typeName]; |
|
349 | 349 | } |
350 | 350 | } |
351 | 351 | } |
@@ -96,6 +96,7 @@ discard block |
||
96 | 96 | * {@link connectWait()}, the hooks are *not* called. |
97 | 97 | * |
98 | 98 | * @param \Closure $closure closure to call, given no arguments |
99 | + * @return void |
|
99 | 100 | */ |
100 | 101 | function registerConnectStartHook(\Closure $closure); |
101 | 102 | |
@@ -108,6 +109,7 @@ discard block |
||
108 | 109 | * method, or when the connection gets destroyed before freeing from memory. |
109 | 110 | * |
110 | 111 | * @param \Closure $closure closure to call, given no arguments |
112 | + * @return void |
|
111 | 113 | */ |
112 | 114 | function registerPreDisconnectHook(\Closure $closure); |
113 | 115 | |
@@ -120,6 +122,7 @@ discard block |
||
120 | 122 | * method, or when the connection gets destroyed before freeing from memory. |
121 | 123 | * |
122 | 124 | * @param \Closure $closure closure to call, given no arguments |
125 | + * @return void |
|
123 | 126 | */ |
124 | 127 | function registerPostDisconnectHook(\Closure $closure); |
125 | 128 | } |
@@ -70,8 +70,7 @@ |
||
70 | 70 | $dict->disableTypeUsageWatching(); |
71 | 71 | } |
72 | 72 | return $dict; |
73 | - } |
|
74 | - else { |
|
73 | + } else { |
|
75 | 74 | return null; |
76 | 75 | } |
77 | 76 | } |
@@ -162,13 +162,6 @@ discard block |
||
162 | 162 | /** |
163 | 163 | * Projects a single column from this relation. |
164 | 164 | * |
165 | - * @param int|string|ITupleEvaluator|\Closure $offsetOrNameOrEvaluator |
|
166 | - * Zero-based offset or (non-numeric) name of column to project from this relation, |
|
167 | - * or an evaluator which computes each value from the tuple. |
|
168 | - * As an evaluator, either {@link ITupleEvaluator} (the |
|
169 | - * {@link ITupleEvaluator::evaluate()} method of which is called) or |
|
170 | - * <tt>Closure</tt> may be used; the <tt>Closure</tt> is given one {@link ITuple} |
|
171 | - * argument and is expected to return the value to use for the resulting column. |
|
172 | 165 | * @return IColumn |
173 | 166 | * @throws UndefinedColumnException if no column matches the specification |
174 | 167 | * @throws AmbiguousException if referring to the column by its name, which is used by multiple columns |
@@ -318,12 +311,12 @@ discard block |
||
318 | 311 | function tuple(int $offset = 0): ITuple; |
319 | 312 | |
320 | 313 | /** |
321 | - * @param int|string|ITupleEvaluator|\Closure $colOffsetOrNameOrEvaluator |
|
314 | + * @param integer $colOffsetOrNameOrEvaluator |
|
322 | 315 | * Specification of column from which to get the value. See {@link col()} for more |
323 | 316 | * details on the column specification. |
324 | 317 | * @param int $tupleOffset zero-based offset of the tuple to get; |
325 | 318 | * if negative, the <tt>-$tupleOffset</tt>'th tuple from the end is returned |
326 | - * @return mixed |
|
319 | + * @return string |
|
327 | 320 | * @throws \OutOfBoundsException when this relation has fewer than <tt>$tupleOffset+1</tt> tuples, or fewer than |
328 | 321 | * <tt>-$tupleOffset</tt> tuples if <tt>$tupleOffset</tt> is negative |
329 | 322 | * @throws UndefinedColumnException if no column matches the specification |
@@ -18,8 +18,7 @@ discard block |
||
18 | 18 | $colName = $col->getName(); |
19 | 19 | if (strlen($colName) > 0) { |
20 | 20 | $this->projectedColNameMap[$colName] = (isset($this->projectedColNameMap[$colName]) ? |
21 | - Tuple::AMBIGUOUS_COL : |
|
22 | - $colOffset |
|
21 | + Tuple::AMBIGUOUS_COL : $colOffset |
|
23 | 22 | ); |
24 | 23 | } |
25 | 24 | } |
@@ -33,7 +32,7 @@ discard block |
||
33 | 32 | * @param int $starCnt number of star wildcards is stored here |
34 | 33 | * @return string PCRE equivalent to <tt>$macroPattern</tt> |
35 | 34 | */ |
36 | - protected static function simpleMacroPatternToPcre(string $macroPattern, int &$starCnt = null): string |
|
35 | + protected static function simpleMacroPatternToPcre(string $macroPattern, int & $starCnt = null): string |
|
37 | 36 | { |
38 | 37 | $starCnt = 0; |
39 | 38 | $pcre = '/^'; |
@@ -196,7 +196,7 @@ |
||
196 | 196 | $curFragmentNum++; |
197 | 197 | $argsProcessed += count($posParams); |
198 | 198 | |
199 | - $curFragment =& $fragmentsAndPositionalParams[$argsProcessed]; |
|
199 | + $curFragment = & $fragmentsAndPositionalParams[$argsProcessed]; |
|
200 | 200 | $argsProcessed++; |
201 | 201 | } while (isset($curFragment)); |
202 | 202 |