@@ -23,6 +23,7 @@ |
||
23 | 23 | * Flushes the type dictionary currently in use, leading to loading a fresh new type dictionary. |
24 | 24 | * |
25 | 25 | * Useful when the data types change during the script execution in such a way Ivory is unable to detect it. |
26 | + * @return void |
|
26 | 27 | */ |
27 | 28 | function flushTypeDictionary(); |
28 | 29 | } |
@@ -151,6 +151,10 @@ |
||
151 | 151 | } |
152 | 152 | } |
153 | 153 | |
154 | + /** |
|
155 | + * @param boolean|null $aIsInc |
|
156 | + * @param boolean|null $bIsInc |
|
157 | + */ |
|
154 | 158 | private function compareBounds(int $sgn, $aVal, $aIsInc, $bVal, $bIsInc): int |
155 | 159 | { |
156 | 160 | if ($aVal === null && $bVal === null) { |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | * @param int $maxDim the maximal dimension discovered so far |
250 | 250 | * @return string the PostgreSQL external representation of <tt>$val</tt> |
251 | 251 | */ |
252 | - private function serializeValuePlain($val, &$dims = [], int $curDim = 0, int &$maxDim = -1): string |
|
252 | + private function serializeValuePlain($val, &$dims = [], int $curDim = 0, int & $maxDim = -1): string |
|
253 | 253 | { |
254 | 254 | if ($val === null) { |
255 | 255 | return 'NULL'; |
@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | * @param int $maxDim the maximal dimension discovered so far |
304 | 304 | * @return string the PostgreSQL external representation of <tt>$val</tt> |
305 | 305 | */ |
306 | - private function serializeValueStrict($val, &$bounds = [], int $curDim = 0, int &$maxDim = -1): string |
|
306 | + private function serializeValueStrict($val, &$bounds = [], int $curDim = 0, int & $maxDim = -1): string |
|
307 | 307 | { |
308 | 308 | if ($val === null) { |
309 | 309 | return 'NULL'; |
@@ -301,6 +301,9 @@ |
||
301 | 301 | { |
302 | 302 | private $refresher; |
303 | 303 | |
304 | + /** |
|
305 | + * @param \Closure $refresher |
|
306 | + */ |
|
304 | 307 | public function __construct($refresher) |
305 | 308 | { |
306 | 309 | $this->refresher = $refresher; |
@@ -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 | } |