@@ -37,7 +37,9 @@ |
||
| 37 | 37 | $i = 0; |
| 38 | 38 | try { |
| 39 | 39 | foreach ($table as $row) { |
| 40 | - if (++$i > $numPeekRows) break; |
|
| 40 | + if (++$i > $numPeekRows) { |
|
| 41 | + break; |
|
| 42 | + } |
|
| 41 | 43 | } |
| 42 | 44 | } catch (Exceptions\DataSourceException $e) { |
| 43 | 45 | // general error in getting the next row from the data source |
@@ -116,7 +116,9 @@ |
||
| 116 | 116 | try { |
| 117 | 117 | $rowNum = 0; |
| 118 | 118 | foreach ($this->inputRows as $inputRow) { |
| 119 | - if (!array_key_exists($rowNum, $this->castRows)) $this->castRows[$rowNum] = []; |
|
| 119 | + if (!array_key_exists($rowNum, $this->castRows)) { |
|
| 120 | + $this->castRows[$rowNum] = []; |
|
| 121 | + } |
|
| 120 | 122 | $this->castRows[$rowNum][$fieldName] = $inferredField->castValue($inputRow[$fieldName]); |
| 121 | 123 | $rowNum++; |
| 122 | 124 | } |