Overview
Compare directly redeclared methods with uniquely indexed public parent/interface methods. Preserve public visibility and staticness; this check does not verify every signature or behavioral contract.
Why it Matters
Incompatible method visibility or staticness can break inherited public contracts.
Interpret the reported resource and collection scope before making changes. Unsupported source, unresolved symbols and bounded collection gaps cannot establish a clean result.
Verification Steps
Manual Verification
- Compare directly redeclared methods with uniquely indexed public parent/interface methods. Preserve public visibility and staticness; this check does not verify every signature or behavioral contract.
- Inspect the reported file, declaration, package or evidence record in the same selected release. Keep source observations separate from effective runtime behavior.
- Apply the rule-specific remediation below, validate the affected behavior in staging, and rerun the same selection.
Command / Review Sample
php magebean.phar audit --path=/var/www/magento --profile=module-source --rules=MB-0820 --modules=Vendor_Module
Use the assessed Magento project and the appropriate application or read-only review account. Replace example hosts, paths and identifiers with the assessment scope; configuration and source fragments are illustrative.
Remediation / Fix Guidance
- Review the exact reported source location and declared target.
- Validate the corrected code against the intended deployment in staging.
- Rerun MB-0820 with the same module selection.
Examples
Illustrative declaration/review examples, not recorded scan output. A pass example concerns only the stated predicate and supported collected scope.
Fail Example
Parent: public function read()
Child: protected function read()
Pass Example
Parent: public function read()
Child: public function read()
Other signature and behavior obligations remain separate.
Scope and Evidence Limits
Rule revision: 1. Target modes: LOCAL.
Directly redeclared methods retain public visibility and staticness from their uniquely indexed public parent or interface declaration.
Bounded static detection. Findings apply to the documented syntax, declaration or flow patterns only.
Catalog coverage describes implementation capability, not a scan outcome. An incomplete manual review cannot establish that the criterion is satisfied.