YetiForceCompany/YetiForceCRM

View on GitHub
app/RecordCollectors/NorthData.php

Summary

Maintainability
A
0 mins
Test Coverage
F
0%

Missing class import via use statement (line '247', column '14').
Open

            throw new \App\Exceptions\IllegalValue('You must fist setup Api Key in Config Panel', 403);
Severity: Minor
Found in app/RecordCollectors/NorthData.php by phpmd

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\RequestHttp' in method 'getDataFromApi'.
Open

            $client = \App\RequestHttp::getClient(['headers' => ['X-Api-Key' => $this->apiKey]]);
Severity: Minor
Found in app/RecordCollectors/NorthData.php by phpmd

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

Avoid using static access to class '\App\Language' in method 'getDataFromApi'.
Open

        $language = 'de' === \App\Language::getShortLanguageName() ? 'de' : 'en';
Severity: Minor
Found in app/RecordCollectors/NorthData.php by phpmd

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

Avoid assigning values to variables in if clauses and the like (line '161', column '7').
Open

    public function search(): array
    {
        if (!$this->isActive()) {
            return [];
        }
Severity: Minor
Found in app/RecordCollectors/NorthData.php by phpmd

IfStatementAssignment

Since: 2.7.0

Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

Example

class Foo
{
    public function bar($flag)
    {
        if ($foo = 'bar') { // possible typo
            // ...
        }
        if ($baz = 0) { // always false
            // ...
        }
    }
}

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

Avoid assigning values to variables in if clauses and the like (line '164', column '7').
Open

    public function search(): array
    {
        if (!$this->isActive()) {
            return [];
        }
Severity: Minor
Found in app/RecordCollectors/NorthData.php by phpmd

IfStatementAssignment

Since: 2.7.0

Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

Example

class Foo
{
    public function bar($flag)
    {
        if ($foo = 'bar') { // possible typo
            // ...
        }
        if ($baz = 0) { // always false
            // ...
        }
    }
}

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

Avoid using static access to class '\App\Json' in method 'getDataFromApi'.
Open

                    $companyResponse = \App\Json::decode($companyResponse->getBody()->getContents());
Severity: Minor
Found in app/RecordCollectors/NorthData.php by phpmd

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

Avoid using static access to class '\App\Json' in method 'getDataFromApi'.
Open

                $suggestResponse = \App\Json::decode($suggestResponse->getBody()->getContents());
Severity: Minor
Found in app/RecordCollectors/NorthData.php by phpmd

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

Avoid using static access to class '\App\Fields\Country' in method 'parseData'.
Open

        $data['address']['country'] = \App\Fields\Country::getCountryName($data['address']['country']);
Severity: Minor
Found in app/RecordCollectors/NorthData.php by phpmd

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

Avoid using static access to class '\App\Utils' in method 'parseData'.
Open

        return \App\Utils::flattenKeys($data, 'ucfirst');
Severity: Minor
Found in app/RecordCollectors/NorthData.php by phpmd

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

Avoid using static access to class '\App\Log' in method 'getDataFromApi'.
Open

            \App\Log::warning($e->getMessage(), 'RecordCollectors');
Severity: Minor
Found in app/RecordCollectors/NorthData.php by phpmd

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

Avoid assigning values to variables in if clauses and the like (line '244', column '8').
Open

    private function setApiKey(): void
    {
        if (($params = $this->getParams()) && !empty($params['api_key'])) {
            $this->apiKey = $params['api_key'];
        } else {
Severity: Minor
Found in app/RecordCollectors/NorthData.php by phpmd

IfStatementAssignment

Since: 2.7.0

Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

Example

class Foo
{
    public function bar($flag)
    {
        if ($foo = 'bar') { // possible typo
            // ...
        }
        if ($baz = 0) { // always false
            // ...
        }
    }
}

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

The method setApiKey uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            throw new \App\Exceptions\IllegalValue('You must fist setup Api Key in Config Panel', 403);
        }
Severity: Minor
Found in app/RecordCollectors/NorthData.php by phpmd

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

syntax error, unexpected 'string' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST)
Open

    protected string $addOnName = 'YetiForceRcNorthData';
Severity: Critical
Found in app/RecordCollectors/NorthData.php by phan

Avoid excessively long variable names like $formFieldsToRecordMap. Keep variable name length under 20.
Open

    public $formFieldsToRecordMap = [
        'Accounts' => [
            'nameName' => 'accountname',
            'registerId' => 'registration_number_1',
            'capitalItems0Value' => 'annual_revenue',
Severity: Minor
Found in app/RecordCollectors/NorthData.php by phpmd

LongVariable

Since: 0.2

Detects when a field, formal or local variable is declared with a long name.

Example

class Something {
    protected $reallyLongIntName = -3; // VIOLATION - Field
    public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
        $otherReallyLongName = -5; // VIOLATION - Local
        for ($interestingIntIndex = 0; // VIOLATION - For
             $interestingIntIndex < 10;
             $interestingIntIndex++ ) {
        }
    }
}

Source https://phpmd.org/rules/naming.html#longvariable

Spaces must be used to indent lines; tabs are not allowed
Open

    /** {@inheritdoc} */

Spaces must be used to indent lines; tabs are not allowed
Open

            'nameName' => 'vendorname',

Spaces must be used to indent lines; tabs are not allowed
Open

        ],

Spaces must be used to indent lines; tabs are not allowed
Open

    /** {@inheritdoc} */

Spaces must be used to indent lines; tabs are not allowed
Open

            'segmentCodesUksic' => 'siccode',

Spaces must be used to indent lines; tabs are not allowed
Open

            'addressState' => 'addresslevel2a',

Spaces must be used to indent lines; tabs are not allowed
Open

        'Partners' => [

Spaces must be used to indent lines; tabs are not allowed
Open

    /** {@inheritdoc} */

Spaces must be used to indent lines; tabs are not allowed
Open

    public $icon = 'yfi-north-data';

Spaces must be used to indent lines; tabs are not allowed
Open

    /** {@inheritdoc} */

Spaces must be used to indent lines; tabs are not allowed
Open

            'addressStreet' => 'addresslevel8a',

Spaces must be used to indent lines; tabs are not allowed
Open

            'addressStreet' => 'addresslevel8a',

Spaces must be used to indent lines; tabs are not allowed
Open

            'addressCity' => 'addresslevel5a',

Spaces must be used to indent lines; tabs are not allowed
Open

        ],

Spaces must be used to indent lines; tabs are not allowed
Open

            'nameName' => 'subject',

Spaces must be used to indent lines; tabs are not allowed
Open

            'labelModule' => '_Base',

Spaces must be used to indent lines; tabs are not allowed
Open

    ];

Spaces must be used to indent lines; tabs are not allowed
Open

        ],

