Skip to content

Commit 7a774e9

Browse files
committed
fix: remove stats, comparison directly in if
1 parent 19f1cdd commit 7a774e9

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

phpunit.xml.dist

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
</testsuite>
1818
</testsuites>
1919
<php>
20-
<env name="MONGODB_URI" value="mongodb://mongodb/?directConnection=true"/>
20+
<env name="MONGODB_URI" value="mongodb://127.0.0.1/?directConnection=true"/>
2121
<env name="MONGODB_DATABASE" value="unittest"/>
2222
<env name="SQLITE_DATABASE" value=":memory:"/>
2323
<env name="QUEUE_CONNECTION" value="database"/>

src/Schema/Builder.php

+3-9
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,7 @@ public function getTables($schema = null)
158158
}
159159

160160
// Skip views it doesnt suport aggregate
161-
$isView = $collectionInfo->getType() === 'view';
162-
$stats = null;
163-
164-
if ($isView) {
161+
if ($collectionInfo->getType() === 'view') {
165162
continue;
166163
}
167164

@@ -200,11 +197,8 @@ public function getViews($schema = null)
200197
continue;
201198
}
202199

203-
// Skip views it doesnt suport aggregate
204-
$isNotView = $collectionInfo->getType() !== 'view';
205-
$stats = null;
206-
207-
if ($isNotView) {
200+
// Skip normal type collection
201+
if ($collectionInfo->getType() !== 'view') {
208202
continue;
209203
}
210204

0 commit comments

Comments
 (0)