Skip to content

Commit 5eed8f7

Browse files
committed
Fix headers & phpstan
1 parent 23a2f6c commit 5eed8f7

6 files changed

Lines changed: 10 additions & 126 deletions

File tree

ajax/ipcomment.php

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -27,38 +27,10 @@
2727
* --------------------------------------------------------------------------
2828
*/
2929

30-
/*
31-
-------------------------------------------------------------------------
32-
addressing plugin for GLPI
33-
Copyright (C) 2016-2026 by the addressing Development Team.
34-
35-
https://github.com/pluginsGLPI/addressing
36-
-------------------------------------------------------------------------
37-
38-
LICENSE
39-
40-
This file is part of addressing.
41-
42-
addressing is free software; you can redistribute it and/or modify
43-
it under the terms of the GNU General Public License as published by
44-
the Free Software Foundation; either version 3 of the License, or
45-
(at your option) any later version.
46-
47-
addressing is distributed in the hope that it will be useful,
48-
but WITHOUT ANY WARRANTY; without even the implied warranty of
49-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
50-
GNU General Public License for more details.
51-
52-
You should have received a copy of the GNU General Public License
53-
along with addressing. If not, see <http://www.gnu.org/licenses/>.
54-
--------------------------------------------------------------------------
55-
*/
56-
5730
// ----------------------------------------------------------------------
5831
// Original Author of file: Alban Lesellier
5932
// ----------------------------------------------------------------------
6033

61-
6234
use Glpi\Exception\Http\AccessDeniedHttpException;
6335
use GlpiPlugin\Addressing\Addressing;
6436
use GlpiPlugin\Addressing\IpComment;
@@ -93,5 +65,4 @@
9365
$ipcomment->add(['plugin_addressing_addressings_id' => $addressing_id, 'ipname' => $ipname, 'comments' => $content]);
9466
}
9567

96-
9768
echo json_encode(0);

front/filter.form.php

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -27,33 +27,6 @@
2727
* --------------------------------------------------------------------------
2828
*/
2929

30-
/*
31-
-------------------------------------------------------------------------
32-
addressing plugin for GLPI
33-
Copyright (C) 2016-2026 by the addressing Development Team.
34-
35-
https://github.com/pluginsGLPI/addressing
36-
-------------------------------------------------------------------------
37-
38-
LICENSE
39-
40-
This file is part of addressing.
41-
42-
addressing is free software; you can redistribute it and/or modify
43-
it under the terms of the GNU General Public License as published by
44-
the Free Software Foundation; either version 3 of the License, or
45-
(at your option) any later version.
46-
47-
addressing is distributed in the hope that it will be useful,
48-
but WITHOUT ANY WARRANTY; without even the implied warranty of
49-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
50-
GNU General Public License for more details.
51-
52-
You should have received a copy of the GNU General Public License
53-
along with addressing. If not, see <http://www.gnu.org/licenses/>.
54-
--------------------------------------------------------------------------
55-
*/
56-
5730
use GlpiPlugin\Addressing\Addressing;
5831
use GlpiPlugin\Addressing\Filter;
5932

hook.php

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -27,33 +27,6 @@
2727
* --------------------------------------------------------------------------
2828
*/
2929

30-
/*
31-
-------------------------------------------------------------------------
32-
addressing plugin for GLPI
33-
Copyright (C) 2016-2026 by the addressing Development Team.
34-
35-
https://github.com/pluginsGLPI/addressing
36-
-------------------------------------------------------------------------
37-
38-
LICENSE
39-
40-
This file is part of addressing.
41-
42-
addressing is free software; you can redistribute it and/or modify
43-
it under the terms of the GNU General Public License as published by
44-
the Free Software Foundation; either version 3 of the License, or
45-
(at your option) any later version.
46-
47-
addressing is distributed in the hope that it will be useful,
48-
but WITHOUT ANY WARRANTY; without even the implied warranty of
49-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
50-
GNU General Public License for more details.
51-
52-
You should have received a copy of the GNU General Public License
53-
along with addressing. If not, see <http://www.gnu.org/licenses/>.
54-
--------------------------------------------------------------------------
55-
*/
56-
5730
use Glpi\Plugin\Hooks;
5831
use GlpiPlugin\Addressing\Addressing;
5932
use GlpiPlugin\Addressing\AddressingInjection;
@@ -307,7 +280,6 @@ function plugin_addressing_install()
307280
return true;
308281
}
309282

