EclipseGc/PluginsAnnotation

View on GitHub

Showing 3 of 13 total issues

Function findPluginImplementations has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
Open

public function findPluginImplementations(PluginDefinitionInterface ...$definitions) : PluginDefinitionSet {
// Clear the annotation loaders of any previous annotation classes.
AnnotationRegistry::reset();
// Register the namespaces of classes that can be used for annotations.
AnnotationRegistry::registerLoader('class_exists');
Severity: Minor
Found in src/Discovery/AnnotatedPluginDiscovery.php - About 3 hrs to fix

Method findPluginImplementations has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

public function findPluginImplementations(PluginDefinitionInterface ...$definitions) : PluginDefinitionSet {
// Clear the annotation loaders of any previous annotation classes.
AnnotationRegistry::reset();
// Register the namespaces of classes that can be used for annotations.
AnnotationRegistry::registerLoader('class_exists');
Severity: Minor
Found in src/Discovery/AnnotatedPluginDiscovery.php - About 1 hr to fix

    Function extractNamespace has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
    Open

    protected function extractNamespace(array $tokens) : string {
    $namespace = '';
    $found = FALSE;
    foreach ($tokens as $token) {
    if (is_array($token) && $token[0] == T_NAMESPACE) {
    Severity: Minor
    Found in src/Discovery/AnnotatedPluginDiscovery.php - About 55 mins to fix
    Severity
    Category
    Status
    Source
    Language