Spaces must be used to indent lines; tabs are not allowed
Open

            'nameName' => 'subject',

Spaces must be used to indent lines; tabs are not allowed
Open

            'addressStreet' => 'addresslevel8a',

Spaces must be used to indent lines; tabs are not allowed
Open

            'addressCountry' => 'addresslevel1a',

Spaces must be used to indent lines; tabs are not allowed
Open

        ],

Spaces must be used to indent lines; tabs are not allowed
Open

    protected string $addOnName = 'YetiForceRcNorthData';

Spaces must be used to indent lines; tabs are not allowed
Open

    public $label = 'LBL_NORTH_DATA';

Spaces must be used to indent lines; tabs are not allowed
Open

    public $settingsFields = [

Spaces must be used to indent lines; tabs are not allowed
Open

            'addressPostalCode' => 'addresslevel7a',

Spaces must be used to indent lines; tabs are not allowed
Open

            'registerId' => 'registration_number_1',

Spaces must be used to indent lines; tabs are not allowed
Open

            'addressState' => 'addresslevel2a',

Spaces must be used to indent lines; tabs are not allowed
Open

            'addressCity' => 'addresslevel5a',

Spaces must be used to indent lines; tabs are not allowed
Open

    /** {@inheritdoc} */

Spaces must be used to indent lines; tabs are not allowed
Open

    public $allowedModules = ['Accounts', 'Leads', 'Vendors', 'Partners', 'Competition'];

Spaces must be used to indent lines; tabs are not allowed
Open

        'Accounts' => [

Spaces must be used to indent lines; tabs are not allowed
Open

            'addressCountry' => 'addresslevel1a',

Spaces must be used to indent lines; tabs are not allowed
Open

            'addressCountry' => 'addresslevel1a',

Spaces must be used to indent lines; tabs are not allowed
Open

            'addressState' => 'addresslevel2a',

Spaces must be used to indent lines; tabs are not allowed
Open

            'capitalItems0Value' => 'annual_revenue',

Spaces must be used to indent lines; tabs are not allowed
Open

        ],

Spaces must be used to indent lines; tabs are not allowed
Open

            'addressPostalCode' => 'addresslevel7a',

Spaces must be used to indent lines; tabs are not allowed
Open

    /** @var string NorthData sever address */

Spaces must be used to indent lines; tabs are not allowed
Open

        'Leads' => [

Spaces must be used to indent lines; tabs are not allowed
Open

            'addressPostalCode' => 'addresslevel7a',

Spaces must be used to indent lines; tabs are not allowed
Open

            'addressPostalCode' => 'addresslevel7a',

Spaces must be used to indent lines; tabs are not allowed
Open

            'addressCountry' => 'addresslevel1a',

Spaces must be used to indent lines; tabs are not allowed
Open

    public $displayType = 'FillFields';

Spaces must be used to indent lines; tabs are not allowed
Open

            'addressStreet' => 'addresslevel8a',

Spaces must be used to indent lines; tabs are not allowed
Open

    ];

Spaces must be used to indent lines; tabs are not allowed
Open

        'companyName' => [

Spaces must be used to indent lines; tabs are not allowed
Open

        ],

Spaces must be used to indent lines; tabs are not allowed
Open

        ],

