Skip to content

Commit

Permalink
Refactoring (not_operator_with_successor_space => false)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kristories committed Jan 11, 2022
1 parent ef5c8d0 commit a89cf0b
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions src/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ public function __construct(array $userSettings = [])
}

if (class_exists('\Leaf\Anchor\CSRF')) {
if (! Anchor\CSRF::token()) {
if (!Anchor\CSRF::token()) {
Anchor\CSRF::init();
}

if (! Anchor\CSRF::verify()) {
if (!Anchor\CSRF::verify()) {
$csrfError = Anchor\CSRF::errors()['token'];
Http\Response::status(400);
echo Exception\General::csrf($csrfError);
Expand Down Expand Up @@ -254,7 +254,7 @@ public function config($name, $value = null)
*/
public function logger()
{
if (! $this->log) {
if (!$this->log) {
trigger_error('You need to enable logging to use this feature! Set log.enabled to true and install the logger module');
}

Expand Down
2 changes: 1 addition & 1 deletion src/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class Config
public static function set($item, $value = null)
{
if (is_string($item)) {
if (! strpos($item, '.')) {
if (!strpos($item, '.')) {
static::$settings[$item] = $value;
} else {
static::$settings = array_merge(
Expand Down
4 changes: 2 additions & 2 deletions src/Exception/General.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ protected function handleException($throwable)
*/
public static function handleErrors($errno, $errstr = '', $errfile = '', $errline = '')
{
if (! ($errno & error_reporting())) {
if (!($errno & error_reporting())) {
return;
}

Expand Down Expand Up @@ -91,7 +91,7 @@ public static function handleErrors($errno, $errstr = '', $errfile = '', $errlin
*/
public static function toException($errno, $errstr = '', $errfile = '', $errline = '')
{
if (! ($errno & error_reporting())) {
if (!($errno & error_reporting())) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/Middleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ final public function next()
{
$nextMiddleware = $this->next;

if (! $nextMiddleware) {
if (!$nextMiddleware) {
return;
}

Expand Down
8 changes: 4 additions & 4 deletions src/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

if (! function_exists('app')) {
if (!function_exists('app')) {
/**
* Return the Leaf instance
*
Expand All @@ -12,7 +12,7 @@ function app()
{
$app = Leaf\Config::get("app")["instance"] ?? null;

if (! $app) {
if (!$app) {
$app = new Leaf\App();
Leaf\Config::set("app", ["instance" => $app]);
}
Expand All @@ -21,7 +21,7 @@ function app()
}
}

if (! function_exists('_env')) {
if (!function_exists('_env')) {
/**
* Gets the value of an environment variable.
*
Expand All @@ -33,7 +33,7 @@ function _env($key, $default = null)
{
$item = getenv($key);

if (! isset($_ENV[$key]) || (isset($_ENV[$key]) && $_ENV[$key] == null)) {
if (!isset($_ENV[$key]) || (isset($_ENV[$key]) && $_ENV[$key] == null)) {
$item = $default;
}

Expand Down

0 comments on commit a89cf0b

Please sign in to comment.