Skip to content

Commit d442043

Browse files
committed
strict comparison
1 parent f1c1c7d commit d442043

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Database/Drivers/SqliteDriver.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ public function getColumns(string $table): array
145145
'table' => $table,
146146
'nativetype' => strtoupper($type[0]),
147147
'size' => isset($type[1]) ? (int) $type[1] : null,
148-
'nullable' => $row['notnull'] == '0',
148+
'nullable' => $row['notnull'] === 0,
149149
'default' => $row['dflt_value'],
150150
'autoincrement' => $meta && preg_match($pattern, (string) $meta['sql']),
151151
'primary' => $row['pk'] > 0,
@@ -176,7 +176,7 @@ public function getIndexes(string $table): array
176176
foreach ($indexes as $index => $values) {
177177
$column = $indexes[$index]['columns'][0];
178178
foreach ($columns as $info) {
179-
if ($column == $info['name']) {
179+
if ($column === $info['name']) {
180180
$indexes[$index]['primary'] = (bool) $info['primary'];
181181
break;
182182
}

src/Database/Structure.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public function getPrimaryAutoincrementKey(string $table): ?string
8686

8787
// Search for autoincrement key from simple primary key
8888
foreach ($this->getColumns($table) as $column) {
89-
if ($column['name'] == $primaryKey) {
89+
if ($column['name'] === $primaryKey) {
9090
return $column['autoincrement'] ? $column['name'] : null;
9191
}
9292
}

0 commit comments

Comments
 (0)