Missing class import via use statement (line '63', column '36'). Open
$recordCollector->setRequest(new \App\Request([
- Read upRead up
- Exclude checks
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
Missing class import via use statement (line '175', column '36'). Open
$recordCollector->setRequest(new \App\Request([
- Read upRead up
- Exclude checks
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
Missing class import via use statement (line '120', column '36'). Open
$recordCollector->setRequest(new \App\Request([
- Read upRead up
- Exclude checks
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
Missing class import via use statement (line '92', column '36'). Open
$recordCollector->setRequest(new \App\Request([
- Read upRead up
- Exclude checks
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
Missing class import via use statement (line '34', column '36'). Open
$recordCollector->setRequest(new \App\Request([
- Read upRead up
- Exclude checks
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
Missing class import via use statement (line '147', column '36'). Open
$recordCollector->setRequest(new \App\Request([
- Read upRead up
- Exclude checks
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 using static access to class '\App\RecordCollector' in method 'testPlKrs'. Open
$recordCollector = \App\RecordCollector::getInstance('App\RecordCollectors\PlKrs', 'Accounts');
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
The method testVies uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
// @codeCoverageIgnoreStart
$this->markTestSkipped($response['error']);
// @codeCoverageIgnoreEnd
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid using static access to class '\App\RecordCollector' in method 'testDkCvr'. Open
$recordCollector = \App\RecordCollector::getInstance('App\RecordCollectors\DkCvr', 'Accounts');
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
The method testFrEnterpriseGouv uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
// @codeCoverageIgnoreStart
$this->markTestSkipped($response['error']);
// @codeCoverageIgnoreEnd
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid using static access to class '\App\RecordCollector' in method 'testUsaEdgarRegistryFromSec'. Open
$recordCollector = \App\RecordCollector::getInstance('App\RecordCollectors\UsaEdgarRegistryFromSec', 'Accounts');
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
The method testDkCvr uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
// @codeCoverageIgnoreStart
$this->markTestSkipped($response['error']);
// @codeCoverageIgnoreEnd
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid using static access to class '\App\RecordCollector' in method 'testFrEnterpriseGouv'. Open
$recordCollector = \App\RecordCollector::getInstance('App\RecordCollectors\FrEnterpriseGouv', 'Accounts');
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
The method testUsaEdgarRegistryFromSec uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
// @codeCoverageIgnoreStart
$this->markTestSkipped($response['error']);
// @codeCoverageIgnoreEnd
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid using static access to class '\App\RecordCollector' in method 'testVies'. Open
$recordCollector = \App\RecordCollector::getInstance('App\RecordCollectors\Vies', 'Accounts');
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
The method testNoBrregEnhetsregisteret uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
// @codeCoverageIgnoreStart
$this->markTestSkipped($response['error']);
// @codeCoverageIgnoreEnd
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method testPlKrs uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
// @codeCoverageIgnoreStart
$this->markTestSkipped($response['error']);
// @codeCoverageIgnoreEnd
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid using static access to class '\App\RecordCollector' in method 'testNoBrregEnhetsregisteret'. Open
$recordCollector = \App\RecordCollector::getInstance('App\RecordCollectors\NoBrregEnhetsregisteret', 'Accounts');
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Define a constant instead of duplicating this literal "vatNumber" 3 times. Open
'vatNumber' => '1180002425',
- Read upRead up
- Exclude checks
Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.
On the other hand, constants can be referenced from many places, but only need to be updated in a single place.
Noncompliant Code Example
With the default threshold of 3:
function run() { prepare('action1'); // Non-Compliant - 'action1' is duplicated 3 times execute('action1'); release('action1'); }
Compliant Solution
ACTION_1 = 'action1'; function run() { prepare(ACTION_1); execute(ACTION_1); release(ACTION_1); }
Exceptions
To prevent generating some false-positives, literals having less than 5 characters are excluded.
Define a constant instead of duplicating this literal "additional" 4 times. Open
$this->assertArrayHasKey('additional', $response);
- Read upRead up
- Exclude checks
Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.
On the other hand, constants can be referenced from many places, but only need to be updated in a single place.
Noncompliant Code Example
With the default threshold of 3:
function run() { prepare('action1'); // Non-Compliant - 'action1' is duplicated 3 times execute('action1'); release('action1'); }
Compliant Solution
ACTION_1 = 'action1'; function run() { prepare(ACTION_1); execute(ACTION_1); release(ACTION_1); }
Exceptions
To prevent generating some false-positives, literals having less than 5 characters are excluded.
Define a constant instead of duplicating this literal "Accounts" 12 times. Open
$recordCollector = \App\RecordCollector::getInstance('App\RecordCollectors\Vies', 'Accounts');
- Read upRead up
- Exclude checks
Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.
On the other hand, constants can be referenced from many places, but only need to be updated in a single place.
Noncompliant Code Example
With the default threshold of 3:
function run() { prepare('action1'); // Non-Compliant - 'action1' is duplicated 3 times execute('action1'); release('action1'); }
Compliant Solution
ACTION_1 = 'action1'; function run() { prepare(ACTION_1); execute(ACTION_1); release(ACTION_1); }
Exceptions
To prevent generating some false-positives, literals having less than 5 characters are excluded.
Define a constant instead of duplicating this literal "error" 12 times. Open
if (empty($response['error'])) {
- Read upRead up
- Exclude checks
Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.
On the other hand, constants can be referenced from many places, but only need to be updated in a single place.
Noncompliant Code Example
With the default threshold of 3:
function run() { prepare('action1'); // Non-Compliant - 'action1' is duplicated 3 times execute('action1'); release('action1'); }
Compliant Solution
ACTION_1 = 'action1'; function run() { prepare(ACTION_1); execute(ACTION_1); release(ACTION_1); }
Exceptions
To prevent generating some false-positives, literals having less than 5 characters are excluded.
Define a constant instead of duplicating this literal "fields" 10 times. Open
$this->assertArrayHasKey('fields', $response);
- Read upRead up
- Exclude checks
Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.
On the other hand, constants can be referenced from many places, but only need to be updated in a single place.
Noncompliant Code Example
With the default threshold of 3:
function run() { prepare('action1'); // Non-Compliant - 'action1' is duplicated 3 times execute('action1'); release('action1'); }
Compliant Solution
ACTION_1 = 'action1'; function run() { prepare(ACTION_1); execute(ACTION_1); release(ACTION_1); }
Exceptions
To prevent generating some false-positives, literals having less than 5 characters are excluded.
Define a constant instead of duplicating this literal "module" 6 times. Open
'module' => 'Accounts',
- Read upRead up
- Exclude checks
Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.
On the other hand, constants can be referenced from many places, but only need to be updated in a single place.
Noncompliant Code Example
With the default threshold of 3:
function run() { prepare('action1'); // Non-Compliant - 'action1' is duplicated 3 times execute('action1'); release('action1'); }
Compliant Solution
ACTION_1 = 'action1'; function run() { prepare(ACTION_1); execute(ACTION_1); release(ACTION_1); }
Exceptions
To prevent generating some false-positives, literals having less than 5 characters are excluded.
Define a constant instead of duplicating this literal "No required access to test this functionality" 5 times. Open
$this->markTestSkipped('No required access to test this functionality');
- Read upRead up
- Exclude checks
Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.
On the other hand, constants can be referenced from many places, but only need to be updated in a single place.
Noncompliant Code Example
With the default threshold of 3:
function run() { prepare('action1'); // Non-Compliant - 'action1' is duplicated 3 times execute('action1'); release('action1'); }
Compliant Solution
ACTION_1 = 'action1'; function run() { prepare(ACTION_1); execute(ACTION_1); release(ACTION_1); }
Exceptions
To prevent generating some false-positives, literals having less than 5 characters are excluded.
Call to undeclared method \Tests\App\RecordCollector::assertArrayHasKey
Open
$this->assertArrayHasKey('links', $response);
- Exclude checks
Call to undeclared method \Tests\App\RecordCollector::assertArrayHasKey
Open
$this->assertArrayHasKey('fields', $response);
- Exclude checks
Call to undeclared method \Tests\App\RecordCollector::assertArrayHasKey
Open
$this->assertArrayHasKey('LBL_REQUEST_ID', $response['fields']);
- Exclude checks
Call to undeclared method \Tests\App\RecordCollector::assertArrayHasKey
Open
$this->assertArrayHasKey('links', $response);
- Exclude checks
Call to undeclared method \Tests\App\RecordCollector::markTestSkipped
Open
$this->markTestSkipped('No required access to test this functionality');
- Exclude checks
Call to undeclared method \Tests\App\RecordCollector::assertArrayHasKey
Open
$this->assertArrayHasKey('fields', $response);
- Exclude checks
Call to undeclared method \Tests\App\RecordCollector::markTestSkipped
Open
$this->markTestSkipped('No required access to test this functionality');
- Exclude checks
Call to method isActive
from undeclared class \App\RecordCollectors\Base
(Did you mean class \App\Base or class \App\Cache\Base or class \App\Cli\Base or class \App\Controller\Base or class \App\Controller\View\Base or class \App\Db\Importers\Base or class \Tests\Base) Open
if (!$recordCollector->isActive()) {
- Exclude checks
Call to method setRequest
from undeclared class \App\RecordCollectors\Base
(Did you mean class \App\Base or class \App\Cache\Base or class \App\Cli\Base or class \App\Controller\Base or class \App\Controller\View\Base or class \App\Db\Importers\Base or class \Tests\Base) Open
$recordCollector->setRequest(new \App\Request([
- Exclude checks
Call to undeclared method \Tests\App\RecordCollector::markTestSkipped
Open
$this->markTestSkipped($response['error']);
- Exclude checks
Call to method isActive
from undeclared class \App\RecordCollectors\Base
(Did you mean class \App\Base or class \App\Cache\Base or class \App\Cli\Base or class \App\Controller\Base or class \App\Controller\View\Base or class \App\Db\Importers\Base or class \Tests\Base) Open
if (!$recordCollector->isActive()) {
- Exclude checks
Call to undeclared method \Tests\App\RecordCollector::assertEquals
Open
$this->assertEquals('1180002425', $response['fields']['vat_id']['data'][0]['raw']);
- Exclude checks
Call to undeclared method \Tests\App\RecordCollector::assertArrayHasKey
Open
$this->assertArrayHasKey('fields', $response);
- Exclude checks
Call to undeclared method \Tests\App\RecordCollector::assertArrayHasKey
Open
$this->assertArrayHasKey('additional', $response);
- Exclude checks
Call to undeclared method \Tests\App\RecordCollector::markTestSkipped
Open
$this->markTestSkipped('No required access to test this functionality');
- Exclude checks
Call to undeclared method \Tests\App\RecordCollector::markTestSkipped
Open
$this->markTestSkipped($response['error']);
- Exclude checks
Call to method setRequest
from undeclared class \App\RecordCollectors\Base
(Did you mean class \App\Base or class \App\Cache\Base or class \App\Cli\Base or class \App\Controller\Base or class \App\Controller\View\Base or class \App\Db\Importers\Base or class \Tests\Base) Open
$recordCollector->setRequest(new \App\Request([
- Exclude checks
Call to method isActive
from undeclared class \App\RecordCollectors\Base
(Did you mean class \App\Base or class \App\Cache\Base or class \App\Cli\Base or class \App\Controller\Base or class \App\Controller\View\Base or class \App\Db\Importers\Base or class \Tests\Base) Open
if (!$recordCollector->isActive()) {
- Exclude checks
Call to undeclared method \Tests\App\RecordCollector::assertEquals
Open
$this->assertEquals('PL1180002425', $response['fields']['Vat ID'] ?? 'No value');
- Exclude checks
Call to method search
from undeclared class \App\RecordCollectors\Base
(Did you mean class \App\Base or class \App\Cache\Base or class \App\Cli\Base or class \App\Controller\Base or class \App\Controller\View\Base or class \App\Db\Importers\Base or class \Tests\Base) Open
$response = $recordCollector->search();
- Exclude checks
Call to undeclared method \Tests\App\RecordCollector::markTestSkipped
Open
$this->markTestSkipped($response['error']);
- Exclude checks
Call to method isActive
from undeclared class \App\RecordCollectors\Base
(Did you mean class \App\Base or class \App\Cache\Base or class \App\Cli\Base or class \App\Controller\Base or class \App\Controller\View\Base or class \App\Db\Importers\Base or class \Tests\Base) Open
if (!$recordCollector->isActive()) {
- Exclude checks
Call to method setRequest
from undeclared class \App\RecordCollectors\Base
(Did you mean class \App\Base or class \App\Cache\Base or class \App\Cli\Base or class \App\Controller\Base or class \App\Controller\View\Base or class \App\Db\Importers\Base or class \Tests\Base) Open
$recordCollector->setRequest(new \App\Request([
- Exclude checks
Call to method setRequest
from undeclared class \App\RecordCollectors\Base
(Did you mean class \App\Base or class \App\Cache\Base or class \App\Cli\Base or class \App\Controller\Base or class \App\Controller\View\Base or class \App\Db\Importers\Base or class \Tests\Base) Open
$recordCollector->setRequest(new \App\Request([
- Exclude checks
Call to undeclared method \Tests\App\RecordCollector::markTestSkipped
Open
$this->markTestSkipped($response['error']);
- Exclude checks
Call to undeclared method \Tests\App\RecordCollector::markTestSkipped
Open
$this->markTestSkipped('No required access to test this functionality');
- Exclude checks
Call to method search
from undeclared class \App\RecordCollectors\Base
(Did you mean class \App\Base or class \App\Cache\Base or class \App\Cli\Base or class \App\Controller\Base or class \App\Controller\View\Base or class \App\Db\Importers\Base or class \Tests\Base) Open
$response = $recordCollector->search();
- Exclude checks
Call to undeclared method \Tests\App\RecordCollector::assertArrayHasKey
Open
$this->assertArrayHasKey('fields', $response);
- Exclude checks
Call to method search
from undeclared class \App\RecordCollectors\Base
(Did you mean class \App\Base or class \App\Cache\Base or class \App\Cli\Base or class \App\Controller\Base or class \App\Controller\View\Base or class \App\Db\Importers\Base or class \Tests\Base) Open
$response = $recordCollector->search();
- Exclude checks
Call to undeclared method \Tests\App\RecordCollector::assertArrayHasKey
Open
$this->assertArrayHasKey('fields', $response);
- Exclude checks
Call to undeclared method \Tests\App\RecordCollector::assertArrayHasKey
Open
$this->assertArrayHasKey('additional', $response);
- Exclude checks
Call to method isActive
from undeclared class \App\RecordCollectors\Base
(Did you mean class \App\Base or class \App\Cache\Base or class \App\Cli\Base or class \App\Controller\Base or class \App\Controller\View\Base or class \App\Db\Importers\Base or class \Tests\Base) Open
if (!$recordCollector->isActive()) {
- Exclude checks
Call to method search
from undeclared class \App\RecordCollectors\Base
(Did you mean class \App\Base or class \App\Cache\Base or class \App\Cli\Base or class \App\Controller\Base or class \App\Controller\View\Base or class \App\Db\Importers\Base or class \Tests\Base) Open
$response = $recordCollector->search();
- Exclude checks
Call to method search
from undeclared class \App\RecordCollectors\Base
(Did you mean class \App\Base or class \App\Cache\Base or class \App\Cli\Base or class \App\Controller\Base or class \App\Controller\View\Base or class \App\Db\Importers\Base or class \Tests\Base) Open
$response = $recordCollector->search();
- Exclude checks
Call to undeclared method \Tests\App\RecordCollector::assertArrayHasKey
Open
$this->assertArrayHasKey('additional', $response);
- Exclude checks
Call to undeclared method \Tests\App\RecordCollector::markTestSkipped
Open
$this->markTestSkipped($response['error']);
- Exclude checks
Call to undeclared method \Tests\App\RecordCollector::markTestSkipped
Open
$this->markTestSkipped($response['error']);
- Exclude checks
Call to undeclared method \Tests\App\RecordCollector::markTestSkipped
Open
$this->markTestSkipped('No required access to test this functionality');
- Exclude checks
Call to undeclared method \Tests\App\RecordCollector::assertEquals
Open
$this->assertEquals('00816349200000', $response['fields']['registration_number_2']['data'][0]['raw']);
- Exclude checks
Call to undeclared method \Tests\App\RecordCollector::assertArrayHasKey
Open
$this->assertArrayHasKey('fields', $response);
- Exclude checks
Call to undeclared method \Tests\App\RecordCollector::assertArrayHasKey
Open
$this->assertArrayHasKey('additional', $response);
- Exclude checks
Call to method setRequest
from undeclared class \App\RecordCollectors\Base
(Did you mean class \App\Base or class \App\Cache\Base or class \App\Cli\Base or class \App\Controller\Base or class \App\Controller\View\Base or class \App\Db\Importers\Base or class \Tests\Base) Open
$recordCollector->setRequest(new \App\Request([
- Exclude checks
Call to method search
from undeclared class \App\RecordCollectors\Base
(Did you mean class \App\Base or class \App\Cache\Base or class \App\Cli\Base or class \App\Controller\Base or class \App\Controller\View\Base or class \App\Db\Importers\Base or class \Tests\Base) Open
$response = $recordCollector->search();
- Exclude checks
Call to method setRequest
from undeclared class \App\RecordCollectors\Base
(Did you mean class \App\Base or class \App\Cache\Base or class \App\Cli\Base or class \App\Controller\Base or class \App\Controller\View\Base or class \App\Db\Importers\Base or class \Tests\Base) Open
$recordCollector->setRequest(new \App\Request([
- Exclude checks
Similar blocks of code found in 2 locations. Consider refactoring. Open
public function testFrEnterpriseGouv(): void
{
$recordCollector = \App\RecordCollector::getInstance('App\RecordCollectors\FrEnterpriseGouv', 'Accounts');
if (!$recordCollector->isActive()) {
$this->markTestSkipped('No required access to test this functionality');
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 136.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
public function testUsaEdgarRegistryFromSec(): void
{
$recordCollector = \App\RecordCollector::getInstance('App\RecordCollectors\UsaEdgarRegistryFromSec', 'Accounts');
if (!$recordCollector->isActive()) {
$this->markTestSkipped('No required access to test this functionality');
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 136.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Spaces must be used to indent lines; tabs are not allowed Open
$recordCollector = \App\RecordCollector::getInstance('App\RecordCollectors\Vies', 'Accounts');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertArrayHasKey('links', $response);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!$recordCollector->isActive()) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
// @codeCoverageIgnoreStart
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordCollector->setRequest(new \App\Request([
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertArrayHasKey('additional', $response);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!$recordCollector->isActive()) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Vies record collector test.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'countryCode' => 'PL',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @return void
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordCollector = \App\RecordCollector::getInstance('App\RecordCollectors\PlKrs', 'Accounts');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
// @codeCoverageIgnoreStart
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
// @codeCoverageIgnoreStart
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->markTestSkipped($response['error']);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
], false));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
// @codeCoverageIgnoreStart
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* DkCvr record collector test.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!$recordCollector->isActive()) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'module' => 'Accounts',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'module' => 'Accounts',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertArrayHasKey('additional', $response);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Line exceeds 120 characters; contains 121 characters Open
$recordCollector = \App\RecordCollector::getInstance('App\RecordCollectors\NoBrregEnhetsregisteret', 'Accounts');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
// @codeCoverageIgnoreEnd
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function testUsaEdgarRegistryFromSec(): void
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'vatNumber' => '1180002425',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->markTestSkipped('No required access to test this functionality');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'name' => 'test',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
], false));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* NoBrregEnhetsregisteret record collector test.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!$recordCollector->isActive()) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->markTestSkipped('No required access to test this functionality');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @return void
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordCollector = \App\RecordCollector::getInstance('App\RecordCollectors\FrEnterpriseGouv', 'Accounts');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (empty($response['error'])) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertArrayHasKey('fields', $response);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertArrayHasKey('LBL_REQUEST_ID', $response['fields']);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->markTestSkipped('No required access to test this functionality');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function testFrEnterpriseGouv(): void
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'vatNumber' => '923486178',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$response = $recordCollector->search();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function testDkCvr(): void
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$response = $recordCollector->search();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertArrayHasKey('fields', $response);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$response = $recordCollector->search();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertEquals('PL1180002425', $response['fields']['Vat ID'] ?? 'No value');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
// @codeCoverageIgnoreEnd
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'module' => 'Accounts',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
], false));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (empty($response['error'])) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->markTestSkipped($response['error']);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordCollector = \App\RecordCollector::getInstance('App\RecordCollectors\NoBrregEnhetsregisteret', 'Accounts');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'module' => 'Accounts',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordCollector = \App\RecordCollector::getInstance('App\RecordCollectors\UsaEdgarRegistryFromSec', 'Accounts');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function testVies(): void
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
], false));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
// @codeCoverageIgnoreStart
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'ncr' => '0000940956',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->markTestSkipped('No required access to test this functionality');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordCollector->setRequest(new \App\Request([
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertArrayHasKey('fields', $response);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'module' => 'Accounts',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->markTestSkipped($response['error']);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertArrayHasKey('additional', $response);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* FrEnterpriseGouv record collector test.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (empty($response['error'])) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertArrayHasKey('links', $response);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
// @codeCoverageIgnoreEnd
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordCollector->setRequest(new \App\Request([
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertEquals('1180002425', $response['fields']['vat_id']['data'][0]['raw']);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @return void
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordCollector->setRequest(new \App\Request([
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (empty($response['error'])) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @return void
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertArrayHasKey('additional', $response);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->markTestSkipped($response['error']);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordCollector->setRequest(new \App\Request([
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* PlKrs record collector test.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function testPlKrs(): void
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertEquals('00816349200000', $response['fields']['registration_number_2']['data'][0]['raw']);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'country' => 'no',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'vatNumber' => '213305295',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$response = $recordCollector->search();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertArrayHasKey('fields', $response);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->markTestSkipped($response['error']);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @return void
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function testNoBrregEnhetsregisteret(): void
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertArrayHasKey('fields', $response);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* UsaEdgarRegistryFromSec record collector test.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$response = $recordCollector->search();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (empty($response['error'])) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!$recordCollector->isActive()) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordCollector->setRequest(new \App\Request([
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @return void
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertArrayHasKey('fields', $response);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordCollector = \App\RecordCollector::getInstance('App\RecordCollectors\DkCvr', 'Accounts');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
// @codeCoverageIgnoreEnd
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->markTestSkipped('No required access to test this functionality');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
], false));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (empty($response['error'])) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Line exceeds 120 characters; contains 121 characters Open
$recordCollector = \App\RecordCollector::getInstance('App\RecordCollectors\UsaEdgarRegistryFromSec', 'Accounts');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'module' => 'Accounts',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'cik' => '0001823466',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->markTestSkipped($response['error']);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
// @codeCoverageIgnoreEnd
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
], false));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$response = $recordCollector->search();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
// @codeCoverageIgnoreEnd
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
// @codeCoverageIgnoreStart
- Exclude checks