Spaces must be used to indent lines; tabs are not allowed
Open

            $params['countries'] = $country;

Spaces must be used to indent lines; tabs are not allowed
Open

        $this->setApiKey();

Spaces must be used to indent lines; tabs are not allowed
Open

     *

Spaces must be used to indent lines; tabs are not allowed
Open

    /**

Spaces must be used to indent lines; tabs are not allowed
Open

    /** {@inheritdoc} */

Spaces must be used to indent lines; tabs are not allowed
Open

    public $formFieldsToRecordMap = [

Spaces must be used to indent lines; tabs are not allowed
Open

    protected $fields = [

Spaces must be used to indent lines; tabs are not allowed
Open

            'picklistValues' => [

Spaces must be used to indent lines; tabs are not allowed
Open

            'label' => 'Account Name',

Spaces must be used to indent lines; tabs are not allowed
Open

        ],

Spaces must be used to indent lines; tabs are not allowed
Open

    ];

Spaces must be used to indent lines; tabs are not allowed
Open

        'country' => [

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param array $query

Spaces must be used to indent lines; tabs are not allowed
Open

            'labelModule' => '_Base',

Spaces must be used to indent lines; tabs are not allowed
Open

                'CH' => 'Switzerland',

Spaces must be used to indent lines; tabs are not allowed
Open

     */

Spaces must be used to indent lines; tabs are not allowed
Open

            'companyName' => 'accountname',

Spaces must be used to indent lines; tabs are not allowed
Open

        if (!$this->isActive()) {

Spaces must be used to indent lines; tabs are not allowed
Open

            return [];

Spaces must be used to indent lines; tabs are not allowed
Open

            $params['query'] = $companyName;

Spaces must be used to indent lines; tabs are not allowed
Open

                    $this->data[$key] = $this->parseData($companyResponse);

Spaces must be used to indent lines; tabs are not allowed
Open

        if (isset($data['segmentCodes']['wz'])) {

Spaces must be used to indent lines; tabs are not allowed
Open

     */

Spaces must be used to indent lines; tabs are not allowed
Open

        if (($params = $this->getParams()) && !empty($params['api_key'])) {

Spaces must be used to indent lines; tabs are not allowed
Open

            throw new \App\Exceptions\IllegalValue('You must fist setup Api Key in Config Panel', 403);

Spaces must be used to indent lines; tabs are not allowed
Open

    /** {@inheritdoc} */

Spaces must be used to indent lines; tabs are not allowed
Open

        'api_key' => ['required' => 1, 'purifyType' => 'Text', 'label' => 'LBL_API_KEY']

Spaces must be used to indent lines; tabs are not allowed
Open

            'addressCity' => 'addresslevel5a',

Spaces must be used to indent lines; tabs are not allowed
Open

            'nameName' => 'company',

Spaces must be used to indent lines; tabs are not allowed
Open

            'addressCity' => 'addresslevel5a',

Spaces must be used to indent lines; tabs are not allowed
Open

            'addressCountry' => 'addresslevel1a',

Spaces must be used to indent lines; tabs are not allowed
Open

                'AT' => 'Austria',

Spaces must be used to indent lines; tabs are not allowed
Open

                'LU' => 'Luxembourg',

Spaces must be used to indent lines; tabs are not allowed
Open

                'ES' => 'Spain',

Spaces must be used to indent lines; tabs are not allowed
Open

    /** {@inheritdoc} */

Spaces must be used to indent lines; tabs are not allowed
Open

        }

Spaces must be used to indent lines; tabs are not allowed
Open

    }

Spaces must be used to indent lines; tabs are not allowed
Open

                    ]));

