k911/swoole-bundle

View on GitHub
src/Component/ExceptionArrayTransformer.php

Summary

Maintainability
A
0 mins
Test Coverage
A
100%

Avoid unused private methods such as 'transformFnDefault'.
Invalid

    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 'transformFnVerbose'.
Invalid

    private function transformFnVerbose(Throwable $exception): array
    {
        return [
            'class' => \get_class($exception),
            '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 'transformFnVerboseWithTrace'.
Invalid

    private function transformFnVerboseWithTrace(Throwable $exception): array
    {
        return [
            'class' => \get_class($exception),
            '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
Invalid

        return \array_map(fn ($arg): string => \is_object($arg) ? \get_class($arg) : \gettype($arg), $args);

There are no issues that match your filters.

Category
Status