Skip to content

Commit 9e489b1

Browse files
Adding method must return object rule (#8)
* Adding a scope check to the MethodSignatureMustMatchRule * Enhance MethodSignatureMustMatchRule to conditionally check parameter types based on configuration. Added tests for methods with and without type specifications, ensuring correct error reporting for type mismatches. * Refactor MethodSignatureMustMatchRule to streamline parameter validation. Introduced a new method for validating parameters, consolidating error handling for missing parameters, type mismatches, and name pattern violations. This enhances code readability and maintainability. * Remove deprecated PHPStan rules from configuration to streamline analysis. * Add new test methods to TestClass for various parameter types and update documentation - Introduced `testMethodNoType` with mixed parameter types. - Added `testMethodWithWrongType` to validate error handling for incorrect parameter types. - Updated documentation in `MethodMustReturnTypeRule` to clarify checks performed on method signatures. * Update README and Rules documentation to clarify rules and add new rules - Revised README to specify that all controllers must be `readonly` and clarified method argument limits. - Enhanced Rules documentation with new rules for catching exceptions and naming conventions for boolean-returning methods. - Corrected class names in configuration examples for consistency.
1 parent 23e5d35 commit 9e489b1

File tree

0 file changed

+0
-0
lines changed

    0 file changed

    +0
    -0
    lines changed

    0 commit comments

    Comments
     (0)