diff --git a/CHANGELOG.md b/CHANGELOG.md index 48ea0cd..d686425 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- [#9](https://github.com/green-code-initiative/ecoCode-php/pull/9) Upgrade licence system and licence headers of Java files + ### Deleted ## [1.4.0] - 2023-08-08 diff --git a/pom.xml b/pom.xml index ab3aaac..3bb2e30 100644 --- a/pom.xml +++ b/pom.xml @@ -9,6 +9,7 @@ ecoCode - PHP language Provides rules to reduce the environmental footprint of your PHP programs + 2023 https://github.com/green-code-initiative/ecoCode-php green-code-initiative @@ -251,6 +252,34 @@ + + com.mycila + license-maven-plugin + 4.1 + + + Green Code Initiative + https://www.ecocode.io + + + +
com/mycila/maven/plugin/license/templates/GPL-3.txt
+ + **/*.java + +
+
+
+ + + validate + + check + + validate + + +
diff --git a/src/main/java/fr/greencodeinitiative/php/PHPPlugin.java b/src/main/java/fr/greencodeinitiative/php/PHPPlugin.java index 1a7afec..81d6945 100644 --- a/src/main/java/fr/greencodeinitiative/php/PHPPlugin.java +++ b/src/main/java/fr/greencodeinitiative/php/PHPPlugin.java @@ -1,15 +1,16 @@ /* - * Copyright (C) 2023 Green Code Initiative + * ecoCode - PHP language - Provides rules to reduce the environmental footprint of your PHP programs + * Copyright © 2023 Green Code Initiative (https://www.ecocode.io) * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. + * This program 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 3 of the License, or + * (at your option) any later version. * * This program 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 - * Lesser General Public License for more details. + * 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 this program. If not, see . diff --git a/src/main/java/fr/greencodeinitiative/php/PhpRuleRepository.java b/src/main/java/fr/greencodeinitiative/php/PhpRuleRepository.java index 51a82b4..9a32409 100644 --- a/src/main/java/fr/greencodeinitiative/php/PhpRuleRepository.java +++ b/src/main/java/fr/greencodeinitiative/php/PhpRuleRepository.java @@ -1,15 +1,16 @@ /* - * Copyright (C) 2023 Green Code Initiative + * ecoCode - PHP language - Provides rules to reduce the environmental footprint of your PHP programs + * Copyright © 2023 Green Code Initiative (https://www.ecocode.io) * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. + * This program 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 3 of the License, or + * (at your option) any later version. * * This program 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 - * Lesser General Public License for more details. + * 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 this program. If not, see . diff --git a/src/main/java/fr/greencodeinitiative/php/checks/AvoidDoubleQuoteCheck.java b/src/main/java/fr/greencodeinitiative/php/checks/AvoidDoubleQuoteCheck.java index 67e6a7c..d7674e7 100644 --- a/src/main/java/fr/greencodeinitiative/php/checks/AvoidDoubleQuoteCheck.java +++ b/src/main/java/fr/greencodeinitiative/php/checks/AvoidDoubleQuoteCheck.java @@ -1,3 +1,20 @@ +/* + * ecoCode - PHP language - Provides rules to reduce the environmental footprint of your PHP programs + * Copyright © 2023 Green Code Initiative (https://www.ecocode.io) + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 this program. If not, see . + */ package fr.greencodeinitiative.php.checks; import java.util.ArrayList; diff --git a/src/main/java/fr/greencodeinitiative/php/checks/AvoidFullSQLRequestCheck.java b/src/main/java/fr/greencodeinitiative/php/checks/AvoidFullSQLRequestCheck.java index 61c175d..c09cf5f 100644 --- a/src/main/java/fr/greencodeinitiative/php/checks/AvoidFullSQLRequestCheck.java +++ b/src/main/java/fr/greencodeinitiative/php/checks/AvoidFullSQLRequestCheck.java @@ -1,3 +1,20 @@ +/* + * ecoCode - PHP language - Provides rules to reduce the environmental footprint of your PHP programs + * Copyright © 2023 Green Code Initiative (https://www.ecocode.io) + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 this program. If not, see . + */ package fr.greencodeinitiative.php.checks; import java.util.Arrays; diff --git a/src/main/java/fr/greencodeinitiative/php/checks/AvoidGettingSizeCollectionInLoopCheck.java b/src/main/java/fr/greencodeinitiative/php/checks/AvoidGettingSizeCollectionInLoopCheck.java index de7fd17..b776b47 100644 --- a/src/main/java/fr/greencodeinitiative/php/checks/AvoidGettingSizeCollectionInLoopCheck.java +++ b/src/main/java/fr/greencodeinitiative/php/checks/AvoidGettingSizeCollectionInLoopCheck.java @@ -1,3 +1,20 @@ +/* + * ecoCode - PHP language - Provides rules to reduce the environmental footprint of your PHP programs + * Copyright © 2023 Green Code Initiative (https://www.ecocode.io) + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 this program. If not, see . + */ package fr.greencodeinitiative.php.checks; import org.sonar.check.Rule; diff --git a/src/main/java/fr/greencodeinitiative/php/checks/AvoidMultipleIfElseStatementCheck.java b/src/main/java/fr/greencodeinitiative/php/checks/AvoidMultipleIfElseStatementCheck.java index 5661853..8af8ea5 100644 --- a/src/main/java/fr/greencodeinitiative/php/checks/AvoidMultipleIfElseStatementCheck.java +++ b/src/main/java/fr/greencodeinitiative/php/checks/AvoidMultipleIfElseStatementCheck.java @@ -1,21 +1,19 @@ /* - * SonarQube PHP Custom Rules Example - * Copyright (C) 2016-2016 SonarSource SA - * mailto:contact AT sonarsource DOT com + * ecoCode - PHP language - Provides rules to reduce the environmental footprint of your PHP programs + * Copyright © 2023 Green Code Initiative (https://www.ecocode.io) * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. + * This program 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 3 of the License, or + * (at your option) any later version. * * This program 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 - * Lesser General Public License for more details. + * 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 Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package fr.greencodeinitiative.php.checks; diff --git a/src/main/java/fr/greencodeinitiative/php/checks/AvoidSQLRequestInLoopCheck.java b/src/main/java/fr/greencodeinitiative/php/checks/AvoidSQLRequestInLoopCheck.java index 0badb8c..6cbfe1b 100644 --- a/src/main/java/fr/greencodeinitiative/php/checks/AvoidSQLRequestInLoopCheck.java +++ b/src/main/java/fr/greencodeinitiative/php/checks/AvoidSQLRequestInLoopCheck.java @@ -1,3 +1,20 @@ +/* + * ecoCode - PHP language - Provides rules to reduce the environmental footprint of your PHP programs + * Copyright © 2023 Green Code Initiative (https://www.ecocode.io) + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 this program. If not, see . + */ package fr.greencodeinitiative.php.checks; import java.util.Arrays; diff --git a/src/main/java/fr/greencodeinitiative/php/checks/AvoidTryCatchFinallyCheck_NOK_failsAllTryStatements.java b/src/main/java/fr/greencodeinitiative/php/checks/AvoidTryCatchFinallyCheck_NOK_failsAllTryStatements.java index 6aa9943..6cf0490 100644 --- a/src/main/java/fr/greencodeinitiative/php/checks/AvoidTryCatchFinallyCheck_NOK_failsAllTryStatements.java +++ b/src/main/java/fr/greencodeinitiative/php/checks/AvoidTryCatchFinallyCheck_NOK_failsAllTryStatements.java @@ -1,3 +1,20 @@ +/* + * ecoCode - PHP language - Provides rules to reduce the environmental footprint of your PHP programs + * Copyright © 2023 Green Code Initiative (https://www.ecocode.io) + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 this program. If not, see . + */ package fr.greencodeinitiative.php.checks; import java.util.Collections; diff --git a/src/main/java/fr/greencodeinitiative/php/checks/AvoidUsingGlobalVariablesCheck.java b/src/main/java/fr/greencodeinitiative/php/checks/AvoidUsingGlobalVariablesCheck.java index 1b37a96..8ddf657 100644 --- a/src/main/java/fr/greencodeinitiative/php/checks/AvoidUsingGlobalVariablesCheck.java +++ b/src/main/java/fr/greencodeinitiative/php/checks/AvoidUsingGlobalVariablesCheck.java @@ -1,3 +1,20 @@ +/* + * ecoCode - PHP language - Provides rules to reduce the environmental footprint of your PHP programs + * Copyright © 2023 Green Code Initiative (https://www.ecocode.io) + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 this program. If not, see . + */ package fr.greencodeinitiative.php.checks; import java.util.regex.Pattern; diff --git a/src/main/java/fr/greencodeinitiative/php/checks/IncrementCheck.java b/src/main/java/fr/greencodeinitiative/php/checks/IncrementCheck.java index 904cd40..85efefe 100644 --- a/src/main/java/fr/greencodeinitiative/php/checks/IncrementCheck.java +++ b/src/main/java/fr/greencodeinitiative/php/checks/IncrementCheck.java @@ -1,3 +1,20 @@ +/* + * ecoCode - PHP language - Provides rules to reduce the environmental footprint of your PHP programs + * Copyright © 2023 Green Code Initiative (https://www.ecocode.io) + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 this program. If not, see . + */ package fr.greencodeinitiative.php.checks; import java.util.Collections; diff --git a/src/main/java/fr/greencodeinitiative/php/checks/NoFunctionCallWhenDeclaringForLoop.java b/src/main/java/fr/greencodeinitiative/php/checks/NoFunctionCallWhenDeclaringForLoop.java index 999d0cf..de9889b 100644 --- a/src/main/java/fr/greencodeinitiative/php/checks/NoFunctionCallWhenDeclaringForLoop.java +++ b/src/main/java/fr/greencodeinitiative/php/checks/NoFunctionCallWhenDeclaringForLoop.java @@ -1,3 +1,20 @@ +/* + * ecoCode - PHP language - Provides rules to reduce the environmental footprint of your PHP programs + * Copyright © 2023 Green Code Initiative (https://www.ecocode.io) + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 this program. If not, see . + */ package fr.greencodeinitiative.php.checks; import java.util.Collections; diff --git a/src/main/java/fr/greencodeinitiative/php/checks/UseOfMethodsForBasicOperations.java b/src/main/java/fr/greencodeinitiative/php/checks/UseOfMethodsForBasicOperations.java index 1285fb4..23223f5 100644 --- a/src/main/java/fr/greencodeinitiative/php/checks/UseOfMethodsForBasicOperations.java +++ b/src/main/java/fr/greencodeinitiative/php/checks/UseOfMethodsForBasicOperations.java @@ -1,3 +1,20 @@ +/* + * ecoCode - PHP language - Provides rules to reduce the environmental footprint of your PHP programs + * Copyright © 2023 Green Code Initiative (https://www.ecocode.io) + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 this program. If not, see . + */ package fr.greencodeinitiative.php.checks; import java.util.ArrayList; diff --git a/src/test/java/fr/greencodeinitiative/php/PhpPluginTest.java b/src/test/java/fr/greencodeinitiative/php/PhpPluginTest.java index 9139c7c..7f25c2a 100644 --- a/src/test/java/fr/greencodeinitiative/php/PhpPluginTest.java +++ b/src/test/java/fr/greencodeinitiative/php/PhpPluginTest.java @@ -1,15 +1,16 @@ /* - * Copyright (C) 2023 Green Code Initiative + * ecoCode - PHP language - Provides rules to reduce the environmental footprint of your PHP programs + * Copyright © 2023 Green Code Initiative (https://www.ecocode.io) * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. + * This program 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 3 of the License, or + * (at your option) any later version. * * This program 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 - * Lesser General Public License for more details. + * 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 this program. If not, see . diff --git a/src/test/java/fr/greencodeinitiative/php/PhpRuleRepositoryTest.java b/src/test/java/fr/greencodeinitiative/php/PhpRuleRepositoryTest.java index e64c7e5..c6a2ffb 100644 --- a/src/test/java/fr/greencodeinitiative/php/PhpRuleRepositoryTest.java +++ b/src/test/java/fr/greencodeinitiative/php/PhpRuleRepositoryTest.java @@ -1,15 +1,16 @@ /* - * Copyright (C) 2023 Green Code Initiative + * ecoCode - PHP language - Provides rules to reduce the environmental footprint of your PHP programs + * Copyright © 2023 Green Code Initiative (https://www.ecocode.io) * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. + * This program 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 3 of the License, or + * (at your option) any later version. * * This program 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 - * Lesser General Public License for more details. + * 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 this program. If not, see . diff --git a/src/test/java/fr/greencodeinitiative/php/checks/AvoidDoubleQuoteCheckTest.java b/src/test/java/fr/greencodeinitiative/php/checks/AvoidDoubleQuoteCheckTest.java index 9a68f8a..1c20056 100644 --- a/src/test/java/fr/greencodeinitiative/php/checks/AvoidDoubleQuoteCheckTest.java +++ b/src/test/java/fr/greencodeinitiative/php/checks/AvoidDoubleQuoteCheckTest.java @@ -1,3 +1,20 @@ +/* + * ecoCode - PHP language - Provides rules to reduce the environmental footprint of your PHP programs + * Copyright © 2023 Green Code Initiative (https://www.ecocode.io) + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 this program. If not, see . + */ package fr.greencodeinitiative.php.checks; import java.io.File; diff --git a/src/test/java/fr/greencodeinitiative/php/checks/AvoidFullSQLRequestCheckTest.java b/src/test/java/fr/greencodeinitiative/php/checks/AvoidFullSQLRequestCheckTest.java index de90bec..52ed025 100644 --- a/src/test/java/fr/greencodeinitiative/php/checks/AvoidFullSQLRequestCheckTest.java +++ b/src/test/java/fr/greencodeinitiative/php/checks/AvoidFullSQLRequestCheckTest.java @@ -1,3 +1,20 @@ +/* + * ecoCode - PHP language - Provides rules to reduce the environmental footprint of your PHP programs + * Copyright © 2023 Green Code Initiative (https://www.ecocode.io) + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 this program. If not, see . + */ package fr.greencodeinitiative.php.checks; import java.io.File; diff --git a/src/test/java/fr/greencodeinitiative/php/checks/AvoidGettingSizeCollectionInLoopTest.java b/src/test/java/fr/greencodeinitiative/php/checks/AvoidGettingSizeCollectionInLoopTest.java index 85de2bd..29ee090 100644 --- a/src/test/java/fr/greencodeinitiative/php/checks/AvoidGettingSizeCollectionInLoopTest.java +++ b/src/test/java/fr/greencodeinitiative/php/checks/AvoidGettingSizeCollectionInLoopTest.java @@ -1,3 +1,20 @@ +/* + * ecoCode - PHP language - Provides rules to reduce the environmental footprint of your PHP programs + * Copyright © 2023 Green Code Initiative (https://www.ecocode.io) + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 this program. If not, see . + */ package fr.greencodeinitiative.php.checks; import org.junit.Test; diff --git a/src/test/java/fr/greencodeinitiative/php/checks/AvoidMultipleIfElseStatementCheckTest.java b/src/test/java/fr/greencodeinitiative/php/checks/AvoidMultipleIfElseStatementCheckTest.java index 50b6bfb..62228a3 100644 --- a/src/test/java/fr/greencodeinitiative/php/checks/AvoidMultipleIfElseStatementCheckTest.java +++ b/src/test/java/fr/greencodeinitiative/php/checks/AvoidMultipleIfElseStatementCheckTest.java @@ -1,21 +1,19 @@ /* - * SonarQube PHP Custom Rules Example - * Copyright (C) 2016-2016 SonarSource SA - * mailto:contact AT sonarsource DOT com + * ecoCode - PHP language - Provides rules to reduce the environmental footprint of your PHP programs + * Copyright © 2023 Green Code Initiative (https://www.ecocode.io) * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. + * This program 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 3 of the License, or + * (at your option) any later version. * * This program 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 - * Lesser General Public License for more details. + * 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 Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ package fr.greencodeinitiative.php.checks; diff --git a/src/test/java/fr/greencodeinitiative/php/checks/AvoidSQLRequestInLoopCheckTest.java b/src/test/java/fr/greencodeinitiative/php/checks/AvoidSQLRequestInLoopCheckTest.java index e124b85..7d8b22e 100644 --- a/src/test/java/fr/greencodeinitiative/php/checks/AvoidSQLRequestInLoopCheckTest.java +++ b/src/test/java/fr/greencodeinitiative/php/checks/AvoidSQLRequestInLoopCheckTest.java @@ -1,3 +1,20 @@ +/* + * ecoCode - PHP language - Provides rules to reduce the environmental footprint of your PHP programs + * Copyright © 2023 Green Code Initiative (https://www.ecocode.io) + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 this program. If not, see . + */ package fr.greencodeinitiative.php.checks; import java.io.File; diff --git a/src/test/java/fr/greencodeinitiative/php/checks/AvoidTryCatchFinallyCheckNOKfailsAllTryStatementsTest.java b/src/test/java/fr/greencodeinitiative/php/checks/AvoidTryCatchFinallyCheckNOKfailsAllTryStatementsTest.java index d9867e9..f4d2bb0 100644 --- a/src/test/java/fr/greencodeinitiative/php/checks/AvoidTryCatchFinallyCheckNOKfailsAllTryStatementsTest.java +++ b/src/test/java/fr/greencodeinitiative/php/checks/AvoidTryCatchFinallyCheckNOKfailsAllTryStatementsTest.java @@ -1,3 +1,20 @@ +/* + * ecoCode - PHP language - Provides rules to reduce the environmental footprint of your PHP programs + * Copyright © 2023 Green Code Initiative (https://www.ecocode.io) + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 this program. If not, see . + */ package fr.greencodeinitiative.php.checks; import java.io.File; diff --git a/src/test/java/fr/greencodeinitiative/php/checks/AvoidUsingGlobalVariablesCheckTest.java b/src/test/java/fr/greencodeinitiative/php/checks/AvoidUsingGlobalVariablesCheckTest.java index ca02561..b9ed4a6 100644 --- a/src/test/java/fr/greencodeinitiative/php/checks/AvoidUsingGlobalVariablesCheckTest.java +++ b/src/test/java/fr/greencodeinitiative/php/checks/AvoidUsingGlobalVariablesCheckTest.java @@ -1,3 +1,20 @@ +/* + * ecoCode - PHP language - Provides rules to reduce the environmental footprint of your PHP programs + * Copyright © 2023 Green Code Initiative (https://www.ecocode.io) + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 this program. If not, see . + */ package fr.greencodeinitiative.php.checks; import org.junit.Test; diff --git a/src/test/java/fr/greencodeinitiative/php/checks/IncrementCheckTest.java b/src/test/java/fr/greencodeinitiative/php/checks/IncrementCheckTest.java index 7da3216..df03d9b 100644 --- a/src/test/java/fr/greencodeinitiative/php/checks/IncrementCheckTest.java +++ b/src/test/java/fr/greencodeinitiative/php/checks/IncrementCheckTest.java @@ -1,3 +1,20 @@ +/* + * ecoCode - PHP language - Provides rules to reduce the environmental footprint of your PHP programs + * Copyright © 2023 Green Code Initiative (https://www.ecocode.io) + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 this program. If not, see . + */ package fr.greencodeinitiative.php.checks; import java.io.File; diff --git a/src/test/java/fr/greencodeinitiative/php/checks/NoFunctionCallWhenDeclaringForLoopTest.java b/src/test/java/fr/greencodeinitiative/php/checks/NoFunctionCallWhenDeclaringForLoopTest.java index 2d18b06..0ee0bf9 100644 --- a/src/test/java/fr/greencodeinitiative/php/checks/NoFunctionCallWhenDeclaringForLoopTest.java +++ b/src/test/java/fr/greencodeinitiative/php/checks/NoFunctionCallWhenDeclaringForLoopTest.java @@ -1,3 +1,20 @@ +/* + * ecoCode - PHP language - Provides rules to reduce the environmental footprint of your PHP programs + * Copyright © 2023 Green Code Initiative (https://www.ecocode.io) + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 this program. If not, see . + */ package fr.greencodeinitiative.php.checks; import java.io.File; diff --git a/src/test/java/fr/greencodeinitiative/php/checks/UseOfMethodsForBasicOperationsTest.java b/src/test/java/fr/greencodeinitiative/php/checks/UseOfMethodsForBasicOperationsTest.java index 1627d94..dfe17a9 100644 --- a/src/test/java/fr/greencodeinitiative/php/checks/UseOfMethodsForBasicOperationsTest.java +++ b/src/test/java/fr/greencodeinitiative/php/checks/UseOfMethodsForBasicOperationsTest.java @@ -1,3 +1,20 @@ +/* + * ecoCode - PHP language - Provides rules to reduce the environmental footprint of your PHP programs + * Copyright © 2023 Green Code Initiative (https://www.ecocode.io) + * + * This program 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 3 of the License, or + * (at your option) any later version. + * + * This program 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 this program. If not, see . + */ package fr.greencodeinitiative.php.checks; import java.io.File;