Skip to content

Commit

Permalink
strict comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Nov 6, 2020
1 parent f1c1c7d commit d442043
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Database/Drivers/SqliteDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public function getColumns(string $table): array
'table' => $table,
'nativetype' => strtoupper($type[0]),
'size' => isset($type[1]) ? (int) $type[1] : null,
'nullable' => $row['notnull'] == '0',
'nullable' => $row['notnull'] === 0,
'default' => $row['dflt_value'],
'autoincrement' => $meta && preg_match($pattern, (string) $meta['sql']),
'primary' => $row['pk'] > 0,
Expand Down Expand Up @@ -176,7 +176,7 @@ public function getIndexes(string $table): array
foreach ($indexes as $index => $values) {
$column = $indexes[$index]['columns'][0];
foreach ($columns as $info) {
if ($column == $info['name']) {
if ($column === $info['name']) {
$indexes[$index]['primary'] = (bool) $info['primary'];
break;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Structure.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public function getPrimaryAutoincrementKey(string $table): ?string

// Search for autoincrement key from simple primary key
foreach ($this->getColumns($table) as $column) {
if ($column['name'] == $primaryKey) {
if ($column['name'] === $primaryKey) {
return $column['autoincrement'] ? $column['name'] : null;
}
}
Expand Down

0 comments on commit d442043

Please sign in to comment.