diff --git a/.gitignore b/.gitignore index d74f914f79f..2ab8b0a6666 100644 --- a/.gitignore +++ b/.gitignore @@ -26,6 +26,7 @@ /.patches/ /.idea/ .phpstorm.* +!.phpstorm.meta.php /nbproject/ CVS .DS_Store diff --git a/.phpstorm.meta.php b/.phpstorm.meta.php new file mode 100644 index 00000000000..1f9f6c3000b --- /dev/null +++ b/.phpstorm.meta.php @@ -0,0 +1,40 @@ +. + +/** + * Helper file for PhpStorm, and other IDEs, to provide better code completion. + * + * @package core + * @copyright 2024 Andrew Lyons + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +namespace PHPSTORM_META; + +// Assume that anything returned by \core\di::get('...') is an instance of the first argument. +override(\core\di::get(0), map([ + '' => '@', +])); + +// Assume that anything returned by \Psr\Container\ContainerInterface::get('...') is an instance of the first argument. +override(\Psr\Container\ContainerInterface::get(0), map([ + '' => '@', +])); + +// Assume that anything returned by \DI\Container::get('...') is an instance of the first argument. +override(\DI\Container::get(0), map([ + '' => '@', +]));