Skip to content

tag contrib on merge #959

tag contrib on merge

tag contrib on merge #959

Triggered via pull request December 6, 2026 11:46
Status Success
Total duration 11s
Artifacts –

mago.yml

on: pull_request
Mago Quality Checks
9s
Mago Quality Checks
Fit to window
Zoom out
Zoom in

Annotations

21 errors, 18 warnings, and 11 notices
non-existent-class-like: src/SDK/Logs/PsrSeverityMapperInterface.php#L42
Class, interface, enum, or trait `Psr\Log\LogLevel` not found. >`Psr\Log\LogLevel` is not defined or cannot be found Help: Ensure the name is correct, including its namespace, and that it's properly defined and autoloadable.
non-existent-class-like: src/SDK/Logs/PsrSeverityMapperInterface.php#L41
Class, interface, enum, or trait `Psr\Log\LogLevel` not found. >`Psr\Log\LogLevel` is not defined or cannot be found Help: Ensure the name is correct, including its namespace, and that it's properly defined and autoloadable.
non-existent-class-like: src/SDK/Logs/PsrSeverityMapperInterface.php#L33
Class, interface, enum, or trait `Psr\Log\LogLevel` not found. >`Psr\Log\LogLevel` is not defined or cannot be found Help: Ensure the name is correct, including its namespace, and that it's properly defined and autoloadable.
non-existent-class-like: src/SDK/Logs/PsrSeverityMapperInterface.php#L31
Class, interface, enum, or trait `Psr\Log\LogLevel` not found. >`Psr\Log\LogLevel` is not defined or cannot be found Help: Ensure the name is correct, including its namespace, and that it's properly defined and autoloadable.
non-existent-class-like: src/SDK/Logs/PsrSeverityMapperInterface.php#L28
Class, interface, enum, or trait `Psr\Log\LogLevel` not found. >`Psr\Log\LogLevel` is not defined or cannot be found Help: Ensure the name is correct, including its namespace, and that it's properly defined and autoloadable.
non-existent-class-like: src/SDK/Logs/PsrSeverityMapperInterface.php#L26
Class, interface, enum, or trait `Psr\Log\LogLevel` not found. >`Psr\Log\LogLevel` is not defined or cannot be found Help: Ensure the name is correct, including its namespace, and that it's properly defined and autoloadable.
non-existent-class-like: src/SDK/Logs/PsrSeverityMapperInterface.php#L24
Class, interface, enum, or trait `Psr\Log\LogLevel` not found. >`Psr\Log\LogLevel` is not defined or cannot be found Help: Ensure the name is correct, including its namespace, and that it's properly defined and autoloadable.
non-existent-class-like: src/SDK/Logs/PsrSeverityMapperInterface.php#L21
Class, interface, enum, or trait `Psr\Log\LogLevel` not found. >`Psr\Log\LogLevel` is not defined or cannot be found Help: Ensure the name is correct, including its namespace, and that it's properly defined and autoloadable.
non-existent-class-like: src/SDK/Logs/PsrSeverityMapperInterface.php#L19
Class, interface, enum, or trait `Psr\Log\LogLevel` not found. >`Psr\Log\LogLevel` is not defined or cannot be found Help: Ensure the name is correct, including its namespace, and that it's properly defined and autoloadable.
non-existent-class-like: src/SDK/Logs/PsrSeverityMapperInterface.php#L17
Class, interface, enum, or trait `Psr\Log\LogLevel` not found. >`Psr\Log\LogLevel` is not defined or cannot be found Help: Ensure the name is correct, including its namespace, and that it's properly defined and autoloadable.
too-many-methods: src/API/Logs/NoopLogRecordBuilder.php#L13
Class has too many methods. >Class has 11 methods, which exceeds the threshold of 10. Having a large number of methods can make structures harder to understand and maintain. Help: Try reducing the number of methods, or consider splitting the structure into smaller, more focused structures.
excessive-parameter-list: src/SDK/Metrics/Aggregation/DropAggregation.php#L46
Parameter list is too long. >This list has 6 parameters, which exceeds the threshold of 5. Having a large number of parameters can make functions harder to understand and maintain. Help: Try reducing the number of parameters, or consider passing an object or a shape instead.
excessive-parameter-list: src/API/Logs/EventLoggerInterface.php#L15
Parameter list is too long. >This list has 6 parameters, which exceeds the threshold of 5. Having a large number of parameters can make functions harder to understand and maintain. Help: Try reducing the number of parameters, or consider passing an object or a shape instead.
excessive-parameter-list: src/SDK/Logs/Processor/BatchLogRecordProcessor.php#L62
Parameter list is too long. >This list has 8 parameters, which exceeds the threshold of 5. Having a large number of parameters can make functions harder to understand and maintain. Help: Try reducing the number of parameters, or consider passing an object or a shape instead.
too-many-properties: src/SDK/Logs/Processor/BatchLogRecordProcessor.php#L26
Class has too many properties. >Class has 17 properties, which exceeds the threshold of 10. Having a large number of properties can make classes harder to understand and maintain. Help: Try reducing the number of properties, or consider grouping related properties into a single object.
kan-defect: src/SDK/Logs/Processor/BatchLogRecordProcessor.php#L26
Class has a high kan defect score. >Class has a kan defect score of 1.7100000000000002, which exceeds the threshold of 1.6. Kan defect is a heuristic used by phpmetrics to estimate defect-proneness based on control-flow statements. Help: You can also consider splitting large units of code into smaller, more focused units.
cyclomatic-complexity: src/SDK/Logs/Processor/BatchLogRecordProcessor.php#L26
Class has high complexity. >Class has a cyclomatic complexity of 29, which exceeds the threshold of 15.
too-many-methods: src/Config/SDK/ComponentProvider/OpenTelemetrySdk.php#L68
Class has too many methods. >Class has 11 methods, which exceeds the threshold of 10. Having a large number of methods can make structures harder to understand and maintain. Help: Try reducing the number of methods, or consider splitting the structure into smaller, more focused structures.
kan-defect: src/Config/SDK/ComponentProvider/OpenTelemetrySdk.php#L68
Class has a high kan defect score. >Class has a kan defect score of 4.95, which exceeds the threshold of 1.6. Kan defect is a heuristic used by phpmetrics to estimate defect-proneness based on control-flow statements. Help: You can also consider splitting large units of code into smaller, more focused units.
cyclomatic-complexity: src/Config/SDK/ComponentProvider/OpenTelemetrySdk.php#L68
Class has high complexity. >Class has a cyclomatic complexity of 67, which exceeds the threshold of 15.
Mago Quality Checks
Process completed with exit code 1.
mixed-assignment: src/Config/SDK/ComponentProvider/OpenTelemetrySdk.php#L792
Assigning `mixed` type to a variable may lead to unexpected behavior. >Assigning `mixed` type here. Using `mixed` can lead to runtime errors if the variable is used in a way that assumes a specific type. Help: Consider using a more specific type to avoid potential issues.
mixed-assignment: src/Config/SDK/ComponentProvider/OpenTelemetrySdk.php#L690
Assigning `mixed` type to a variable may lead to unexpected behavior. >Assigning `mixed` type here. Using `mixed` can lead to runtime errors if the variable is used in a way that assumes a specific type. Help: Consider using a more specific type to avoid potential issues.
mixed-assignment: src/Config/SDK/ComponentProvider/OpenTelemetrySdk.php#L636
Assigning `mixed` type to a variable may lead to unexpected behavior. >Assigning `mixed` type here. Using `mixed` can lead to runtime errors if the variable is used in a way that assumes a specific type. Help: Consider using a more specific type to avoid potential issues.
mixed-assignment: src/Config/SDK/ComponentProvider/OpenTelemetrySdk.php#L623
Assigning `mixed` type to a variable may lead to unexpected behavior. >Assigning `mixed` type here. Using `mixed` can lead to runtime errors if the variable is used in a way that assumes a specific type. Help: Consider using a more specific type to avoid potential issues.
mixed-assignment: src/Config/SDK/ComponentProvider/OpenTelemetrySdk.php#L567
Assigning `mixed` type to a variable may lead to unexpected behavior. >Assigning `mixed` type here. Using `mixed` can lead to runtime errors if the variable is used in a way that assumes a specific type. Help: Consider using a more specific type to avoid potential issues.
mixed-assignment: src/Config/SDK/ComponentProvider/OpenTelemetrySdk.php#L492
Assigning `mixed` type to a variable may lead to unexpected behavior. >Assigning `mixed` type here. Using `mixed` can lead to runtime errors if the variable is used in a way that assumes a specific type. Help: Consider using a more specific type to avoid potential issues.
deprecated-method: src/Config/SDK/ComponentProvider/OpenTelemetrySdk.php#L483
Call to deprecated method: `OpenTelemetry\SDK\SdkBuilder::setEventLoggerProvider`. >This method is deprecated The method `OpenTelemetry\SDK\SdkBuilder::setEventLoggerProvider` is marked as deprecated and may be removed or its behavior changed in future versions. Help: Consult the documentation for `OpenTelemetry\SDK\SdkBuilder::setEventLoggerProvider` for alternatives or migration instructions.
deprecated-class: src/Config/SDK/ComponentProvider/OpenTelemetrySdk.php#L479
Class `OpenTelemetry\SDK\Logs\EventLoggerProvider` is deprecated and should no longer be used. >Instantiation of deprecated class Help: Consult the documentation for this class to find its replacement or an alternative approach.
no-isset: src/Config/SDK/ComponentProvider/OpenTelemetrySdk.php#L328
Use of the `isset` construct. >Ambiguous check due to `isset()` conflating existence and null comparison `isset()` returns false for both unset variables and null values. It is unclear whether you're checking for variable existence or non-null value. Help: Use explicit null comparison (`!== null`) or the null coalescing operator (`??`).
no-isset: src/Config/SDK/ComponentProvider/OpenTelemetrySdk.php#L325
Use of the `isset` construct. >Ambiguous check due to `isset()` conflating existence and null comparison `isset()` returns false for both unset variables and null values. It is unclear whether you're checking for variable existence or non-null value. Help: Use explicit null comparison (`!== null`) or the null coalescing operator (`??`).
no-isset: src/Config/SDK/ComponentProvider/OpenTelemetrySdk.php#L322
Use of the `isset` construct. >Ambiguous check due to `isset()` conflating existence and null comparison `isset()` returns false for both unset variables and null values. It is unclear whether you're checking for variable existence or non-null value. Help: Use explicit null comparison (`!== null`) or the null coalescing operator (`??`).
no-isset: src/Config/SDK/ComponentProvider/OpenTelemetrySdk.php#L311
Use of the `isset` construct. >Ambiguous check due to `isset()` conflating existence and null comparison `isset()` returns false for both unset variables and null values. It is unclear whether you're checking for variable existence or non-null value. Help: Use explicit null comparison (`!== null`) or the null coalescing operator (`??`).
no-isset: src/Config/SDK/ComponentProvider/OpenTelemetrySdk.php#L300
Use of the `isset` construct. >Ambiguous check due to `isset()` conflating existence and null comparison `isset()` returns false for both unset variables and null values. It is unclear whether you're checking for variable existence or non-null value. Help: Use explicit null comparison (`!== null`) or the null coalescing operator (`??`).
halstead: src/Config/SDK/ComponentProvider/OpenTelemetrySdk.php#L211
Method has a high halstead volume and effort >Method exceeds halstead volume and effort threshold(s) Halstead volume is 3546.65 (threshold 1000). Volume estimates the code's overall size/complexity. Halstead effort is 34875.4 (threshold 5000). Effort estimates the mental effort required to develop/maintain the code. Help: Consider breaking this into smaller, more focused functions.
tagged-todo: src/Config/SDK/ComponentProvider/OpenTelemetrySdk.php#L840
TODO should be tagged with (@username) or (#issue). >TODO comment is untagged Help: Add a user tag or issue reference to the TODO comment, e.g. TODO(@azjezz), TODO(azjezz), TODO(#123).
tagged-todo: src/Config/SDK/ComponentProvider/OpenTelemetrySdk.php#L470
TODO should be tagged with (@username) or (#issue). >TODO comment is untagged Help: Add a user tag or issue reference to the TODO comment, e.g. TODO(@azjezz), TODO(azjezz), TODO(#123).
tagged-todo: src/Config/SDK/ComponentProvider/OpenTelemetrySdk.php#L383
TODO should be tagged with (@username) or (#issue). >TODO comment is untagged Help: Add a user tag or issue reference to the TODO comment, e.g. TODO(@azjezz), TODO(azjezz), TODO(#123).
tagged-todo: src/Config/SDK/ComponentProvider/OpenTelemetrySdk.php#L359
TODO should be tagged with (@username) or (#issue). >TODO comment is untagged Help: Add a user tag or issue reference to the TODO comment, e.g. TODO(@azjezz), TODO(azjezz), TODO(#123).
reference-to-undefined-variable: src/Config/SDK/ComponentProvider/OpenTelemetrySdk.php#L546
Reference created from a previously undefined variable `$matches`. >`$matches` is created here and initialized to `null` because it's used as a reference When a reference is taken from an undefined variable, PHP creates it with a `null` value. This is often used for output parameters but can hide typos if you intended to use an existing variable. Help: If this is intentional, consider initializing `$matches` to `null` first for code clarity. Otherwise, check for typos.
no-boolean-flag-parameter: src/SDK/Common/Util/WildcardMatcher.php#L75
Avoid boolean flag parameters. >This parameter acts as a boolean flag >Boolean type declared here Boolean flags often indicate a function has more than one responsibility, making it harder to understand and test. Help: Refactor by splitting the function into two separate methods, each with a clear, descriptive name.
no-boolean-flag-parameter: src/SDK/Common/Util/WildcardMatcher.php#L60
Avoid boolean flag parameters. >This parameter acts as a boolean flag >Boolean type declared here Boolean flags often indicate a function has more than one responsibility, making it harder to understand and test. Help: Refactor by splitting the function into two separate methods, each with a clear, descriptive name.
prefer-early-continue: src/SDK/Trace/SpanProcessor/MultiSpanProcessor.php#L55
Consider using early continue pattern to reduce nesting. >This if statement wraps the entire loop body >The loop can benefit from early continue to improve readability This pattern improves readability by reducing nesting levels. Help: Invert the condition and use `continue` to exit early, then place the main logic outside the if block.
no-else-clause: src/SDK/Logs/Processor/BatchLogRecordProcessor.php#L224
Avoid `else` clauses. >This `else` clause can often be eliminated Code is often clearer when the main logic is not nested inside an `if` statement. Help: Consider refactoring to use an early return (a guard clause) to simplify the control flow.
prefer-while-loop: src/SDK/Logs/Processor/BatchLogRecordProcessor.php#L211
Use `while` loop instead of `for` loop. >This `for` loop can be simplified to a `while` loop This `for` loop can be simplified to a `while` loop since it doesn't have initializations or increments. Help: Use a `while` loop instead of a `for` loop.
no-else-clause: src/SDK/Logs/Processor/BatchLogRecordProcessor.php#L106
Avoid `else` clauses. >This `else` clause can often be eliminated Code is often clearer when the main logic is not nested inside an `if` statement. Help: Consider refactoring to use an early return (a guard clause) to simplify the control flow.
no-boolean-flag-parameter: src/SDK/Metrics/MetricExporter/InMemoryExporter.php#L52
Avoid boolean flag parameters. >This parameter acts as a boolean flag >Boolean type declared here Boolean flags often indicate a function has more than one responsibility, making it harder to understand and test. Help: Refactor by splitting the function into two separate methods, each with a clear, descriptive name.
prefer-early-continue: src/Config/SDK/ComponentProvider/OpenTelemetrySdk.php#L862
Consider using early continue pattern to reduce nesting. >This if statement wraps the entire loop body >The loop can benefit from early continue to improve readability This pattern improves readability by reducing nesting levels. Help: Invert the condition and use `continue` to exit early, then place the main logic outside the if block.
prefer-early-continue: src/Config/SDK/ComponentProvider/OpenTelemetrySdk.php#L269
Consider using early continue pattern to reduce nesting. >This if statement wraps the entire loop body >The loop can benefit from early continue to improve readability This pattern improves readability by reducing nesting levels. Help: Invert the condition and use `continue` to exit early, then place the main logic outside the if block.
prefer-early-continue: src/Config/SDK/ComponentProvider/OpenTelemetrySdk.php#L248
Consider using early continue pattern to reduce nesting. >This if statement wraps the entire loop body >The loop can benefit from early continue to improve readability This pattern improves readability by reducing nesting levels. Help: Invert the condition and use `continue` to exit early, then place the main logic outside the if block.