Code Duplication    Length = 12-12 lines in 2 locations

src/Xethron/MigrationsGenerator/MigrateGenerateCommand.php 2 locations

@@ 236-247 (lines=12) @@
233
	 * @param  array $tables List of tables to create migrations for
234
	 * @return void
235
	 */
236
	protected function generateTablesAndIndices( array $tables )
237
	{
238
		$this->method = 'create';
239
240
		foreach ( $tables as $table ) {
241
			$this->table = $table;
242
			$this->migrationName = 'create_'. $this->table .'_table';
243
			$this->fields = $this->schemaGenerator->getFields( $this->table );
244
245
			$this->generate();
246
		}
247
	}
248
249
	/**
250
	 * Generate foreign key migrations.
@@ 255-266 (lines=12) @@
252
	 * @param  array $tables List of tables to create migrations for
253
	 * @return void
254
	 */
255
	protected function generateForeignKeys( array $tables )
256
	{
257
		$this->method = 'table';
258
259
		foreach ( $tables as $table ) {
260
			$this->table = $table;
261
			$this->migrationName = 'add_foreign_keys_to_'. $this->table .'_table';
262
			$this->fields = $this->schemaGenerator->getForeignKeyConstraints( $this->table );
263
264
			$this->generate();
265
		}
266
	}
267
268
	/**
269
	 * Generate Migration for the current table.