Problem/Motivation

@shamir.vs helpfully addressed some phpstan code quality issues in Merge Request !15.

This splits addressing these out into this issue. Currently there are the following phpstan code quality issues:

  • Major - Offset 'settings' of array assigned to variable $default_configuration is never read before being overwritten. in src/FreelinkingManager.php:59
  • Major - Call to function is_array() with array will always evaluate to true. in src/FreelinkingManager.php:99
  • Major - Foreach key variable $key is never read. in src/FreelinkingManager.php:129
  • Major - Variable $failover_plugin in PHPDoc tag @var does not match assigned variable $failover_settings. in src/FreelinkingManager.php:202
  • Major - Value assigned to $target_array['indicator'] is never read before being overwritten. in src/FreelinkingManager.php:211
  • Major - Parameter #1 $callback of method Drupal\filter\FilterProcessResult::createPlaceholder() expects callable string, 'freelinking.manager…' given. in src/Plugin/Filter/Freelinking.php:240
  • Major - Parameter #1 $callback of method Drupal\filter\FilterProcessResult::createPlaceholder() expects callable string, 'freelinking.manager…' given. in src/Plugin/Filter/Freelinking.php:256
  • Major - Instanceof between Drupal\node\Entity\Node and Drupal\node\NodeInterface will always evaluate to true. in src/Plugin/freelinking/Node.php:79
  • Major - Value assigned to variable $link is never read before being overwritten. in src/Plugin/freelinking/NodeTitle.php:146
  • Major - Variable $language is never read. in tests/src/Unit/Plugin/freelinking/NodeTest.php:129
  • Major - Ternary operator condition is always false. in tests/src/Unit/Plugin/freelinking/NodeTest.php:148
  • Major - Offset '#url' of array assigned to variable $expected is never read. in tests/src/Unit/Plugin/freelinking/NodeTitleTest.php:125

Proposed resolution

Freelinking test run is green

Remaining tasks

- Apply fixes from Merge Request !15

User interface changes

N/A

API changes

N/A

Data model changes

N/A

Comments

mradcliffe created an issue.