Showing 39 of 47 total issues
File block.blade.php
has 6704 lines of code (exceeds 250 allowed). Consider refactoring. Open
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
File block.blade.php
has 6704 lines of code (exceeds 250 allowed). Consider refactoring. Open
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
TraceablePDO
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
class TraceablePDO extends PDO
{
/** @var PDO */
protected $pdo;
public $events = null;
Function analyze
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function analyze($object = '')
{
$request = $this->collectors['request'];
$info = $request->getInfo();
$params = array_merge($info['get'], $info['post'], $info['cookies']);
- 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 deepAnalyze
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function deepAnalyze($content)
{
$foundGuilty = false;
$charge = [];
foreach ($this->infected as $infected):
- 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 analyze
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function analyze($query, $bindings = [])
{
// Get the parameters (all).
$request = $this->collectors['request'];
- 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
Method getDefaults
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getDefaults()
{
$defaults = [
"app_key" => "",
"app_secret" => "",
Method analyzeFile
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function analyzeFile($input = '', $file = [])
{
$score = 0;
$ruleIds = [];
Method run
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function run()
{
// Get the request info.
$request = $this->collectors['request'];
Method update
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function update()
{
$response = $this->dispatcher->trigger('update', [
'sdk_version'=>$this->config['version'],
'php_version'=>PHP_VERSION,
Method sendToJail
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function sendToJail($severity = 'low', $charge = [], $code = [])
{
// Based on severity and config. Let's judge it.
$incidentId = $this->generateIncidentId($this->collectors['user']->getId());
Method analyze
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function analyze($query, $bindings = [])
{
// Get the parameters (all).
$request = $this->collectors['request'];
Method deepAnalyze
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function deepAnalyze($exception)
{
$this->issue('exceptions');
if (!$this->isInScope($exception)) {
// echo 'NON';
Method logInternalError
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function logInternalError($exception)
{
if (!is_writable($this->config['logsDir'])) {
return;
}
Function run
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function run($value, $target = '*', $tag = '*')
{
if ($target !== '*' && $target !== $this->data['target']) {
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 exposeHeaders
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
private function exposeHeaders()
{
if (function_exists('header_remove')) {
header_remove('x-powered-by');
} else {
- 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 collectFromStack
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function collectFromStack()
{
$stack = array_reverse($this->stack);
foreach ($this->stack as $trace):
- 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 getBaseDirectory
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function getBaseDirectory()
{
// -- first method --
//
- 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 handleExceptions
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function handleExceptions($exception, $is_exception = true)
{
if ($this->callback !== null) {
call_user_func($this->callback, $exception);
}
- 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 sendToJail
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function sendToJail($severity = 'low', $charge = [], $code = [])
{
// Based on severity and config. Let's judge it.
$incidentId = $this->generateIncidentId($this->collectors['user']->getId());
- 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"