$format = strtolower( $this->getOption( 'format', 'PHP' ) );
$validFormat = in_array( $format, self::$outFormats );
- if ( ! $validFormat ) {
+ if ( !$validFormat ) {
$this->error( "--format set to an unrecognized format", 0 );
$error_out = true;
}
if ( $this->regex ) {
$this->regex = '/' . $this->regex . '/';
if ( $this->hasOption( 'iregex' ) ) {
- $this->regex .= 'i'; # case insensitive regex
+ $this->regex .= 'i'; # case insensitive regex
}
}
$res = array();
# Sane default: dump any wg / wmg variable
- if ( ! $this->regex && ! $this->getOption( 'settings' ) ) {
+ if ( !$this->regex && !$this->getOption( 'settings' ) ) {
$this->regex = '/^wm?g/';
}
protected function formatVarDump( $res ) {
$ret = '';
foreach ( $res as $key => $value ) {
- ob_start(); # intercept var_dump() output
+ ob_start(); # intercept var_dump() output
print "\${$key} = ";
var_dump( $value );
# grab var_dump() output and discard it from the output buffer
return false;
}
}
+
return true;
- } elseif ( is_scalar( $value ) ) {
+ } elseif ( is_scalar( $value ) || $value === null ) {
return true;
}
+
return false;
}
}