Completed
Push — master ( 7be29b...97378e )
by Ondřej
03:11
created
src/Ivory/Relation/RelationMacros.php 2 patches
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -18,6 +18,9 @@  discard block
 block discarded – undo
18 18
  */
19 19
 trait RelationMacros
20 20
 {
21
+    /**
22
+     * @param string[] $columns
23
+     */
21 24
     abstract public function project($columns): IRelation;
22 25
 
23 26
     abstract public function tuple(int $offset = 0): ITuple;
@@ -73,6 +76,9 @@  discard block
 block discarded – undo
73 76
         return $this->tuple($tupleOffset)->value($colOffsetOrNameOrEvaluator);
74 77
     }
75 78
 
79
+    /**
80
+     * @param IColumn[] $columns
81
+     */
76 82
     final protected function _colImpl($offsetOrNameOrEvaluator, $columns, $colNameMap, IRelation $relation)
77 83
     {
78 84
         if (is_scalar($offsetOrNameOrEvaluator)) {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
     public function assoc($col1, $col2, ...$moreCols): IValueMap
103 103
     {
104 104
         return $this->assocImpl(
105
-            function () {
105
+            function() {
106 106
                 // FIXME: depending on the data type of the keys, either use an array-based implementation, or an object hashing implementation
107 107
                 return new ArrayValueMap();
108 108
             },
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
     public function map($mappingCol, ...$moreMappingCols): ITupleMap
114 114
     {
115 115
         return $this->assocImpl(
116
-            function () {
116
+            function() {
117 117
                 // FIXME: depending on the data type of the keys, either use an array-based implementation, or an object hashing implementation
118 118
                 return new ArrayTupleMap();
119 119
             },
Please login to merge, or discard this patch.
src/Ivory/Type/ArrayType.php 1 patch
Doc Comments   +10 added lines patch added patch discarded remove patch
@@ -275,6 +275,11 @@  discard block
 block discarded – undo
275 275
         return $out;
276 276
     }
277 277
 
278
+    /**
279
+     * @param string $str
280
+     * @param string $errMsg
281
+     * @param integer $offset
282
+     */
278 283
     private static function throwArrayParseException($str, $errMsg = null, $offset = null)
279 284
     {
280 285
         $msg = "Value '$str' is not valid for an array";
@@ -284,6 +289,11 @@  discard block
 block discarded – undo
284 289
         throw new ParseException($msg, $offset);
285 290
     }
286 291
 
292
+    /**
293
+     * @param string $str
294
+     * @param integer $offset
295
+     * @param ParseException $cause
296
+     */
287 297
     private function throwParseException($str, $errMsg = null, $offset = null, $cause = null)
288 298
     {
289 299
         $elemTypeName = $this->elemType->getSchemaName() . '.' . $this->elemType->getName();
Please login to merge, or discard this patch.
src/Ivory/Type/RangeType.php 1 patch
Doc Comments   +8 added lines patch added patch discarded remove patch
@@ -73,6 +73,9 @@  discard block
 block discarded – undo
73 73
         return Range::createFromBounds($this->subtype, $this->canonicalFunc, $lower, $upper, $lowerInc, $upperInc);
74 74
     }
75 75
 
76
+    /**
77
+     * @param string $str
78
+     */
76 79
     private function parseBoundStr($str)
77 80
     {
78 81
         if (strlen($str) == 0) {
@@ -151,6 +154,11 @@  discard block
 block discarded – undo
151 154
         }
152 155
     }
153 156
 
157
+    /**
158
+     * @param integer $sgn
159
+     * @param boolean|null $aIsInc
160
+     * @param boolean|null $bIsInc
161
+     */
154 162
     private function compareBounds($sgn, $aVal, $aIsInc, $bVal, $bIsInc)
155 163
     {
156 164
         if ($aVal === null && $bVal === null) {
Please login to merge, or discard this patch.
src/Ivory/Relation/Column.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -61,11 +61,11 @@  discard block
 block discarded – undo
61 61
     public function uniq($hasher = null, $comparator = null): IColumn
62 62
     {
63 63
         if ($hasher === null) {
64
-            $hasher = new CallbackValueHasher(function ($value) {
64
+            $hasher = new CallbackValueHasher(function($value) {
65 65
                 return (is_int($value) || is_string($value) ? $value : serialize($value));
66 66
             });
67 67
         } elseif ($hasher === 1) {
68
-            $hasher = new CallbackValueHasher(function ($value) {
68
+            $hasher = new CallbackValueHasher(function($value) {
69 69
                 return 1;
70 70
             });
71 71
         } elseif (!$hasher instanceof IValueHasher) {
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
         }
74 74
 
75 75
         if ($comparator === null) {
76
-            $comparator = new CallbackValueComparator(function ($a, $b) {
76
+            $comparator = new CallbackValueComparator(function($a, $b) {
77 77
                 if (is_object($a) && is_object($b) && $a instanceof IComparable) {
78 78
                     return $a->equals($b);
79 79
                 } else {
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
         }
86 86
 
87 87
         $hashTable = [];
88
-        return new FilteredColumn($this, function ($value) use ($hasher, $comparator, &$hashTable) {
88
+        return new FilteredColumn($this, function($value) use ($hasher, $comparator, &$hashTable) {
89 89
             $h = $hasher->hash($value);
90 90
             if (!isset($hashTable[$h])) {
91 91
                 $hashTable[$h] = [$value];
Please login to merge, or discard this patch.