src/Ace/Commands/Migrations/MigrationRunCommand.php
/**
	 * Lists statements and errors in the output for a dry run.
	 *
	 * @param SchemaRecorderBucket $bucket
	 * @param OutputInterface $out
	 * @return void
	 */
Lists statements and errors in the output for a dry run.
@param SchemaRecorderBucket $bucket
@param OutputInterface $out
@return void
Lists statements and errors in the output for a dry run . @param SchemaRecorderBucket $bucket @param OutputInterface $out @return void
private function drawSchemaBucket(SchemaRecorderBucket $bucket, OutputInterface $out) {
		$statements = $bucket->all();
		foreach ($statements as $statement) {
			$exception = $statement->getException();
			$color = $exception ? 'red' : 'green';
			$out->writeln(sprintf(
				'  <fg=%s>→  intercept (%s):</> %s',
				$color,
				$statement->getConnectionName(),
				$statement->getQuery()
			));
			if ($exception) {
				$out->writeln(sprintf('  <fg=red>→  caught: %s</>', $exception->getMessage()));
			}
		}
		if (empty($statement)) {
			$out->writeln('  <fg=red>→  no intercepts</> were captured for this migration');
		}
		$out->writeln('');
	}
private function drawSchemaBucket ( SchemaRecorderBucket $ bucket , OutputInterface $ out ) { $ statements = $ bucket -> all ( ) ; foreach ( $ statements as $ statement ) { $ exception = $ statement -> getException ( ) ; $ color = $ exception ? 'red' : 'green' ; $ out -> writeln ( sprintf ( '  <fg=%s>→  intercept (%s):</> %s', $ color , $ statement -> getConnectionName ( ) , $ statement -> getQuery ( ) ) ) ; if ( $ exception ) { $ out -> writeln ( sprintf ( '  <fg=red>→  caught: %s</>',  $ x ception-> ge tMessage() ) ) ; } } if ( empty ( $ statement ) ) { $ out -> writeln ( '  <fg=red>→  no intercepts</> were captured for this migration'); } $ out -> writeln ( '' ) ; }
Lists statements and errors in the output for a dry run.
Lists statements and errors in the output for a dry run .