pixelfederation/swoole-bundle

View on GitHub
src/Component/ExceptionArrayTransformer.php

Summary

Maintainability
A
0 mins
Test Coverage

Avoid unused private methods such as 'transformFnDefault'.
Open

    private function transformFnDefault(\Throwable $exception): array
    {
        return [
            'code' => $exception->getCode(),
            'message' => $exception->getMessage(),

UnusedPrivateMethod

Since: 0.2

Unused Private Method detects when a private method is declared but is unused.

Example

class Something
{
    private function foo() {} // unused
}

Source https://phpmd.org/rules/unusedcode.html#unusedprivatemethod

Avoid unused private methods such as 'transformFnVerboseWithTrace'.
Open

    private function transformFnVerboseWithTrace(\Throwable $exception): array
    {
        return [
            'class' => $exception::class,
            'code' => $exception->getCode(),

UnusedPrivateMethod

Since: 0.2

Unused Private Method detects when a private method is declared but is unused.

Example

class Something
{
    private function foo() {} // unused
}

Source https://phpmd.org/rules/unusedcode.html#unusedprivatemethod

Avoid unused private methods such as 'transformFnVerbose'.
Open

    private function transformFnVerbose(\Throwable $exception): array
    {
        return [
            'class' => $exception::class,
            'code' => $exception->getCode(),

UnusedPrivateMethod

Since: 0.2

Unused Private Method detects when a private method is declared but is unused.

Example

class Something
{
    private function foo() {} // unused
}

Source https://phpmd.org/rules/unusedcode.html#unusedprivatemethod

Space before opening parenthesis of function call prohibited
Open

        return array_map(fn ($arg): string => get_debug_type($arg), $args);

Space before opening parenthesis of function call prohibited
Open

        return match ($verbosity) {

Line indented incorrectly; expected 8 spaces, found 12
Open

            default => $this->transformWithFn($exception, [$this, 'transformFnDefault']),

There are no issues that match your filters.

Category
Status