diff --git a/src/Migration/Manager.php b/src/Migration/Manager.php
index 862e7627..ebf7a339 100644
--- a/src/Migration/Manager.php
+++ b/src/Migration/Manager.php
@@ -461,7 +461,7 @@ public function migrate(?int $version = null, bool $fake = false, ?int $count =
if ($version === null) {
$version = max(array_merge($versions, array_keys($migrations)));
} else {
- if ($version != 0 && !isset($migrations[$version])) {
+ if ($version !== 0 && !isset($migrations[$version])) {
$this->getIo()->out(sprintf(
'warning %s is not a valid version',
$version,
@@ -755,7 +755,7 @@ public function rollback(int|string|null $target = null, bool $force = false, bo
// Check we have at least 1 migration to revert
$executedVersionCreationTimes = array_keys($executedVersions);
- if (!$executedVersionCreationTimes || $target == end($executedVersionCreationTimes)) {
+ if (!$executedVersionCreationTimes || $target === end($executedVersionCreationTimes)) {
$io->out('No migrations to rollback');
return;
@@ -795,7 +795,7 @@ public function rollback(int|string|null $target = null, bool $force = false, bo
}
}
- if ($executedArray['breakpoint'] != 0 && !$force) {
+ if ((int)$executedArray['breakpoint'] !== 0 && !$force) {
$io->out('Breakpoint reached. Further rollbacks inhibited.');
break;
}
@@ -1290,7 +1290,7 @@ protected function markBreakpoint(?int $version, int $mark): void
}
$io = $this->getIo();
- if ($version != 0 && (!isset($versions[$version]) || !isset($migrations[$version]))) {
+ if ($version !== 0 && (!isset($versions[$version]) || !isset($migrations[$version]))) {
$io->out(sprintf(
'warning %s is not a valid version',
$version,
@@ -1304,12 +1304,12 @@ protected function markBreakpoint(?int $version, int $mark): void
$env->getAdapter()->toggleBreakpoint($migrations[$version]);
break;
case self::BREAKPOINT_SET:
- if ($versions[$version]['breakpoint'] == 0) {
+ if ((int)$versions[$version]['breakpoint'] === 0) {
$env->getAdapter()->setBreakpoint($migrations[$version]);
}
break;
case self::BREAKPOINT_UNSET:
- if ($versions[$version]['breakpoint'] == 1) {
+ if ((int)$versions[$version]['breakpoint'] === 1) {
$env->getAdapter()->unsetBreakpoint($migrations[$version]);
}
break;
diff --git a/src/Util/ColumnParser.php b/src/Util/ColumnParser.php
index e0c7ca1e..97b9efdc 100644
--- a/src/Util/ColumnParser.php
+++ b/src/Util/ColumnParser.php
@@ -74,7 +74,7 @@ public function parseFields(array $arguments): array
$type = str_contains($type, '?') ? 'integer?' : 'integer';
}
- $nullable = (bool)strpos($type, '?');
+ $nullable = str_contains($type, '?');
$type = $nullable ? str_replace('?', '', $type) : $type;
[$type, $length] = $this->getTypeAndLength($field, $type);