mirror of
https://github.com/danog/psalm.git
synced 2024-12-15 02:47:02 +01:00
3bc91b9944
* Add passing tests for property fetch on an @internal class I'm trying to work out why the equivilent InvalidCodeParse test is failing for PsalmInternal * Treat all properties of a psalm-internal class as psalm-internal * Remove all $internal properties from storage - use psalm_internal instead @internal can be represented as internal to the namespace root, avoiding the need to check for both properties in storage later. * Raise InternalClass issue when an internal class is used with e.g. instanceOf * fix docs and tests * Add return type declartion to code example in doc * Don't allow class psalm-internal to overide a tighter method psalm-internal * Break up long line * Code style - move && from EOL to SOL * Restore misplaced && * Fix code style * Fix namespace fetching so it works Co-authored-by: Matthew Brown <github@muglug.com>
401 B
401 B
InternalClass
Emitted when attempting to access a class marked as internal an unrelated namespace or class, or attempting to access a class marked as psalm-internal to a different namespace.
<?php
namespace A {
/**
* @internal
*/
class Foo { }
}
namespace B {
class Bat {
public function batBat(): void {
$a = new \A\Foo();
}
}
}