Showing 39 of 73 total issues
Method __construct
has 457 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct($class)
{
$this->class = $class;
$this->texts = [
'constructor_data' => [
File DeCaptchaWiki.php
has 724 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace jumper423\decaptcha\core;
/**
Method init
has 287 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function init()
{
parent::init();
$this->actions[static::ACTION_RECOGNIZE] = [
Method init
has 231 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function init()
{
parent::init();
$this->actions[static::ACTION_RECOGNIZE] = [
Method init
has 139 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function init()
{
parent::init();
unset(
Method init
has 136 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function init()
{
parent::init();
unset(
Function decodeResponse
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
protected function decodeResponse($action, $data)
{
if (!array_key_exists($action, $this->decodeSettings[static::DECODE_ACTION])) {
throw new DeCaptchaErrors('нет action');
}
- 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 init
has 98 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function init()
{
parent::init();
unset(
File RuCaptcha.php
has 330 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace jumper423\decaptcha\services;
use jumper423\decaptcha\core\DeCaptchaBase;
Function getParams
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
protected function getParams($action, $field = null)
{
if (empty($this->actions[$action])) {
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
Method init
has 91 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function init()
{
parent::init();
unset(
Method init
has 91 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function init()
{
parent::init();
unset(
Method init
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function init()
{
parent::init();
$this->paramsNames[static::ACTION_FIELD_PROXYTYPE] = 'proxyType';
File Anticaptcha.php
has 284 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace jumper423\decaptcha\services;
use jumper423\decaptcha\core\DeCaptchaBase;
File DeCaptchaAbstract.php
has 281 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace jumper423\decaptcha\core;
use Exception;
Method init
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function init()
{
parent::init();
unset(
Method init
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function init()
{
parent::init();
unset(
Method viewExamples
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function viewExamples()
{
$class = $this->class;
$reflection = (new \ReflectionClass($class));
Method init
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function init()
{
parent::init();
unset(
Function viewFields
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
protected function viewFields()
{
$class = $this->class;
$str = " {$this->getText(['table', 'th', 'name'])} | {$this->getText(['table', 'th', 'code'])} | {$this->getText(['table', 'th', 'type'])} | {$this->getText(['table', 'th', 'req'])} | {$this->getText(['table', 'th', 'def'])} | {$this->getText(['table', 'th', 'enum'])} | {$this->getText(['table', 'th', 'desc'])} ".PHP_EOL;
$str .= ' --- | --- | --- | --- | --- | --- | --- '.PHP_EOL;
- 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"