Completed
Push — master ( 8a9a36...5d30b0 )
by Ondřej
03:00
created
src/Ivory/Relation/IRelation.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -311,12 +311,12 @@
 block discarded – undo
311 311
     function tuple(int $offset = 0): ITuple;
312 312
 
313 313
     /**
314
-     * @param int|string|ITupleEvaluator|\Closure $colOffsetOrNameOrEvaluator
314
+     * @param integer $colOffsetOrNameOrEvaluator
315 315
      *                                  Specification of column from which to get the value. See {@link col()} for more
316 316
      *                                    details on the column specification.
317 317
      * @param int $tupleOffset zero-based offset of the tuple to get;
318 318
      *                         if negative, the <tt>-$tupleOffset</tt>'th tuple from the end is returned
319
-     * @return mixed
319
+     * @return string
320 320
      * @throws \OutOfBoundsException when this relation has fewer than <tt>$tupleOffset+1</tt> tuples, or fewer than
321 321
      *                                 <tt>-$tupleOffset</tt> tuples if <tt>$tupleOffset</tt> is negative
322 322
      * @throws UndefinedColumnException if no column matches the specification
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -264,7 +264,7 @@
 block discarded – undo
264 264
      * @throws UndefinedColumnException if no column matches the specification
265 265
      * @throws AmbiguousException if referring to the column by its name, which is used by multiple columns
266 266
      */
267
-    function toSet($colOffsetOrNameOrEvaluator, ?ISet $set = null): ISet;
267
+    function toSet($colOffsetOrNameOrEvaluator, ?ISet $set = null) : ISet;
268 268
 
269 269
     /**
270 270
      * Reduces the relation only to unique tuples.
Please login to merge, or discard this patch.
src/Ivory/Connection/Config/ICachingConnConfig.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -35,6 +35,7 @@  discard block
 block discarded – undo
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): void;
40 41
 
@@ -47,6 +48,7 @@  discard block
 block discarded – undo
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): void;
52 54
 
@@ -58,6 +60,7 @@  discard block
 block discarded – undo
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): void;
63 66
 }
Please login to merge, or discard this patch.
src/Ivory/Connection/IConnectionControl.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -100,6 +100,7 @@  discard block
 block discarded – undo
100 100
      * {@link connectWait()}, the hooks are *not* called.
101 101
      *
102 102
      * @param \Closure $closure closure to call, given no arguments
103
+     * @return void
103 104
      */
104 105
     function registerConnectStartHook(\Closure $closure): void;
105 106
 
@@ -112,6 +113,7 @@  discard block
 block discarded – undo
112 113
      * method, or when the connection gets destroyed before freeing from memory.
113 114
      *
114 115
      * @param \Closure $closure closure to call, given no arguments
116
+     * @return void
115 117
      */
116 118
     function registerPreDisconnectHook(\Closure $closure): void;
117 119
 
@@ -124,6 +126,7 @@  discard block
 block discarded – undo
124 126
      * method, or when the connection gets destroyed before freeing from memory.
125 127
      *
126 128
      * @param \Closure $closure closure to call, given no arguments
129
+     * @return void
127 130
      */
128 131
     function registerPostDisconnectHook(\Closure $closure): void;
129 132
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
      *              <tt>false</tt> if the connection has already been open or started opening and thus this was a no-op
58 58
      * @throws ConnectionException on error connecting to the database
59 59
      */
60
-    function connect(?\Closure $initProcedure = null): bool;
60
+    function connect(?\Closure $initProcedure = null) : bool;
61 61
 
62 62
     /**
63 63
      * Establishes a connection with the database and waits for the connection to be established.
Please login to merge, or discard this patch.
src/Ivory/Connection/ITypeControl.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -22,6 +22,7 @@
 block discarded – undo
22 22
      * Flushes the type dictionary currently in use, leading to loading a fresh new type dictionary.
23 23
      *
24 24
      * Useful when the data types change during the script execution in such a way Ivory is unable to detect it.
25
+     * @return void
25 26
      */
26 27
     function flushTypeDictionary(): void;
27 28
 }
Please login to merge, or discard this patch.
src/Ivory/Exception/StatementExceptionFactory.php 2 patches
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -116,6 +116,10 @@
 block discarded – undo
