diff --git a/src/Console/ConsoleIo.php b/src/Console/ConsoleIo.php index d452d248364..620e0b15c3f 100644 --- a/src/Console/ConsoleIo.php +++ b/src/Console/ConsoleIo.php @@ -101,10 +101,10 @@ class ConsoleIo */ public function __construct(ConsoleOutput $out = null, ConsoleOutput $err = null, ConsoleInput $in = null, HelperRegistry $helpers = null) { - $this->_out = $out ? $out : new ConsoleOutput('php://stdout'); - $this->_err = $err ? $err : new ConsoleOutput('php://stderr'); - $this->_in = $in ? $in : new ConsoleInput('php://stdin'); - $this->_helpers = $helpers ? $helpers : new HelperRegistry(); + $this->_out = $out ?: new ConsoleOutput('php://stdout'); + $this->_err = $err ?: new ConsoleOutput('php://stderr'); + $this->_in = $in ?: new ConsoleInput('php://stdin'); + $this->_helpers = $helpers ?: new HelperRegistry(); $this->_helpers->setIo($this); } diff --git a/src/Core/functions.php b/src/Core/functions.php index d54cda6e7f1..24c7ce21852 100644 --- a/src/Core/functions.php +++ b/src/Core/functions.php @@ -66,7 +66,7 @@ function h($text, $double = true, $charset = null) $charset = $double; } - return htmlspecialchars($text, ENT_QUOTES | ENT_SUBSTITUTE, ($charset) ? $charset : $defaultCharset, $double); + return htmlspecialchars($text, ENT_QUOTES | ENT_SUBSTITUTE, $charset ?: $defaultCharset, $double); } } diff --git a/src/Database/Schema/PostgresSchema.php b/src/Database/Schema/PostgresSchema.php index 2e41a930c19..8fa3f3b1dd9 100644 --- a/src/Database/Schema/PostgresSchema.php +++ b/src/Database/Schema/PostgresSchema.php @@ -171,7 +171,7 @@ public function convertColumnDescription(TableSchema $schema, $row) if ($field['type'] === 'numeric' || $field['type'] === 'decimal') { $field['length'] = $row['column_precision']; - $field['precision'] = $row['column_scale'] ? $row['column_scale'] : null; + $field['precision'] = $row['column_scale'] ?: null; } $schema->addColumn($row['name'], $field); }