310-
311283
/**
312284
* @return bool
313285
*/
@@ -354,7 +326,6 @@ function plugin_addressing_uninstall()
354326
return true;
355327
}
356328

357-
358329
/**
359330
* Define database relations
360331
*

phpstan-baseline.neon

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,6 @@ parameters:
138138
count: 2
139139
path: src/Config.php
140140

141-
-
142-
message: '#^Strict comparison using \=\=\= between ''GIT'' and ''CLOUD'' will always evaluate to false\.$#'
143-
identifier: identical.alwaysFalse
144-
count: 2
145-
path: src/Config.php
146-
147141
-
148142
message: '#^You should not use the `die` function\. It prevents the execution of post\-request/post\-command routines\.$#'
149143
identifier: glpi.forbidExit
@@ -204,12 +198,6 @@ parameters:
204198
count: 2
205199
path: src/Ping_Equipment.php
206200

207-
-
208-
message: '#^Strict comparison using \=\=\= between ''GIT'' and ''CLOUD'' will always evaluate to false\.$#'
209-
identifier: identical.alwaysFalse
210-
count: 2
211-
path: src/Ping_Equipment.php
212-
213201
-
214202
message: '#^Variable \$nb in isset\(\) always exists and is not nullable\.$#'
215203
identifier: isset.variable

phpstan.neon

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,13 @@ parameters:
2222
- ../../vendor/autoload.php
2323
- setup.php
2424
treatPhpDocTypesAsCertain: false
25+
ignoreErrors:
26+
# GLPI_INSTALL_MODE is a compile-time constant whose value depends on how
27+
# GLPI was installed: 'GIT' on a git checkout (local dev), 'TARBALL' on
28+
# the CI runner, 'CLOUD' in GLPI cloud. The `=== 'CLOUD'` guards are an
29+
# intentional runtime branch (ping disabled in cloud). PHPStan constant-
30+
# folds the comparison to always-false and bakes the LOCAL value into the
31+
# message, so a baseline generated on a git checkout ('GIT') never matches
32+
# the runner ('TARBALL'). Ignore generically on the left-hand value so the
33+
# rule is stable across every install mode.
34+
- '#^Strict comparison using \=\=\= between ''[A-Z]+'' and ''CLOUD'' will always evaluate to false\.$#'

public/addressing.css

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -25,34 +25,6 @@
2525
* --------------------------------------------------------------------------
2626
*/
2727

28-
/*
29-
* @version $Id$
30-
-------------------------------------------------------------------------
31-
addressing plugin for GLPI
32-
Copyright (C) 2009-2022 by the addressing Development Team.
33-
34-
https://github.com/pluginsGLPI/addressing
35-
-------------------------------------------------------------------------
36-
37-
LICENSE
38-
39-
This file is part of addressing.
40-
41-
addressing is free software; you can redistribute it and/or modify
42-
it under the terms of the GNU General Public License as published by
43-
the Free Software Foundation; either version 2 of the License, or
44-
(at your option) any later version.
45-
46-
addressing is distributed in the hope that it will be useful,
47-
but WITHOUT ANY WARRANTY; without even the implied warranty of
48-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
49-
GNU General Public License for more details.
50-
51-
You should have received a copy of the GNU General Public License
52-
along with addressing. If not, see <http://www.gnu.org/licenses/>.
53-
--------------------------------------------------------------------------
54-
*/
55-
5628
.plugin_addressing_ip_double {
5729
background-color: #CF9B9B;
5830
}
@@ -73,7 +45,6 @@
7345
background-color: #8DA372;
7446
}
7547

76-
7748
.plugin_addressing_ping_equipment {
7849
border:2px solid #E1CC7B;
7950
color:white;

0 commit comments

Comments
 (0)