SU-HKKU/cardinal_service_profile

View on GitHub

Showing 66 of 150 total issues

Doc comment short description must end with a full stop
Open

   * {@inheritDoc}

Doc comment short description must start with a capital letter
Open

   * {@inheritDoc}

Doc comment short description must end with a full stop
Open

   * {@inheritDoc}

Doc comment short description must end with a full stop
Open

   * {@inheritDoc}

Doc comment short description must start with a capital letter
Open

 * cardinal_service_profile.install

Doc comment short description must start with a capital letter
Open

   * {@inheritDoc}

Doc comment short description must start with a capital letter
Open

   * {@inheritDoc}

Functions must not contain multiple empty lines in a row; found 2 empty lines
Open


Missing class import via use statement (line '192', column '19').
Open

        throw new \Exception('Could not decode JSON from SNOW API.');

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 '113', column '19').
Open

        throw new \Exception($this->t('Errors occurred in in the form submission.'));

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 '192', column '39').
Open

    $term_ids = iterator_to_array(new \RecursiveIteratorIterator(new \RecursiveArrayIterator($term_ids)), FALSE);

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 '123', column '16').
Open

  $xpath = new DOMXPath($dom);

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 '196', column '19').
Open

        throw new \Exception($response['result'][0]['message']);

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 '86', column '19').
Open

        throw new \Exception($this->t('Circular dependencies detected. %path', ['%path' => implode(' -> ', $requesting_plugins)]));
Severity: Minor
Found in src/InstallTaskManager.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

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

  $dom = new DOMDocument();

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 '192', column '70').
Open

    $term_ids = iterator_to_array(new \RecursiveIteratorIterator(new \RecursiveArrayIterator($term_ids)), FALSE);

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 assigning values to variables in if clauses and the like (line '17', column '7').
Open

function cardinal_service_profile_helper_migration_plugins_alter(array &$migrations) {
  if ($csv_path_cache = \Drupal::cache()->get('migration:csv_path')) {
    $migration = $csv_path_cache->data['migration'];
    if (isset($migrations["migration_config_deriver:$migration"])) {
      $migrations["migration_config_deriver:$migration"]['source']['path'] = $csv_path_cache->data['path'];

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 '46', column '7').
Open

function _cardinal_service_blocks_block_form_submit(array &$form, FormStateInterface $form_state) {
  /** @var \Drupal\layout_builder\SectionComponent $section_component */
  $section_component = $form_state->getFormObject()->getCurrentComponent();
  // Clear the settings first.
  $section_component->unsetThirdPartySetting('cardinal_service_blocks', 'action_url');

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 '341', column '7').
Open

function _cardinal_service_profile_field_mapped(NodeInterface $node, FieldDefinitionInterface $field) {
  $field_name = $field->getName();
  $columns = $field->getFieldStorageDefinition()->getColumns();

  if ($migration_name = _cardinal_service_node_imported($node)) {
Severity: Minor
Found in cardinal_service_profile.inc 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 '37', column '9').
Open

  public function onBuildRender(SectionComponentBuildRenderArrayEvent $event) {
    $component = $event->getComponent();
    // Action Urls are only set on views exposed filter blocks.
    // @see cardinal_service_blocks_form_layout_builder_configure_block_alter().
    if ($url = $component->getThirdPartySetting('cardinal_service_blocks', 'action_url')) {

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

Severity
Category
Status
Source
Language