Skip to content

Commit

Permalink
phpstan level 2
Browse files Browse the repository at this point in the history
  • Loading branch information
trasher committed Oct 30, 2023
1 parent 3195b42 commit 6b29aa9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions inc/entity.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public static function getTypeName($nb = 0)
return _n('Credit voucher', 'Credit vouchers', $nb, 'credit');
}

public function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
public function getTabNameForItem(CommonGLPI $item, $withtemplate = false)
{
$nb = self::countForItem($item);
switch ($item->getType()) {
Expand All @@ -57,7 +57,7 @@ public function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
return '';
}

public static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
public static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = false)
{
switch ($item->getType()) {
case 'Entity':
Expand Down
5 changes: 3 additions & 2 deletions inc/profile.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,15 @@

class PluginCreditProfile extends Profile
{
public function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
public function getTabNameForItem(CommonGLPI $item, $withtemplate = false)
{
return self::createTabEntry(PluginCreditTicket::getTypeName(Session::getPluralNumber()));
}

public static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
public static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = false)
{
$profile = new self();
/** @phpstan-ignore-next-line */
$profile->showForm($item->getID());
return true;
}
Expand Down
4 changes: 2 additions & 2 deletions inc/ticket.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public static function getTypeName($nb = 0)
return _n('Credit voucher', 'Credit vouchers', $nb, 'credit');
}

public function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
public function getTabNameForItem(CommonGLPI $item, $withtemplate = false)
{
$nb = self::countForItem($item);
switch ($item->getType()) {
Expand All @@ -58,7 +58,7 @@ public function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
return '';
}

public static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
public static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = false)
{
switch ($item->getType()) {
case 'Ticket':
Expand Down
2 changes: 1 addition & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
parameters:
parallel:
maximumNumberOfProcesses: 2
level: 1
level: 2
bootstrapFiles:
- ../../inc/based_config.php
- setup.php
Expand Down

0 comments on commit 6b29aa9

Please sign in to comment.