mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
another replace "OR" operator with "||"
This commit is contained in:
parent
7f85f539ce
commit
74803e41c0
@ -310,7 +310,7 @@ class MemcachedHandler implements CacheInterface
|
||||
*/
|
||||
public function isSupported(): bool
|
||||
{
|
||||
return (extension_loaded('memcached') OR extension_loaded('memcache'));
|
||||
return (extension_loaded('memcached') || extension_loaded('memcache'));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -862,7 +862,7 @@ if ( ! function_exists('is_really_writable'))
|
||||
|
||||
return true;
|
||||
}
|
||||
elseif ( ! is_file($file) OR ( $fp = @fopen($file, 'ab')) === false)
|
||||
elseif ( ! is_file($file) || ( $fp = @fopen($file, 'ab')) === false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -1241,7 +1241,7 @@ abstract class BaseConnection implements ConnectionInterface
|
||||
*/
|
||||
public function escapeIdentifiers($item)
|
||||
{
|
||||
if ($this->escapeChar === '' OR empty($item) OR in_array($item, $this->reservedIdentifiers))
|
||||
if ($this->escapeChar === '' || empty($item) || in_array($item, $this->reservedIdentifiers))
|
||||
{
|
||||
return $item;
|
||||
}
|
||||
@ -1360,7 +1360,7 @@ abstract class BaseConnection implements ConnectionInterface
|
||||
|
||||
return $str;
|
||||
}
|
||||
else if (is_string($str) OR ( is_object($str) && method_exists($str, '__toString')))
|
||||
else if (is_string($str) || ( is_object($str) && method_exists($str, '__toString')))
|
||||
{
|
||||
return "'" . $this->escapeString($str) . "'";
|
||||
}
|
||||
|
@ -234,7 +234,7 @@ class MigrationRunner
|
||||
{
|
||||
|
||||
// Only include migrations within the scoop
|
||||
if (($method === 'up' && $version > $currentVersion && $version <= $targetVersion) OR ( $method === 'down' && $version <= $currentVersion && $version > $targetVersion)
|
||||
if (($method === 'up' && $version > $currentVersion && $version <= $targetVersion) || ( $method === 'down' && $version <= $currentVersion && $version > $targetVersion)
|
||||
)
|
||||
{
|
||||
|
||||
|
@ -217,7 +217,7 @@ class Connection extends BaseConnection implements ConnectionInterface
|
||||
$this->initialize();
|
||||
}
|
||||
|
||||
if (is_string($str) OR ( is_object($str) && method_exists($str, '__toString')))
|
||||
if (is_string($str) || ( is_object($str) && method_exists($str, '__toString')))
|
||||
{
|
||||
return pg_escape_literal($this->connID, $str);
|
||||
}
|
||||
|
@ -35,7 +35,7 @@
|
||||
* @since Version 1.0.0
|
||||
* @filesource
|
||||
*/
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
defined('BASEPATH') || exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* CodeIgniter Directory Helpers
|
||||
|
@ -105,7 +105,7 @@ class FileHandler extends BaseHandler implements HandlerInterface
|
||||
// Only add protection to php files
|
||||
if ($this->fileExtension === 'php')
|
||||
{
|
||||
$msg .= "<?php defined('BASEPATH') OR exit('No direct script access allowed'); ?>\n\n";
|
||||
$msg .= "<?php defined('BASEPATH') || exit('No direct script access allowed'); ?>\n\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user