From f8f35276e5e8f2bf4054d4439ba034f221f4d0ff Mon Sep 17 00:00:00 2001 From: Johan Cwiklinski Date: Wed, 8 Nov 2023 10:41:24 +0100 Subject: [PATCH] Stub thing --- inc/taginjection.class.php | 1 - phpstan.neon | 1 + .../PluginDatainjectionInjectionInterface.php | 40 +++++++++++++++++++ 3 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 stubs/PluginDatainjectionInjectionInterface.php diff --git a/inc/taginjection.class.php b/inc/taginjection.class.php index 0068cbf..205d3ae 100644 --- a/inc/taginjection.class.php +++ b/inc/taginjection.class.php @@ -28,7 +28,6 @@ * ------------------------------------------------------------------------- */ -/** @phpstan-ignore-next-line */ class PluginTagTagInjection extends PluginTagTag implements PluginDatainjectionInjectionInterface { public static function getTable($classname = null) diff --git a/phpstan.neon b/phpstan.neon index 8feb506..9b01c44 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -15,5 +15,6 @@ parameters: - ../../src stubFiles: - ../../stubs/glpi_constants.php + - stubs/PluginDatainjectionInjectionInterface.php rules: - GlpiProject\Tools\PHPStan\Rules\GlobalVarTypeRule diff --git a/stubs/PluginDatainjectionInjectionInterface.php b/stubs/PluginDatainjectionInjectionInterface.php new file mode 100644 index 0000000..dbca287 --- /dev/null +++ b/stubs/PluginDatainjectionInjectionInterface.php @@ -0,0 +1,40 @@ +. + * ------------------------------------------------------------------------- + * @copyright Copyright (C) 2007-2023 by DataInjection plugin team. + * @license GPLv2 https://www.gnu.org/licenses/gpl-2.0.html + * @link https://github.com/pluginsGLPI/datainjection + * ------------------------------------------------------------------------- + */ + +if (!defined('GLPI_ROOT')) { + die("Sorry. You can't access directly to this file"); +} + +/** + * Interface to implement for each type to inject +**/ +interface PluginDatainjectionInjectionInterface +{ +}