Spaces must be used to indent lines; tabs are not allowed
Open

            $this->response['error'] = $e->getResponse()->getReasonPhrase();

Spaces must be used to indent lines; tabs are not allowed
Open

     * @return array

Spaces must be used to indent lines; tabs are not allowed
Open

    {

Spaces must be used to indent lines; tabs are not allowed
Open

        if (isset($data['segmentCodes']['nace'])) {

Spaces must be used to indent lines; tabs are not allowed
Open

        }

Spaces must be used to indent lines; tabs are not allowed
Open

    }

Spaces must be used to indent lines; tabs are not allowed
Open

    /** {@inheritdoc} */

Spaces must be used to indent lines; tabs are not allowed
Open

    /** {@inheritdoc} */

Spaces must be used to indent lines; tabs are not allowed
Open

            'registerId' => 'registration_number_1',

Spaces must be used to indent lines; tabs are not allowed
Open

        'Competition' => [

Spaces must be used to indent lines; tabs are not allowed
Open

            'addressPostalCode' => 'addresslevel7a',

Spaces must be used to indent lines; tabs are not allowed
Open

    /** {@inheritdoc} */

Spaces must be used to indent lines; tabs are not allowed
Open

    protected $url = 'https://www.northdata.com/_api/';

Spaces must be used to indent lines; tabs are not allowed
Open

    private $apiKey;

Spaces must be used to indent lines; tabs are not allowed
Open

        if (empty($params)) {

Spaces must be used to indent lines; tabs are not allowed
Open

            if (200 === $suggestResponse->getStatusCode()) {

Spaces must be used to indent lines; tabs are not allowed
Open

            $data['segmentCodes']['wz'] = implode(', ', $data['segmentCodes']['wz']);

Spaces must be used to indent lines; tabs are not allowed
Open

        }

Spaces must be used to indent lines; tabs are not allowed
Open

    private function setApiKey(): void

Spaces must be used to indent lines; tabs are not allowed
Open

    public $description = 'LBL_NORTH_DATA_DESC';

Spaces must be used to indent lines; tabs are not allowed
Open

            'registerId' => 'registration_number_1',

Spaces must be used to indent lines; tabs are not allowed
Open

        'Vendors' => [

Spaces must be used to indent lines; tabs are not allowed
Open

            'addressState' => 'addresslevel2a',

Spaces must be used to indent lines; tabs are not allowed
Open

            'addressCity' => 'addresslevel5a',

Spaces must be used to indent lines; tabs are not allowed
Open

            'label' => 'Country',

Spaces must be used to indent lines; tabs are not allowed
Open

        'Leads' => [

Spaces must be used to indent lines; tabs are not allowed
Open

    public function search(): array

Spaces must be used to indent lines; tabs are not allowed
Open

     *

Spaces must be used to indent lines; tabs are not allowed
Open

        return \App\Utils::flattenKeys($data, 'ucfirst');

Spaces must be used to indent lines; tabs are not allowed
Open

            $this->apiKey = $params['api_key'];

Spaces must be used to indent lines; tabs are not allowed
Open

        }

Spaces must be used to indent lines; tabs are not allowed
Open

                'PL' => 'Poland',

Spaces must be used to indent lines; tabs are not allowed
Open

        }

Spaces must be used to indent lines; tabs are not allowed
Open

        }

Spaces must be used to indent lines; tabs are not allowed
Open

            return [];

Spaces must be used to indent lines; tabs are not allowed
Open

    private function getDataFromApi(array $params): void

Spaces must be used to indent lines; tabs are not allowed
Open

            $suggestResponse = $client->get($this->url . 'search/v1/suggest?' . http_build_query($params));

Spaces must be used to indent lines; tabs are not allowed
Open

                        'language' => $language,

Spaces must be used to indent lines; tabs are not allowed
Open

                    $this->response['links'][$key] = $companyResponse['northDataUrl'];

Spaces must be used to indent lines; tabs are not allowed
Open

        } catch (\GuzzleHttp\Exception\GuzzleException $e) {

Spaces must be used to indent lines; tabs are not allowed
Open

     */

Spaces must be used to indent lines; tabs are not allowed
Open

            'uitype' => 16,

Spaces must be used to indent lines; tabs are not allowed
Open

                'DE' => 'Germany',

Spaces must be used to indent lines; tabs are not allowed
Open

            'companyName' => 'company',

Spaces must be used to indent lines; tabs are not allowed
Open

    /** {@inheritdoc} */

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param array $params

Spaces must be used to indent lines; tabs are not allowed
Open

        }

