apparat/object

View on GitHub
src/Object/Domain/Model/Object/Traits/ObjectProxyTrait.php

Summary

Maintainability
A
2 hrs
Test Coverage

File ObjectProxyTrait.php has 268 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

/**
 * apparat-object
 *
Severity: Minor
Found in src/Object/Domain/Model/Object/Traits/ObjectProxyTrait.php - About 2 hrs to fix

    The method getPropertyData has a boolean flag argument $serialize, which is a certain sign of a Single Responsibility Principle violation.
    Open

        public function getPropertyData($serialize = true)

    BooleanArgumentFlag

    Since: 1.4.0

    A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

    Example

    class Foo {
        public function bar($flag = true) {
        }
    }

    Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

    There are no issues that match your filters.

    Category
    Status