Skip to content

Instantly share code, notes, and snippets.

@jwage
Created May 16, 2018 01:14
Show Gist options
  • Save jwage/4d6dd4e1b7c0011ad233f8de090500ae to your computer and use it in GitHub Desktop.
Save jwage/4d6dd4e1b7c0011ad233f8de090500ae to your computer and use it in GitHub Desktop.
<?php
// original
foreach ($this->migrationTable->getColumnNames() as $columnName) {
if (! $table->hasColumn($columnName)) {
$this->upToDate = false;
break;
}
}
// inverted
foreach ($this->migrationTable->getColumnNames() as $columnName) {
if ($table->hasColumn($columnName)) {
continue;
}
$this->upToDate = false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment