Everywhere yoda conditions are

This commit is contained in:
David Stone
2025-02-09 00:20:10 -07:00
parent d74f6d1a53
commit be0ab98895
213 changed files with 691 additions and 412 deletions

View File

@ -23,6 +23,7 @@ abstract class Enum {
* The default value.
*/
const __default = false;
// phpcs:ignore
/**
* The options available.
@ -31,10 +32,12 @@ abstract class Enum {
* @var array
*/
static $options = [];
/**
* @var string
*/
private $value = '';
/**
* Constructor method. Takes the value you want to set.
*
@ -54,6 +57,7 @@ abstract class Enum {
* @return array
*/
abstract protected function classes();
/**
* Returns an array with values => labels.
*
@ -61,6 +65,7 @@ abstract class Enum {
* @return void
*/
abstract protected function labels();
/**
* Returns an array with values => labels.
*
@ -186,7 +191,7 @@ abstract class Enum {
static $instance;
if ($instance === null) {
if (null === $instance) {
$instance = new static();
}

View File

@ -51,11 +51,7 @@ abstract class Table extends \BerlinDB\Database\Table {
return false;
}
if ( ! is_main_site()) {
return false;
}
return true;
return (bool) is_main_site();
}
/**