Spaces must be used to indent lines; tabs are not allowed
Open

     *

Spaces must be used to indent lines; tabs are not allowed
Open

        } else {

Spaces must be used to indent lines; tabs are not allowed
Open

            'companyName' => 'vendorname',

Spaces must be used to indent lines; tabs are not allowed
Open

    /** @var string Api Key. */

Spaces must be used to indent lines; tabs are not allowed
Open

        $params = [];

Spaces must be used to indent lines; tabs are not allowed
Open

        }

Spaces must be used to indent lines; tabs are not allowed
Open

            $client = \App\RequestHttp::getClient(['headers' => ['X-Api-Key' => $this->apiKey]]);

Spaces must be used to indent lines; tabs are not allowed
Open

     * Function parsing data to fields from ORB Intelligence API.

Spaces must be used to indent lines; tabs are not allowed
Open

    private function parseData(array $data): array

Spaces must be used to indent lines; tabs are not allowed
Open

        if (isset($data['segmentCodes']['isic'])) {

Spaces must be used to indent lines; tabs are not allowed
Open

     * Function setup Api Key.

Spaces must be used to indent lines; tabs are not allowed
Open

    {

Spaces must be used to indent lines; tabs are not allowed
Open

        'Vendors' => [

Spaces must be used to indent lines; tabs are not allowed
Open

                $suggestResponse = \App\Json::decode($suggestResponse->getBody()->getContents());

Spaces must be used to indent lines; tabs are not allowed
Open

                    $companyResponse = \App\Json::decode($companyResponse->getBody()->getContents());

Spaces must be used to indent lines; tabs are not allowed
Open

        unset($data['northDataUrl'],$data['id']);

Spaces must be used to indent lines; tabs are not allowed
Open

            $data['segmentCodes']['naics'] = implode(', ', $data['segmentCodes']['naics']);

Spaces must be used to indent lines; tabs are not allowed
Open

    public $docUrl = 'https://www.northdata.com/_data';

Spaces must be used to indent lines; tabs are not allowed
Open

            'nameName' => 'accountname',

Spaces must be used to indent lines; tabs are not allowed
Open

            'addressState' => 'addresslevel2a',

Spaces must be used to indent lines; tabs are not allowed
Open

            'addressStreet' => 'addresslevel8a',

Spaces must be used to indent lines; tabs are not allowed
Open

                'FR' => 'France',

Spaces must be used to indent lines; tabs are not allowed
Open

    ];

Spaces must be used to indent lines; tabs are not allowed
Open

            'companyName' => 'subject',

Spaces must be used to indent lines; tabs are not allowed
Open

                        'companyId' => $company['company']['id'],

Spaces must be used to indent lines; tabs are not allowed
Open

    }

Spaces must be used to indent lines; tabs are not allowed
Open

     *

Spaces must be used to indent lines; tabs are not allowed
Open

                'GB' => 'United Kingdom',

Spaces must be used to indent lines; tabs are not allowed
Open

        ],

Spaces must be used to indent lines; tabs are not allowed
Open

    {

Spaces must be used to indent lines; tabs are not allowed
Open

    }

