Skip to content

Commit f9cd854

Browse files
committed
Fixed negation styling
1 parent 9ca8c29 commit f9cd854

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

application/libraries/REST_Controller.php

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ public function __construct($config = 'rest')
422422
$supported_formats = [];
423423
}
424424

425-
if (!is_array($supported_formats))
425+
if ( ! is_array($supported_formats))
426426
{
427427
$supported_formats = [$supported_formats];
428428
}
@@ -553,7 +553,7 @@ public function __construct($config = 'rest')
553553
}
554554

555555
// When there is no specific override for the current class/method, use the default auth value set in the config
556-
if ($this->auth_override === FALSE && (!($this->config->item('rest_enable_keys') && $this->_allow === TRUE) || ($this->config->item('allow_auth_and_keys') === TRUE && $this->_allow === TRUE)))
556+
if ($this->auth_override === FALSE && ! ($this->config->item('rest_enable_keys') && $this->_allow === TRUE) || ($this->config->item('allow_auth_and_keys') === TRUE && $this->_allow === TRUE))
557557
{
558558
$rest_auth = strtolower($this->config->item('rest_auth'));
559559
switch ($rest_auth)
@@ -620,10 +620,10 @@ public function _remap($object_called, $arguments = [])
620620
$controller_method = $object_called.'_'.$this->request->method;
621621

622622
// Do we want to log this method (if allowed by config)?
623-
$log_method = !(isset($this->methods[$controller_method]['log']) && $this->methods[$controller_method]['log'] === FALSE);
623+
$log_method = ! (isset($this->methods[$controller_method]['log']) && $this->methods[$controller_method]['log'] === FALSE);
624624

625625
// Use keys for this method?
626-
$use_key = !(isset($this->methods[$controller_method]['key']) && $this->methods[$controller_method]['key'] === FALSE);
626+
$use_key = ! (isset($this->methods[$controller_method]['key']) && $this->methods[$controller_method]['key'] === FALSE);
627627

628628
// They provided a key, but it wasn't valid, so get them out of here
629629
if ($this->config->item('rest_enable_keys') && $use_key && $this->_allow === FALSE)
@@ -985,7 +985,7 @@ protected function _detect_api_key()
985985
// Find the key from server or arguments
986986
if (($key = isset($this->_args[$api_key_variable]) ? $this->_args[$api_key_variable] : $this->input->server($key_name)))
987987
{
988-
if (!($row = $this->rest->db->where($this->config->item('rest_key_column'), $key)->get($this->config->item('rest_keys_table'))->row()))
988+
if ( ! ($row = $this->rest->db->where($this->config->item('rest_key_column'), $key)->get($this->config->item('rest_keys_table'))->row()))
989989
{
990990
return FALSE;
991991
}
@@ -1213,12 +1213,12 @@ protected function _auth_override_check()
12131213
$auth_override_class_method = $this->config->item('auth_override_class_method');
12141214

12151215
// Check to see if the override array is even populated
1216-
if (!empty($auth_override_class_method))
1216+
if ( ! empty($auth_override_class_method))
12171217
{
1218-
// check for wildcard flag for rules for classes
1219-
if (!empty($auth_override_class_method[$this->router->class]['*'])) // Check for class overrides
1218+
// Check for wildcard flag for rules for classes
1219+
if ( ! empty($auth_override_class_method[$this->router->class]['*'])) // Check for class overrides
12201220
{
1221-
// None auth override found, prepare nothing but send back a TRUE override flag
1221+
// No auth override found, prepare nothing but send back a TRUE override flag
12221222
if ($auth_override_class_method[$this->router->class]['*'] === 'none')
12231223
{
12241224
return TRUE;
@@ -1258,7 +1258,7 @@ protected function _auth_override_check()
12581258
}
12591259

12601260
// Check to see if there's an override value set for the current class/method being called
1261-
if (!empty($auth_override_class_method[$this->router->class][$this->router->method]))
1261+
if ( ! empty($auth_override_class_method[$this->router->class][$this->router->method]))
12621262
{
12631263
// None auth override found, prepare nothing but send back a TRUE override flag
12641264
if ($auth_override_class_method[$this->router->class][$this->router->method] === 'none')
@@ -1304,10 +1304,10 @@ protected function _auth_override_check()
13041304
$auth_override_class_method_http = $this->config->item('auth_override_class_method_http');
13051305

13061306
// Check to see if the override array is even populated
1307-
if (!empty($auth_override_class_method_http))
1307+
if ( ! empty($auth_override_class_method_http))
13081308
{
13091309
// check for wildcard flag for rules for classes
1310-
if(!empty($auth_override_class_method_http[$this->router->class]['*'][$this->request->method]))
1310+
if ( ! empty($auth_override_class_method_http[$this->router->class]['*'][$this->request->method]))
13111311
{
13121312
// None auth override found, prepare nothing but send back a TRUE override flag
13131313
if ($auth_override_class_method_http[$this->router->class]['*'][$this->request->method] === 'none')
@@ -1349,7 +1349,7 @@ protected function _auth_override_check()
13491349
}
13501350

13511351
// Check to see if there's an override value set for the current class/method/HTTP-method being called
1352-
if(!empty($auth_override_class_method_http[$this->router->class][$this->router->method][$this->request->method]))
1352+
if ( ! empty($auth_override_class_method_http[$this->router->class][$this->router->method][$this->request->method]))
13531353
{
13541354
// None auth override found, prepare nothing but send back a TRUE override flag
13551355
if ($auth_override_class_method_http[$this->router->class][$this->router->method][$this->request->method] === 'none')
@@ -1854,7 +1854,7 @@ protected function _check_login($username = NULL, $password = FALSE)
18541854
$rest_auth = strtolower($this->config->item('rest_auth'));
18551855
$valid_logins = $this->config->item('rest_valid_logins');
18561856

1857-
if (!$this->config->item('auth_source') && $rest_auth === 'digest')
1857+
if ( ! $this->config->item('auth_source') && $rest_auth === 'digest')
18581858
{
18591859
// For digest we do not have a password passed as argument
18601860
return md5($username.':'.$this->config->item('rest_realm').':'.(isset($valid_logins[$username]) ? $valid_logins[$username] : ''));
@@ -1904,7 +1904,7 @@ protected function _check_php_session()
19041904
$key = $this->config->item('auth_source');
19051905

19061906
// If falsy, then the user isn't logged in
1907-
if (!$this->session->userdata($key))
1907+
if ( ! $this->session->userdata($key))
19081908
{
19091909
// Display an error response
19101910
$this->response([

0 commit comments

Comments
 (0)