From e1b32a73b4d2fd6a410806ff4569cb802599cebd Mon Sep 17 00:00:00 2001 From: Johan Cwiklinski Date: Mon, 13 Nov 2023 11:46:11 +0100 Subject: [PATCH] phpstan lvl 5 --- inc/config.class.php | 2 +- inc/profile.class.php | 2 +- phpstan.neon | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/inc/config.class.php b/inc/config.class.php index 41f6507..7f5753d 100644 --- a/inc/config.class.php +++ b/inc/config.class.php @@ -54,7 +54,7 @@ class PluginTreeviewConfig extends CommonDBTM /** * Display name of itemtype * - * @return value name of this itemtype + * @return string **/ public static function getTypeName($nb = 0) { diff --git a/inc/profile.class.php b/inc/profile.class.php index 7183953..44b6a3f 100644 --- a/inc/profile.class.php +++ b/inc/profile.class.php @@ -159,7 +159,7 @@ public function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) public static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0) { - if ($item->getType() == 'Profile') { + if ($item instanceof Profile) { $prof = new self(); $ID = $item->getField('id'); if (!$prof->GetfromDB($ID)) { diff --git a/phpstan.neon b/phpstan.neon index d248bf4..a50665a 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,7 +1,7 @@ parameters: parallel: maximumNumberOfProcesses: 2 - level: 1 + level: 5 bootstrapFiles: - ../../inc/based_config.php paths: