-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix license headers, use GLPI phpcs configuration
- Loading branch information
Showing
7 changed files
with
48 additions
and
186 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0"?> | ||
<ruleset> | ||
<file>lib</file> | ||
<file>tests</file> | ||
<exclude-pattern>/.git/</exclude-pattern> | ||
|
||
<arg name="warning-severity" value="0" /> | ||
<arg value="p" /> | ||
<ini name="memory_limit" value="512M" /> | ||
<arg name="colors" /> | ||
<arg name="extensions" value="php" /> | ||
|
||
<rule ref="PSR12"> | ||
<exclude name="PSR1.Classes.ClassDeclaration.MissingNamespace" /> | ||
<exclude name="PSR1.Methods.CamelCapsMethodName.NotCamelCaps" /> | ||
<exclude name="Squiz.Classes.ValidClassName.NotCamelCaps" /> | ||
</rule> | ||
|
||
<rule ref="Generic.Arrays.ArrayIndent"></rule> | ||
</ruleset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,12 @@ | ||
<?php | ||
|
||
/** | ||
* --------------------------------------------------------------------- | ||
* GLPI - Gestionnaire Libre de Parc Informatique | ||
* Copyright (C) 2015-2025 Teclib' and contributors. | ||
* © Teclib' and contributors. | ||
* | ||
* http://glpi-project.org | ||
* This file is part of GLPI inventory format. | ||
* | ||
* based on GLPI - Gestionnaire Libre de Parc Informatique | ||
* Copyright (C) 2003-2014 by the INDEPNET Development Team. | ||
* | ||
* --------------------------------------------------------------------- | ||
* | ||
* LICENSE | ||
* | ||
* This file is part of GLPI. | ||
* | ||
* GLPI is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* GLPI is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with GLPI. If not, see <http://www.gnu.org/licenses/>. | ||
* --------------------------------------------------------------------- | ||
* | ||
* PHP version 7 | ||
* | ||
* @category Inventory | ||
* @package Glpi | ||
* @author Johan Cwiklinski <[email protected]> | ||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version | ||
* @link https://glpi-project.org | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Glpi\Inventory; | ||
|
@@ -52,12 +22,7 @@ | |
* Converts old FusionInventory XML format to new JSON schema | ||
* for automatic inventory. | ||
* | ||
* @category Inventory | ||
* @package Glpi | ||
* @author Johan Cwiklinski <[email protected]> | ||
* @copyright 2018-2025 GLPI Team and Contributors | ||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version | ||
* @link https://glpi-project.org | ||
*/ | ||
class Converter | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,23 @@ | ||
<?php | ||
|
||
/** | ||
* --------------------------------------------------------------------- | ||
* GLPI - Gestionnaire Libre de Parc Informatique | ||
* Copyright (C) 2015-2018 Teclib' and contributors. | ||
* © Teclib' and contributors. | ||
* | ||
* http://glpi-project.org | ||
* This file is part of GLPI inventory format. | ||
* | ||
* based on GLPI - Gestionnaire Libre de Parc Informatique | ||
* Copyright (C) 2003-2014 by the INDEPNET Development Team. | ||
* | ||
* --------------------------------------------------------------------- | ||
* | ||
* LICENSE | ||
* | ||
* This file is part of GLPI. | ||
* | ||
* GLPI is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* GLPI is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with GLPI. If not, see <http://www.gnu.org/licenses/>. | ||
* --------------------------------------------------------------------- | ||
* | ||
* PHP version 7 | ||
* | ||
* @category Inventory | ||
* @package Glpi | ||
* @author Johan Cwiklinski <[email protected]> | ||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version | ||
* @link https://glpi-project.org | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Glpi\Inventory; | ||
|
||
use RuntimeException; | ||
|
||
/** | ||
* Converts old FusionInventory XML format to new JSON schema | ||
* Converts specific texts list files to JSON format | ||
* for automatic inventory. | ||
* | ||
* @category Inventory | ||
* @package Glpi | ||
* @author Johan Cwiklinski <[email protected]> | ||
* @copyright 2018-2023 GLPI Team and Contributors | ||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version | ||
* @link https://glpi-project.org | ||
*/ | ||
final class FilesToJSON | ||
{ | ||
|
@@ -387,7 +352,7 @@ private function callCurl(string $url): string | |
throw new RuntimeException($msgerr); | ||
} | ||
|
||
//force cast to made phpstan happy, but return is always string here | ||
//force cast to make phpstan happy, but return is always string here | ||
return (string)$content; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,12 @@ | ||
<?php | ||
|
||
/** | ||
* --------------------------------------------------------------------- | ||
* GLPI - Gestionnaire Libre de Parc Informatique | ||
* Copyright (C) 2015-2018 Teclib' and contributors. | ||
* | ||
* http://glpi-project.org | ||
* | ||
* based on GLPI - Gestionnaire Libre de Parc Informatique | ||
* Copyright (C) 2003-2014 by the INDEPNET Development Team. | ||
* | ||
* --------------------------------------------------------------------- | ||
* | ||
* LICENSE | ||
* © Teclib' and contributors. | ||
* | ||
* This file is part of GLPI. | ||
* This file is part of GLPI inventory format. | ||
* | ||
* GLPI is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* GLPI is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with GLPI. If not, see <http://www.gnu.org/licenses/>. | ||
* --------------------------------------------------------------------- | ||
* | ||
* PHP version 7 | ||
* | ||
* @category Inventory | ||
* @package Glpi | ||
* @author Johan Cwiklinski <[email protected]> | ||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version | ||
* @link https://glpi-project.org | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Glpi\Inventory\tests\units; | ||
|
@@ -45,12 +16,7 @@ | |
/** | ||
* Tests for hardware file conversions | ||
* | ||
* @category Inventory | ||
* @package GlpiTests | ||
* @author Johan Cwiklinski <[email protected]> | ||
* @copyright 2019 GLPI Team and Contributors | ||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version | ||
* @link https://glpi-project.org | ||
*/ | ||
class FilesToJSON extends TestCase | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,12 @@ | ||
<?php | ||
|
||
/** | ||
* --------------------------------------------------------------------- | ||
* GLPI - Gestionnaire Libre de Parc Informatique | ||
* Copyright (C) 2015-2018 Teclib' and contributors. | ||
* © Teclib' and contributors. | ||
* | ||
* http://glpi-project.org | ||
* This file is part of GLPI inventory format. | ||
* | ||
* based on GLPI - Gestionnaire Libre de Parc Informatique | ||
* Copyright (C) 2003-2014 by the INDEPNET Development Team. | ||
* | ||
* --------------------------------------------------------------------- | ||
* | ||
* LICENSE | ||
* | ||
* This file is part of GLPI. | ||
* | ||
* GLPI is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* GLPI is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with GLPI. If not, see <http://www.gnu.org/licenses/>. | ||
* --------------------------------------------------------------------- | ||
* | ||
* PHP version 7 | ||
* | ||
* @category Tests | ||
* @package Glpi | ||
* | ||
* @author Johan Cwiklinski <[email protected]> | ||
* @copyright 2018 GLPI Team and Contributors | ||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version | ||
* @link https://glpi-project.org | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
require_once __DIR__ . '/../vendor/autoload.php'; | ||
|