,error_levels?:string[]}> */ public function providerValidCodeParse() { return [ 'internalMethodWithCall' => [ ' [ ' [ ' [ ' [ 'barBar(); } } }', ], 'internalClassWithPropertyFetch' => [ 'barBar; } } }', ], 'internalClassExtendingNamespaceWithStaticCall' => [ ' [ ' [ ' [ ' [ 'foo; } } }', ], 'internalPropertySet' => [ 'foo = 5; } } }', ], 'internalMethodInTraitWithCall' => [ ' */ public function providerInvalidCodeParse() { return [ 'internalMethodWithCall' => [ ' 'The method A\B\Foo::barBar is internal to A\B', ], 'internalToClassMethodWithCall' => [ ' 'The method A\B\Foo::barBar is internal to A\B\Foo', ], 'internalClassWithStaticCall' => [ ' 'InternalClass', ], 'internalClassWithPropertyFetch' => [ 'barBar; } } }', 'error_message' => 'A\B\Foo::$barBar is internal to A\B', ], 'internalClassWithInstanceCall' => [ 'barBar(); } } }', 'error_message' => 'The method A\B\Foo::barBar is internal to A\B', ], 'internalClassWithNew' => [ ' 'InternalClass', ], 'internalClassWithInstanceOf' => [ ' 'A\B\Foo is internal to A\B', ], 'internalClassWithExtends' => [ ' 'A\B\Foo is internal to A\B', ], 'internalPropertyGet' => [ 'foo; } } }', 'error_message' => 'A\B\Foo::$foo is internal to A\B', ], 'internalPropertySet' => [ 'foo = 5; } } }', 'error_message' => 'A\B\Foo::$foo is internal to A\B', ], 'internalClassMissingNamespace' => [ ' 'psalm-internal annotation used without specifying namespace', ], 'internalPropertyMissingNamespace' => [ ' 'psalm-internal annotation used without specifying namespace', ], 'internalMethodMissingNamespace' => [ ' 'psalm-internal annotation used without specifying namespace', ], 'internalClassMissingInternalAnnotation' => [ ' 'psalm-internal annotation used without @internal', ], 'internalPropertyMissingInternalAnnotation' => [ ' 'psalm-internal annotation used without @internal', ], 'internalFunctionMissingInternalAnnotation' => [ ' 'psalm-internal annotation used without @internal', ], ]; } }