@@ -29,8 +29,9 @@ |
||
29 | 29 | public function getAllRecords() |
30 | 30 | { |
31 | 31 | $allRecords = $this->allRecords; |
32 | - foreach ($allRecords() as $recordData) |
|
33 | - yield $recordData; |
|
32 | + foreach ($allRecords() as $recordData) { |
|
33 | + yield $recordData; |
|
34 | + } |
|
34 | 35 | } |
35 | 36 | |
36 | 37 | /** @return Record */ |
@@ -12,8 +12,9 @@ |
||
12 | 12 | |
13 | 13 | public function __construct($totalDigits, $fractionalDigits) |
14 | 14 | { |
15 | - if ($totalDigits <= $fractionalDigits) |
|
16 | - throw new \InvalidArgumentException("'totalDigits' ({$totalDigits}) has to be larger than 'fractionalDigits' ({$fractionalDigits})"); |
|
15 | + if ($totalDigits <= $fractionalDigits) { |
|
16 | + throw new \InvalidArgumentException("'totalDigits' ({$totalDigits}) has to be larger than 'fractionalDigits' ({$fractionalDigits})"); |
|
17 | + } |
|
17 | 18 | |
18 | 19 | $this->totalDigits = $totalDigits; |
19 | 20 | $this->fractionalDigits = $fractionalDigits; |
@@ -49,13 +49,15 @@ |
||
49 | 49 | function(Table $existingTable) use ($targetTable) { return $targetTable->getName() == $existingTable->getName(); } |
50 | 50 | ); |
51 | 51 | |
52 | - if (count($existingTables) > 1) |
|
53 | - throw new \UnexpectedValueException(sprintf("Multiple tables with the name '%s' exist.", $targetTable->getName())); |
|
52 | + if (count($existingTables) > 1) { |
|
53 | + throw new \UnexpectedValueException(sprintf("Multiple tables with the name '%s' exist.", $targetTable->getName())); |
|
54 | + } |
|
54 | 55 | |
55 | 56 | if (count($existingTables) == 1) { |
56 | 57 | $tableDiff = $this->schemaComparator->diffTable(current($existingTables), $targetTable); |
57 | - if ($tableDiff) |
|
58 | - $this->schemaManager->alterTable($tableDiff); |
|
58 | + if ($tableDiff) { |
|
59 | + $this->schemaManager->alterTable($tableDiff); |
|
60 | + } |
|
59 | 61 | } else { |
60 | 62 | $this->schemaManager->createTable($targetTable); |
61 | 63 | } |