for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.
Common duplication problems, and corresponding solutions are:
<?php
use Migrations\AbstractMigration;
class AlterIncidents extends AbstractMigration
{
/**
* Change Method.
*
* More information on this method is available here:
* http://docs.phinx.org/en/latest/migrations.html#the-change-method
* @return void
*/
public function change()
$table = $this->table('incidents');
$table->changeColumn('error_message', 'string', [
'default' => null,
'limit' => 200,
'null' => true,
]);
$table->update();
}