116 116
         return new $exClass($resultHandler, $query);
117 117
     }
118 118
 
119
+    /**
120
+     * @param resource $resultHandler
121
+     * @param StatementExceptionFactory $fallbackFactory
122
+     */
119 123
     private function inferExceptionClass($resultHandler, ?StatementExceptionFactory $fallbackFactory = null): string
120 124
     {
121 125
         if ($this->bySqlStateCodeAndMessage || $this->bySqlStateCode || $this->bySqlStateClass) {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace Ivory\Exception;
5 5
 
@@ -110,13 +110,13 @@  discard block
 block discarded – undo
110 110
         $resultHandler,
111 111
         string $query,
112 112
         ?StatementExceptionFactory $fallbackFactory = null
113
-    ): StatementException {
113
+    ) : StatementException {
114 114
         $exClass = $this->inferExceptionClass($resultHandler, $fallbackFactory);
115 115
         assert(is_a($exClass, StatementException::class, true));
116 116
         return new $exClass($resultHandler, $query);
117 117
     }
118 118
 
119
-    private function inferExceptionClass($resultHandler, ?StatementExceptionFactory $fallbackFactory = null): string
119
+    private function inferExceptionClass($resultHandler, ?StatementExceptionFactory $fallbackFactory = null) : string
120 120
     {
121 121
         if ($this->bySqlStateCodeAndMessage || $this->bySqlStateCode || $this->bySqlStateClass) {
122 122
             $sqlStateCode = pg_result_error_field($resultHandler, PGSQL_DIAG_SQLSTATE);
Please login to merge, or discard this patch.
src/Ivory/Ivory.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -204,7 +204,7 @@
 block discarded – undo
204 204
     }
205 205
 
206 206
     /**
207
-     * @param IConnection|string $conn (name of) connection to use as the default connection
207
+     * @param IConnection $conn (name of) connection to use as the default connection
208 208
      * @throws \RuntimeException if the requested connection is not defined
209 209
      */
210 210
     public static function useConnectionAsDefault($conn): void
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace Ivory;
5 5
 
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
      * @param CacheItemPoolInterface|null $cacheItemPool the cache implementation to use for connections which do not
119 119
      *                                                     set their own cache, or <tt>null</tt> for no default cache
120 120
      */
121
-    public static function setDefaultCacheImpl(?CacheItemPoolInterface $cacheItemPool): void
121
+    public static function setDefaultCacheImpl(?CacheItemPoolInterface $cacheItemPool) : void
122 122
     {
123 123
         self::$defaultCacheImpl = $cacheItemPool;
124 124
     }
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
      * @throws ConnectionException if connection name is explicitly specified but a connection with the same name
150 150
      *                               already exists
151 151
      */
152
-    public static function setupNewConnection($params, ?string $connName = null): IConnection
152
+    public static function setupNewConnection($params, ?string $connName = null) : IConnection
153 153
     {
154 154
         if (!$params instanceof ConnectionParameters) {
155 155
             $params = ConnectionParameters::create($params);
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
      * @throws \RuntimeException if the default connection is requested but no connection has been setup yet, or if the
187 187
      *                             requested connection is not defined
188 188
      */
189
-    public static function getConnection(?string $connName = null): IConnection
189
+    public static function getConnection(?string $connName = null) : IConnection
190 190
     {
191 191
         if ($connName === null) {
192 192
             if (self::$defaultConn) {
Please login to merge, or discard this patch.
src/Ivory/Type/ITypeDictionary.php 1 patch
Doc Comments   +8 added lines patch added patch discarded remove patch
@@ -51,10 +51,16 @@  discard block
 block discarded – undo
51 51
      */
52 52
     function getValueSerializer(string $name): ?IValueSerializer;
53 53
 
54
+    /**
55
+     * @param \Ivory\Connection\anonymous//src/Ivory/Connection/TypeControl.php$0 $undefinedTypeHandler
56
+     *
57
+     * @return void
58
+     */
54 59
     function setUndefinedTypeHandler(?ITypeDictionaryUndefinedHandler $undefinedTypeHandler);
55 60
 
56 61
     /**
57 62
      * @param string[] $schemaList
63
+     * @return void
58 64
      */
59 65
     function setTypeSearchPath(array $schemaList): void;
60 66
 
@@ -62,6 +68,7 @@  discard block
 block discarded – undo
62 68
      * Attach connection-dependent objects in this dictionary to a connection.
63 69
      *
64 70
      * @param IConnection $connection connection to attach the dictionary to
71
+     * @return void
65 72
      */
66 73
     function attachToConnection(IConnection $connection): void;
67 74
 
@@ -69,6 +76,7 @@  discard block
 block discarded – undo
69 76
      * Detach any objects in this dictionary from the database connection.
70 77
      *
71 78
      * After this operation, the dictionary must be safe for serialization.
79
+     * @return void
72 80
      */
73 81
     function detachFromConnection(): void;
74 82
 }
Please login to merge, or discard this patch.
src/Ivory/Type/Postgresql/RangeType.php 2 patches
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -151,6 +151,10 @@
 block discarded – undo
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, ?bool $aIsInc, $bVal, ?bool $bIsInc): int
155 159
     {
156 160
         if ($aVal === null && $bVal === null) {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace Ivory\Type\Postgresql;
5 5
 
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
         }
152 152
     }
153 153
 
154
-    private function compareBounds(int $sgn, $aVal, ?bool $aIsInc, $bVal, ?bool $bIsInc): int
154
+    private function compareBounds(int $sgn, $aVal, ?bool $aIsInc, $bVal, ?bool $bIsInc) : int
155 155
     {
156 156
         if ($aVal === null && $bVal === null) {
157 157
             return 0;
Please login to merge, or discard this patch.
src/Ivory/Type/TypeDictionary.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -306,6 +306,9 @@
 block discarded – undo
306 306
         }
307 307
     }
308 308
 
309
+    /**
310
+     * @param IType $item
311
+     */
309 312
     private static function removeAll(array &$array, $item): void
310 313
     {
311 314
         while (($key = array_search($item, $array, true)) !== false) {
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace Ivory\Type;
5 5
 
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
         throw new UndefinedTypeException("There is no type defined for converting value of type \"$typeName\"");
109 109
     }
110 110
 
111
-    private function recognizeType($value, $ruleSet): ?array
111
+    private function recognizeType($value, $ruleSet): ? array
112 112
     {
113 113
         static $gettypeMap = [
114 114
             'boolean' => 'bool',
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
         }
137 137
     }
138 138
 
139
-    private function recognizeObjectType($value, $ruleSet): ?array
139
+    private function recognizeObjectType($value, $ruleSet): ? array
140 140
     {
141 141
         $valueClass = new \ReflectionClass($value);
142 142
         $class = $valueClass;
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
         return null;
157 157
     }
158 158
 
159
-    private function recognizeArrayType($value, $ruleSet): ?array
159
+    private function recognizeArrayType($value, $ruleSet): ? array
160 160
     {
161 161
         $element = $this->findFirstSignificantElement($value);
162 162
 
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
 
244 244
     //region content management
245 245
 
246
-    public function defineType(IType $type, ?int $oid = null): void
246
+    public function defineType(IType $type, ?int $oid = null) : void
247 247
     {
248 248
         if ($oid !== null) {
249 249
             $this->oidTypeMap[$oid] = $type;
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
             // necessary for the forward reference to be valid once the aliased type finally appears in the type map
325 325
             $this->qualNameTypeMap[$schemaName] = [];
326 326
         }
327
-        $this->typeAliases[$alias] =& $this->qualNameTypeMap[$schemaName][$typeName];
327
+        $this->typeAliases[$alias] = & $this->qualNameTypeMap[$schemaName][$typeName];
328 328
     }
329 329
 
330 330
     /**
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
         foreach ($this->typeSearchPath as $schemaName) {
342 342
             foreach (($this->qualNameTypeMap[$schemaName] ?? []) as $typeName => $type) {
343 343
                 if (!isset($this->searchedNameCache[$typeName])) {
344
-                    $this->searchedNameCache[$typeName] =& $this->qualNameTypeMap[$schemaName][$typeName];
344
+                    $this->searchedNameCache[$typeName] = & $this->qualNameTypeMap[$schemaName][$typeName];
345 345
                 }
346 346
             }
347 347
         }
Please login to merge, or discard this patch.