[ '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 array */ public function providerFileCheckerInvalidCodeParse() { 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', ], 'privateConstructorInheritance' => [ ' 'InaccessibleMethod', ], 'privateConstructorInheritanceCall' => [ ' 'InaccessibleMethod', ], ]; } }