mrcnpdlk/mojepanstwo-api

View on GitHub
src/mrcnpdlk/MojePanstwo/Model/KrsPerson.php

Summary

Maintainability
A
0 mins
Test Coverage

The class KrsPerson has 16 fields. Consider redesigning KrsPerson to keep the number of fields under 15.
Open

class KrsPerson extends ModelAbstract
{
    const CONTEXT           = 'krs_osoby';
    const PULL_NONE         = 0;
    const PULL_KRS_ENTITIES = 1;

TooManyFields

Since: 0.1

Classes that have too many fields could be redesigned to have fewer fields, possibly through some nested object grouping of some of the information. For example, a class with city/state/zip fields could instead have one Address field.

Example

class Person {
   protected $one;
   private $two;
   private $three;
   [... many more fields ...]
}

Source https://phpmd.org/rules/codesize.html#toomanyfields

Missing class import via use statement (line '111', column '66').
Open

            $this->data_urodzenia = $this->data_urodzenia ? (new \DateTime($this->data_urodzenia))->format('Y-m-d') : null;

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Avoid unused parameters such as '$oLayers'.
Open

    public function __construct(\stdClass $oData = null, \stdClass $oLayers = null)

UnusedFormalParameter

Since: 0.2

Avoid passing parameters to methods or constructors and then not using those parameters.

Example

class Foo
{
    private function bar($howdy)
    {
        // $howdy is not used
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter

There are no issues that match your filters.

Category
Status