Skip to content

Commit 8657522

Browse files
committed
post rebase
1 parent 6b98160 commit 8657522

2 files changed

Lines changed: 0 additions & 92 deletions

File tree

.phpstan-baseline.php

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -79,30 +79,12 @@
7979
'count' => 1,
8080
'path' => __DIR__ . '/src/CommonITILCost.php',
8181
];
82-
$ignoreErrors[] = [
83-
'message' => '#^Parameter \\#1 \\$ticket of method LevelAgreement\\:\\:addLevelToDo\\(\\) expects Ticket, \\$this\\(CommonITILObject\\) given\\.$#',
84-
'identifier' => 'argument.type',
85-
'count' => 2,
86-
'path' => __DIR__ . '/src/CommonITILObject.php',
87-
];
88-
$ignoreErrors[] = [
89-
'message' => '#^Parameter \\#1 \\$ticket of static method LevelAgreement\\:\\:deleteLevelsToDo\\(\\) expects Ticket, \\$this\\(CommonITILObject\\) given\\.$#',
90-
'identifier' => 'argument.type',
91-
'count' => 2,
92-
'path' => __DIR__ . '/src/CommonITILObject.php',
93-
];
9482
$ignoreErrors[] = [
9583
'message' => '#^Parameter \\#1 \\$time of static method Html\\:\\:convDateTime\\(\\) expects string, true given\\.$#',
9684
'identifier' => 'argument.type',
9785
'count' => 2,
9886
'path' => __DIR__ . '/src/CommonITILObject.php',
9987
];
100-
$ignoreErrors[] = [
101-
'message' => '#^Parameter \\#1 \\$type of method CommonITILObject\\:\\:getTemplateFieldName\\(\\) expects string\\|null, int\\<min, \\-1\\>\\|int\\<1, max\\>\\|true given\\.$#',
102-
'identifier' => 'argument.type',
103-
'count' => 2,
104-
'path' => __DIR__ . '/src/CommonITILObject.php',
105-
];
10688
$ignoreErrors[] = [
10789
'message' => '#^Parameter \\#2 \\$odd of static method Search\\:\\:showNewLine\\(\\) expects bool, int\\<\\-1, 1\\> given\\.$#',
10890
'identifier' => 'argument.type',
@@ -409,18 +391,6 @@
409391
'count' => 1,
410392
'path' => __DIR__ . '/src/KnowbaseItemTranslation.php',
411393
];
412-
$ignoreErrors[] = [
413-
'message' => '#^Parameter \\#1 \\$slm of static method LevelAgreement\\:\\:showForSLM\\(\\) expects SLM, CommonGLPI given\\.$#',
414-
'identifier' => 'argument.type',
415-
'count' => 1,
416-
'path' => __DIR__ . '/src/LevelAgreement.php',
417-
];
418-
$ignoreErrors[] = [
419-
'message' => '#^Parameter \\#2 \\$olaType\\|slaType of method OlaLevel_Ticket\\:\\:getFromDBForTicket\\(\\) expects 0\\|1, int given\\.$#',
420-
'identifier' => 'argument.type',
421-
'count' => 1,
422-
'path' => __DIR__ . '/src/LevelAgreement.php',
423-
];
424394
$ignoreErrors[] = [
425395
'message' => '#^Parameter \\#1 \\$email of static method Supplier\\:\\:getSuppliersByEmail\\(\\) expects bool, string given\\.$#',
426396
'identifier' => 'argument.type',

src/Ticket.php

Lines changed: 0 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -6268,68 +6268,6 @@ public static function getListForItemRestrict(CommonDBTM $item)
62686268
return $restrict;
62696269
}
62706270

6271-
private static function getListForItemSearchOptionsCriteria(CommonDBTM $item): array
6272-
{
6273-
$options = [
6274-
'criteria' => [],
6275-
'reset' => 'reset',
6276-
];
6277-
6278-
switch (true) {
6279-
case $item instanceof User:
6280-
$options['criteria'][0]['field'] = 4; // status
6281-
$options['criteria'][0]['searchtype'] = 'equals';
6282-
$options['criteria'][0]['value'] = $item->getID();
6283-
$options['criteria'][0]['link'] = 'AND';
6284-
break;
6285-
6286-
case $item instanceof SLA:
6287-
case $item instanceof OLA:
6288-
$options['criteria'][0]['field'] = 30;
6289-
$options['criteria'][0]['searchtype'] = 'equals';
6290-
$options['criteria'][0]['value'] = $item->getID();
6291-
$options['criteria'][0]['link'] = 'AND';
6292-
break;
6293-
6294-
case $item instanceof Supplier:
6295-
$options['criteria'][0]['field'] = 6;
6296-
$options['criteria'][0]['searchtype'] = 'equals';
6297-
$options['criteria'][0]['value'] = $item->getID();
6298-
$options['criteria'][0]['link'] = 'AND';
6299-
break;
6300-
6301-
case $item instanceof Group:
6302-
if ($item->haveChildren()) {
6303-
$tree = Session::getSavedOption(self::class, 'tree', 0);
6304-
} else {
6305-
$tree = 0;
6306-
}
6307-
$options['criteria'][0]['field'] = 71;
6308-
$options['criteria'][0]['searchtype'] = ($tree ? 'under' : 'equals');
6309-
$options['criteria'][0]['value'] = $item->getID();
6310-
$options['criteria'][0]['link'] = 'AND';
6311-
break;
6312-
6313-
default:
6314-
$options['criteria'][0]['field'] = 12;
6315-
$options['criteria'][0]['searchtype'] = 'equals';
6316-
$options['criteria'][0]['value'] = 'all';
6317-
$options['criteria'][0]['link'] = 'AND';
6318-
6319-
$options['metacriteria'][0]['itemtype'] = $item->getType();
6320-
$options['metacriteria'][0]['field'] = Search::getOptionNumber(
6321-
$item->getType(),
6322-
'id'
6323-
);
6324-
$options['metacriteria'][0]['searchtype'] = 'equals';
6325-
$options['metacriteria'][0]['value'] = $item->getID();
6326-
$options['metacriteria'][0]['link'] = 'AND';
6327-
break;
6328-
}
6329-
6330-
return $options;
6331-
}
6332-
63336271
/**
63346272
* Ticket Olas data from database
63356273
*

0 commit comments

Comments
 (0)