Showing 3,246 of 4,217 total issues
Function _framework_destruct
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function _framework_destruct()
{
$this->PROFILING && $this->_timing[] = [microtime(true), __CLASS__, __FUNCTION__, $this->trace_string(), func_get_args()];
// Restore startup working directory
chdir($this->_CWD);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function rglob
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function rglob($folder, $pattern = '*')
{
$folder = rtrim($folder, '/');
if (false === strpos($pattern, '[')) {
$pattern = $this->_sql_regcase($pattern);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function load_db_class
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function load_db_class()
{
static $_loaded_class;
if ($_loaded_class) {
return $_loaded_class;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function data_get_latest_languages
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function data_get_latest_languages()
{
$url = 'https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes';
$f2 = __DIR__ . '/' . basename($url) . '.table.html';
if (!file_exists($f2)) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _check_birth_date
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function _check_birth_date($CUR_VALUE = '')
{
// TODO: rewrite me
$_POST['birth_date'] = $CUR_VALUE;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function scan
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function scan($path)
{
global $phar, $baselen, $total;
foreach (glob($path . '/' . $this->mask) as $file) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function phone_cleanup
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function phone_cleanup($in, $params = [], $fields = [], &$error = '')
{
$error = false;
$country_prefix = $params['param'] ?: '38';
$p_len = strlen($country_prefix);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function process_example
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function process_example() {
$libs_root = $this->libs_root;
$example = $this->example;
if (!is_callable($example)) {
return false;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _get_services
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function _get_services()
{
$services = [];
$suffix = '.php';
$dir = 'share/services/';
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function get_all_properties
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function get_all_properties($section = 'all')
{
$data = [];
foreach (_class('core_api')->get_properties($section) as $module => $props) {
$i++;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function get_urls_from_css
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function get_urls_from_css($css)
{
preg_match_all('~url\([\']?(?P<url>.*?)[\']?\)~ims', $css, $m);
$urls = [];
foreach ((array) $m['url'] as $url) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function test_yf_db_installer_basic
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function test_yf_db_installer_basic()
{
if ($this->_need_skip_test(__FUNCTION__)) {
return;
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function db_query
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function &db_query($sql = '', $db_connection = false)
{
if ( ! $db_connection) {
db_connect();
$db_connection = $GLOBALS['_db_connection'];
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function test_sql_to_php_sakila
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function test_sql_to_php_sakila()
{
if ($this->_need_skip_test(__FUNCTION__)) {
return;
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _need_skip_test
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public static function _need_skip_test($name)
{
if (main()->is_hhvm()) {
if (in_array($name, ['test_drop_database', 'test_create_database', 'test_rename_database'])) {
return true;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function test_resize
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function test_resize()
{
if (getenv('CI') == 'jenkins') {
$this->markTestSkipped('Right now we skip this test, when running inside Jenkins.');
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _do_compress_php_file
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function _do_compress_php_file($file_to_open = '', $file_to_save = '')
{
$source = file_get_contents($file_to_open);
// Removes comments
foreach ((array) token_get_all($source) as $token) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _do_compress_php_file
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function _do_compress_php_file($file_to_open = '', $file_to_save = '')
{
$source = file_get_contents($file_to_open);
// Removes comments
foreach ((array) token_get_all($source) as $token) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function test_do
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function test_do()
{
ini_set('default_socket_timeout', $this->TIMEOUT);
$data = require YF_PATH . '.dev/scripts/assets/assets_urls_collect.php';
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _debug_remove_from_url
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function _debug_remove_from_url($uri = '', $qs = '')
{
if (empty($uri)) {
$uri = $_SERVER['REQUEST_URI'];
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"