Spaces must be used to indent lines; tabs are not allowed
Open

    /**

Spaces must be used to indent lines; tabs are not allowed
Open

        $params['limit'] = 4;

Spaces must be used to indent lines; tabs are not allowed
Open

                foreach ($suggestResponse['results'] as $key => $company) {

Spaces must be used to indent lines; tabs are not allowed
Open

     *

Spaces must be used to indent lines; tabs are not allowed
Open

            $data['segmentCodes']['nace'] = implode(', ', $data['segmentCodes']['nace']);

Spaces must be used to indent lines; tabs are not allowed
Open

    /**

Spaces must be used to indent lines; tabs are not allowed
Open

            'picklistModule' => 'Other.Country',

Spaces must be used to indent lines; tabs are not allowed
Open

    protected $modulesFieldsMap = [

Spaces must be used to indent lines; tabs are not allowed
Open

        'Partners' => [

Spaces must be used to indent lines; tabs are not allowed
Open

        return parent::isActive() && ($params = $this->getParams()) && !empty($params['api_key']);

Spaces must be used to indent lines; tabs are not allowed
Open

        $this->loadData();

Spaces must be used to indent lines; tabs are not allowed
Open

     * @return void

Spaces must be used to indent lines; tabs are not allowed
Open

    {

Spaces must be used to indent lines; tabs are not allowed
Open

                    $companyResponse = $client->get($this->url . 'company/v1/company?' . http_build_query([

Spaces must be used to indent lines; tabs are not allowed
Open

            \App\Log::warning($e->getMessage(), 'RecordCollectors');

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param array $data

Spaces must be used to indent lines; tabs are not allowed
Open

            ]

Spaces must be used to indent lines; tabs are not allowed
Open

        ],

Spaces must be used to indent lines; tabs are not allowed
Open

    {

Spaces must be used to indent lines; tabs are not allowed
Open

        if ($companyName = $this->request->getByType('companyName', 'Text')) {

Spaces must be used to indent lines; tabs are not allowed
Open

     * Function fetching company data by params.

Spaces must be used to indent lines; tabs are not allowed
Open

        try {

Spaces must be used to indent lines; tabs are not allowed
Open

                        'financials' => true, 'relations' => true, 'sheets' => true, 'extras' => true,

Spaces must be used to indent lines; tabs are not allowed
Open

            $data['segmentCodes']['isic'] = implode(', ', $data['segmentCodes']['isic']);

Spaces must be used to indent lines; tabs are not allowed
Open

        }

Spaces must be used to indent lines; tabs are not allowed
Open

        if (isset($data['segmentCodes']['naics'])) {

Spaces must be used to indent lines; tabs are not allowed
Open

        }

Spaces must be used to indent lines; tabs are not allowed
Open

    /** {@inheritdoc} */

Spaces must be used to indent lines; tabs are not allowed
Open

        'Accounts' => [

Spaces must be used to indent lines; tabs are not allowed
Open

        ],

Spaces must be used to indent lines; tabs are not allowed
Open

        if ($country = $this->request->getByType('country', 'Text')) {

Spaces must be used to indent lines; tabs are not allowed
Open

        $this->getDataFromApi($params);

Spaces must be used to indent lines; tabs are not allowed
Open

        return $this->response;

Spaces must be used to indent lines; tabs are not allowed
Open

            }

Spaces must be used to indent lines; tabs are not allowed
Open

        $data['address']['country'] = \App\Fields\Country::getCountryName($data['address']['country']);

Spaces must be used to indent lines; tabs are not allowed
Open

    }

Spaces must be used to indent lines; tabs are not allowed
Open

            'companyName' => 'subject',

Spaces must be used to indent lines; tabs are not allowed
Open

        'Competition' => [

Spaces must be used to indent lines; tabs are not allowed
Open

        ],

Spaces must be used to indent lines; tabs are not allowed
Open

    public function isActive(): bool

Spaces must be used to indent lines; tabs are not allowed
Open

        $language = 'de' === \App\Language::getShortLanguageName() ? 'de' : 'en';

Spaces must be used to indent lines; tabs are not allowed
Open

        $params['language'] = $language;

Spaces must be used to indent lines; tabs are not allowed
Open

                }

Spaces must be used to indent lines; tabs are not allowed
Open

     * @return void

No space found after comma in function call
Open

        unset($data['northDataUrl'],$data['id']);

There are no issues that match your filters.

Category
Status