<exclude-pattern>php/Spyc.php</exclude-pattern>
+ <rule ref="Generic.WhiteSpace.DisallowSpaceIndent"/>
+
<rule ref="Generic.CodeAnalysis.VariableAnalysis">
<exclude name="Generic.CodeAnalysis.VariableAnalysis.UnusedVariable"/>
$value = array( $value );
}
} else {
- $value = $details['default'];
+ $value = $details['default'];
}
$sanitized_config[ $key ] = $value;
self::set_wp_root( $this->config );
// First try at showing man page
- if ( 'help' === $this->arguments[0] &&
- ( isset( $this->arguments[1] ) || !$this->wp_exists() ) ) {
+ if ( 'help' === $this->arguments[0] && ( isset( $this->arguments[1] ) || !$this->wp_exists() ) ) {
$this->_run_command();
}
// Some types of parameters shouldn't be mandatory
if ( isset( $param['optional'] ) && !$param['optional'] ) {
- if ( 'flag' === $param['type'] ||
- ( 'assoc' === $param['type'] && $param['value']['optional'] )
- ) {
+ if ( 'flag' === $param['type'] || ( 'assoc' === $param['type'] && $param['value']['optional'] ) ) {
$param['type'] = 'unknown';
}
}
}
if ( version_compare( PHP_VERSION, '5.3.0', '<' ) ) {
- printf( "Error: WP-CLI requires PHP %s or newer. You are running version %s.\n", '5.3.0', PHP_VERSION );
+ printf( "Error: WP-CLI requires PHP %s or newer. You are running version %s.\n", '5.3.0', PHP_VERSION );
die(-1);
}
private static function render_subcommands( $command ) {
$subcommands = array();
foreach ( $command->get_subcommands() as $subcommand ) {
- $subcommands[ $subcommand->get_name() ] = $subcommand->get_shortdesc();
+ $subcommands[ $subcommand->get_name() ] = $subcommand->get_shortdesc();
}
$max_len = self::get_max_len( array_keys( $subcommands ) );
if ( in_array( $col, $skip_columns ) )
continue;
- $count = self::handle_col( $col, $primary_key, $table, $old, $new,
- $dry_run );
+ $count = self::handle_col( $col, $primary_key, $table, $old, $new, $dry_run );
$report[] = array( $table, $col, $count );