diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index b4c828546..8b7d9a841 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -18,6 +18,9 @@ return (new PhpCsFixer\Config) 'array_syntax' => [ 'syntax' => 'short' ], + 'binary_operator_spaces' => [ + 'default' => 'single_space' + ], 'blank_line_after_namespace' => true, 'blank_line_after_opening_tag' => true, 'blank_line_before_statement' => [ @@ -73,6 +76,7 @@ return (new PhpCsFixer\Config) ], 'single_import_per_statement' => true, 'strict_param' => true, + 'unary_operator_spaces' => true, ]) ->setFinder($finder) ->setIndent("\t") diff --git a/src/entity/Entity.php b/src/entity/Entity.php index 1631667c5..a431e3ecc 100644 --- a/src/entity/Entity.php +++ b/src/entity/Entity.php @@ -832,10 +832,10 @@ abstract class Entity{ $diffZ = $z - $floorZ; if($world->getBlockAt($floorX, $floorY, $floorZ)->isSolid()){ - $westNonSolid = !$world->getBlockAt($floorX - 1, $floorY, $floorZ)->isSolid(); - $eastNonSolid = !$world->getBlockAt($floorX + 1, $floorY, $floorZ)->isSolid(); - $downNonSolid = !$world->getBlockAt($floorX, $floorY - 1, $floorZ)->isSolid(); - $upNonSolid = !$world->getBlockAt($floorX, $floorY + 1, $floorZ)->isSolid(); + $westNonSolid = !$world->getBlockAt($floorX - 1, $floorY, $floorZ)->isSolid(); + $eastNonSolid = !$world->getBlockAt($floorX + 1, $floorY, $floorZ)->isSolid(); + $downNonSolid = !$world->getBlockAt($floorX, $floorY - 1, $floorZ)->isSolid(); + $upNonSolid = !$world->getBlockAt($floorX, $floorY + 1, $floorZ)->isSolid(); $northNonSolid = !$world->getBlockAt($floorX, $floorY, $floorZ - 1)->isSolid(); $southNonSolid = !$world->getBlockAt($floorX, $floorY, $floorZ + 1)->isSolid(); diff --git a/src/utils/Config.php b/src/utils/Config.php index c3a791095..49f111728 100644 --- a/src/utils/Config.php +++ b/src/utils/Config.php @@ -341,14 +341,14 @@ class Config{ $this->config[$base] = []; } - $base =& $this->config[$base]; + $base = &$this->config[$base]; while(count($vars) > 0){ $baseKey = array_shift($vars); if(!isset($base[$baseKey])){ $base[$baseKey] = []; } - $base =& $base[$baseKey]; + $base = &$base[$baseKey]; } $base = $value; @@ -393,14 +393,14 @@ class Config{ $vars = explode(".", $key); - $currentNode =& $this->config; + $currentNode = &$this->config; while(count($vars) > 0){ $nodeName = array_shift($vars); if(isset($currentNode[$nodeName])){ if(count($vars) === 0){ //final node unset($currentNode[$nodeName]); }elseif(is_array($currentNode[$nodeName])){ - $currentNode =& $currentNode[$nodeName]; + $currentNode = &$currentNode[$nodeName]; } }else{ break;