AbstractLocalComplexType::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 19
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 9
nc 1
nop 8
dl 0
loc 19
rs 9.9666
c 0
b 0
f 0

How to fix   Many Parameters   

Many Parameters

Methods with many parameters are not only hard to understand, but their parameters also often become inconsistent when you need more, or different data.

There are several approaches to avoid long parameter lists:

1
<?php
2
3
declare(strict_types=1);
4
5
namespace SimpleSAML\XMLSchema\XML;
6
7
use SimpleSAML\XMLSchema\Type\BooleanValue;
0 ignored issues
show
Bug introduced by
The type SimpleSAML\XMLSchema\Type\BooleanValue was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
8
use SimpleSAML\XMLSchema\Type\IDValue;
0 ignored issues
show
Bug introduced by
The type SimpleSAML\XMLSchema\Type\IDValue was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
9
use SimpleSAML\XMLSchema\XML\Interface\TypeDefParticleInterface;
10
11
/**
12
 * Abstract class representing the localComplexType-type.
13
 *
14
 * @package simplesamlphp/xml-common
15
 */
16
abstract class AbstractLocalComplexType extends AbstractComplexType
17
{
18
    /**
19
     * LocalComplexType constructor
20
     *
21
     * @param \SimpleSAML\XMLSchema\Type\BooleanValue|null $mixed
22
     * @param \SimpleSAML\XMLSchema\XML\SimpleContent|\SimpleSAML\XMLSchema\XML\ComplexContent|null $content
23
     * @param \SimpleSAML\XMLSchema\XML\Interface\TypeDefParticleInterface|null $particle
24
     * @param (
25
     *   \SimpleSAML\XMLSchema\XML\LocalAttribute|
26
     *   \SimpleSAML\XMLSchema\XML\ReferencedAttributeGroup
27
     * )[] $attributes
28
     * @param \SimpleSAML\XMLSchema\XML\AnyAttribute|null $anyAttribute
29
     * @param \SimpleSAML\XMLSchema\XML\Annotation|null $annotation
30
     * @param \SimpleSAML\XMLSchema\Type\IDValue|null $id
31
     * @param array<\SimpleSAML\XML\Attribute> $namespacedAttributes
32
     */
33
    public function __construct(
34
        ?BooleanValue $mixed = null,
35
        SimpleContent|ComplexContent|null $content = null,
0 ignored issues
show
Bug introduced by
The type SimpleSAML\XMLSchema\XML\SimpleContent was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
Bug introduced by
The type SimpleSAML\XMLSchema\XML\ComplexContent was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
36
        ?TypeDefParticleInterface $particle = null,
37
        array $attributes = [],
38
        ?AnyAttribute $anyAttribute = null,
0 ignored issues
show
Bug introduced by
The type SimpleSAML\XMLSchema\XML\AnyAttribute was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
39
        ?Annotation $annotation = null,
0 ignored issues
show
Bug introduced by
The type SimpleSAML\XMLSchema\XML\Annotation was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
40
        ?IDValue $id = null,
41
        array $namespacedAttributes = [],
42
    ) {
43
        parent::__construct(
44
            mixed: $mixed,
45
            content: $content,
46
            particle: $particle,
47
            attributes: $attributes,
48
            anyAttribute: $anyAttribute,
49
            annotation: $annotation,
50
            id: $id,
51
            namespacedAttributes: $namespacedAttributes,
52
        );
53
    }
54
}
55