,error_levels?:string[]}> */ public function providerValidCodeParse() { return [ 'accessiblePrivateMethodFromSubclass' => [ 'fooFoo(); } }', ], 'accessibleProtectedMethodFromSubclass' => [ 'fooFoo(); } }', ], 'accessibleProtectedMethodFromOtherSubclass' => [ 'fooFoo(); } }', ], 'accessibleProtectedPropertyFromSubclass' => [ 'fooFoo; } }', ], 'accessibleProtectedPropertyFromGreatGrandparent' => [ 'fooFoo; } }', ], 'accessibleProtectedPropertyFromOtherSubclass' => [ 'fooFoo = "hello"; } }', ], 'accessibleStaticPropertyFromSubclass' => [ ' [ 'boop(); } } private function boop(): void {} } class B extends A { private function boop(): void {} }', ], ]; } /** * @return iterable */ public function providerInvalidCodeParse() { return [ 'inaccessiblePrivateMethod' => [ 'fooFoo();', 'error_message' => 'InaccessibleMethod', ], 'inaccessibleProtectMethod' => [ 'fooFoo();', 'error_message' => 'InaccessibleMethod', ], 'inaccessiblePrivateMethodFromSubclass' => [ 'fooFoo(); } }', 'error_message' => 'UndefinedMethod', ], 'inaccessibleProtectredMethodFromOtherSubclass' => [ 'fooFoo(); } }', 'error_message' => 'InaccessibleMethod', ], 'inaccessiblePrivateProperty' => [ 'fooFoo;', 'error_message' => 'InaccessibleProperty', ], 'inaccessibleProtectedProperty' => [ 'fooFoo;', 'error_message' => 'InaccessibleProperty', ], 'inaccessiblePrivatePropertyFromSubclass' => [ 'fooFoo; } }', 'error_message' => 'UndefinedThisPropertyFetch', ], 'inaccessibleStaticPrivateProperty' => [ ' 'InaccessibleProperty', ], 'inaccessibleStaticProtectedProperty' => [ ' 'InaccessibleProperty', ], 'inaccessibleStaticPrivatePropertyFromSubclass' => [ ' 'InaccessibleProperty', ], 'privateConstructorInheritanceNoCall' => [ ' 'InaccessibleMethod', ], 'privateConstructorInheritanceCall' => [ ' 'InaccessibleMethod', ], 'noSelfInFunctionConstant' => [ ' 'NonStaticSelfCall', ], 'noSelfInFunctionCall' => [ ' 'NonStaticSelfCall', ], ]; } }