2019-02-16 17:16:52 +01:00
|
|
|
<?php
|
|
|
|
namespace PHPSTORM_META {
|
|
|
|
|
2022-11-27 10:19:05 +01:00
|
|
|
// tests with argument offset (0)
|
2020-03-01 23:11:44 +01:00
|
|
|
override(\Ns\MyClass::crEate(0), map([
|
2019-02-16 17:16:52 +01:00
|
|
|
'' => '@',
|
|
|
|
'exception' => \Exception::class,
|
|
|
|
'object' => \stdClass::class,
|
|
|
|
]));
|
|
|
|
override(\create(0), map([
|
|
|
|
'' => '@',
|
|
|
|
'exception' => \Exception::class,
|
|
|
|
'object' => \stdClass::class,
|
|
|
|
]));
|
|
|
|
|
2022-11-27 10:19:05 +01:00
|
|
|
// tests without argument offset (0 by default)
|
|
|
|
override(\Ns\MyClass::crEate2(), map([
|
|
|
|
'' => '@',
|
|
|
|
'exception' => \Exception::class,
|
|
|
|
'object' => \stdClass::class,
|
|
|
|
]));
|
|
|
|
override(\create2(), map([
|
|
|
|
'' => '@',
|
|
|
|
'exception' => \Exception::class,
|
|
|
|
'object' => \stdClass::class,
|
|
|
|
]));
|
|
|
|
|
2023-01-24 11:24:52 +01:00
|
|
|
// tests with class constant as key
|
|
|
|
override(\Ns\MyClass::crEate3(), map([
|
|
|
|
'' => '@',
|
|
|
|
\Ns\MyClass::EXCEPTION => \Exception::class,
|
|
|
|
\Ns\MyClass::OBJECT => \stdClass::class,
|
|
|
|
]));
|
|
|
|
|
2020-03-01 23:11:44 +01:00
|
|
|
override(\Ns\MyClass::foO(0), type(0));
|
|
|
|
override(\Ns\MyClass::Bar(0), elementType(0));
|
2019-02-16 17:16:52 +01:00
|
|
|
override(\foo(0), type(0));
|
|
|
|
override(\bar(0), elementType(0));
|
|
|
|
}
|