[ 'code' => ' [ 'code' => ' [ 'code' => 'barBar(); } } }', ], 'internalClassWithPropertyFetch' => [ 'code' => 'barBar; } } }', ], 'internalClassExtendingNamespaceWithStaticCall' => [ 'code' => ' [ 'code' => ' [ 'code' => ' [ 'code' => 'foo; } } }', ], 'internalPropertySet' => [ 'code' => 'foo = 5; } } }', ], 'internalMethodInTraitWithCall' => [ 'code' => ' [ 'code' => 'foo; } } }', ], 'constInternalClass' => [ 'code' => ' [ 'code' => ' [ 'code' => ' [ 'code' => ' [ 'code' => ' [ 'code' => ' [ 'code' => 'barBar(); } } }', ], 'psalmInternalClassWithPropertyFetch' => [ 'code' => 'barBar; } } }', ], 'psalmInternalClassExtendingNamespaceWithStaticCall' => [ 'code' => ' [ 'code' => ' [ 'code' => ' [ 'code' => ' [ 'code' => ' [ 'code' => 'foo; } } }', ], 'psalmInternalPropertySet' => [ 'code' => 'foo = 5; } } }', ], 'psalmInternalPropertyWithTrailingWhitespace' => [ 'code' => 'foo = 42; } } }', ], 'psalmInternalMethodInTraitWithCall' => [ 'code' => ' [ 'code' => ' [ 'code' => 'bar(); } } } ' ], ]; } /** * */ public function providerInvalidCodeParse(): iterable { return [ 'internalMethodWithCall' => [ 'code' => ' 'The method A\Foo::barBar is internal to A but called from B\Bat', ], 'internalCloneMethodWithCall' => [ 'code' => ' 'The method A\Foo::__clone is internal to A but called from B', ], 'internalMethodWithCallFromRootNamespace' => [ 'code' => ' 'The method A\Foo::barBar is internal to A but called from root namespace', ], 'internalClassWithStaticCall' => [ 'code' => ' 'InternalClass', ], 'internalClassWithInstanceCall' => [ 'code' => 'barBar(); } } }', 'error_message' => 'InternalMethod', ], 'internalClassWithPropertyFetch' => [ 'code' => 'barBar; } } }', 'error_message' => 'A\B\Foo::$barBar is internal', ], 'internalClassWithNew' => [ 'code' => ' 'InternalClass', ], 'internalClassWithExtends' => [ 'code' => ' 'InternalClass', ], 'internalPropertyGet' => [ 'code' => 'foo; } } }', 'error_message' => 'InternalProperty', ], 'internalPropertySet' => [ 'code' => 'foo = 5; } } }', 'error_message' => 'InternalProperty', ], 'magicPropertyGetInternalExplicit' => [ 'code' => '__get("foo"); } } }', 'error_message' => 'InternalMethod', ], 'constInternalClass' => [ 'code' => ' 'InternalClass', ], 'psalmInternalMethodWithCall' => [ 'code' => ' 'The method A\B\Foo::barBar is internal to A\B', ], 'psalmInternalToClassMethodWithCall' => [ 'code' => ' 'The method A\B\Foo::barBar is internal to A\B\Foo', ], 'psalmInternalClassWithStaticCall' => [ 'code' => ' 'InternalClass', ], 'psalmInternalClassWithPropertyFetch' => [ 'code' => 'barBar; } } }', 'error_message' => 'A\B\Foo::$barBar is internal to A\B', ], 'psalmInternalClassWithInstanceCall' => [ 'code' => 'barBar(); } } }', 'error_message' => 'The method A\B\Foo::barBar is internal to A\B', ], 'psalmInternalClassWithNew' => [ 'code' => ' 'InternalClass', ], 'psalmInternalClassWithExtends' => [ 'code' => ' 'A\B\Foo is internal to A\B', ], 'psalmInternalPropertyGet' => [ 'code' => 'foo; } } }', 'error_message' => 'A\B\Foo::$foo is internal to A\B', ], 'psalmInternalPropertySet' => [ 'code' => 'foo = 5; } } }', 'error_message' => 'A\B\Foo::$foo is internal to A\B', ], 'psalmInternalClassMissingNamespace' => [ 'code' => ' 'psalm-internal annotation used without specifying namespace', ], 'psalmInternalPropertyMissingNamespace' => [ 'code' => ' 'psalm-internal annotation used without specifying namespace', ], 'psalmInternalMethodMissingNamespace' => [ 'code' => ' 'psalm-internal annotation used without specifying namespace', ], 'internalConstructor' => [ 'code' => ' 'InternalMethod', ], ]; } }