Showing 9 of 27 total issues
Function __construct
has a Cognitive Complexity of 52 (exceeds 5 allowed). Consider refactoring. Open
public function __construct(\stdClass $oData = null, \stdClass $oLayers = null)
{
parent::__construct($oData);
if ($oData) {
$this->id = $this->convertToId($this->id);
- 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 __construct
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct(\stdClass $oData = null, \stdClass $oLayers = null)
{
parent::__construct($oData);
if ($oData) {
$this->id = $this->convertToId($this->id);
Function __construct
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function __construct(string $nts = null)
{
if (null === $nts || \strlen($nts) < 10) {
Api::getInstance()
->getClient()
- 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 getKrsEntity
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getKrsEntity($krs, int $pullFlag = KrsEntity::PULL_NONE): KrsEntity
{
$krs = (int)$krs;
$qb = QueryBuilder::create(KrsEntity::class)
->addLayer('jedynyAkcjonariusz')
Method __construct
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct(string $nts = null)
{
if (null === $nts || \strlen($nts) < 10) {
Api::getInstance()
->getClient()
Method get
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function get(): SearchResponse
{
$res = Api::getInstance()
->getClient()
Function __construct
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function __construct(\stdClass $oData = null, \stdClass $oLayers = null)
{
if (null !== $oData) {
foreach ($oData as $key => $value) {
$key = $this->stripProperty($key);
- 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 getKrsEntity
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function getKrsEntity($krs, int $pullFlag = KrsEntity::PULL_NONE): KrsEntity
{
$krs = (int)$krs;
$qb = QueryBuilder::create(KrsEntity::class)
->addLayer('jedynyAkcjonariusz')
- 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 __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct(string $self = null, string $first = null, string $next = null, string $last = null, string $prev = null)