From e6d6968bb432040665f0247de6b6cc7807e5ac65 Mon Sep 17 00:00:00 2001 From: Geert Eltink Date: Sun, 12 Jan 2020 21:08:17 +0100 Subject: [PATCH 1/3] fix: force strict type declaration below file docblock fixes #7 --- src/LaminasCodingStandard/ruleset.xml | 9 ++++++++- test/fixable/2.2.Files.php | 6 +++++- test/fixable/3.DeclareNamespaceAndImport.php | 8 +++++--- test/fixed/2.2.Files.php | 6 ++++++ test/fixed/3.DeclareNamespaceAndImport.php | 4 +++- 5 files changed, 27 insertions(+), 6 deletions(-) diff --git a/src/LaminasCodingStandard/ruleset.xml b/src/LaminasCodingStandard/ruleset.xml index 39f1fa6..a3f1cb4 100644 --- a/src/LaminasCodingStandard/ruleset.xml +++ b/src/LaminasCodingStandard/ruleset.xml @@ -104,7 +104,14 @@ - + + + + + + + + diff --git a/test/fixable/2.2.Files.php b/test/fixable/2.2.Files.php index 0cd0dbc..fbf73b4 100644 --- a/test/fixable/2.2.Files.php +++ b/test/fixable/2.2.Files.php @@ -1,6 +1,10 @@ Date: Sun, 12 Jan 2020 21:21:05 +0100 Subject: [PATCH 2/3] Fix namespace issues --- test/fixable/2.2.Files.php | 2 ++ test/fixable/3.DeclareNamespaceAndImport.php | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/test/fixable/2.2.Files.php b/test/fixable/2.2.Files.php index fbf73b4..3925786 100644 --- a/test/fixable/2.2.Files.php +++ b/test/fixable/2.2.Files.php @@ -1,5 +1,7 @@ Date: Sun, 12 Jan 2020 21:21:24 +0100 Subject: [PATCH 3/3] Update expected report --- test/expected-report.txt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/test/expected-report.txt b/test/expected-report.txt index 3f1c1fb..cade5c8 100644 --- a/test/expected-report.txt +++ b/test/expected-report.txt @@ -3,16 +3,16 @@ PHP CODE SNIFFER REPORT SUMMARY ---------------------------------------------------------------------- FILE ERRORS WARNINGS ---------------------------------------------------------------------- -test/fixable/2.1.BasicCodingStandard.php 59 1 -test/fixable/2.2.Files.php 4 0 +test/fixable/2.1.BasicCodingStandard.php 48 1 +test/fixable/2.2.Files.php 6 0 test/fixable/2.3.Lines.php 35 0 test/fixable/2.4.IndentingAndSpacing.php 46 0 test/fixable/2.5.KeywordsAndTypes.php 13 0 test/fixable/2.6.Variables.php 3 0 test/fixable/2.7.Arrays.php 9 0 -test/fixable/3.DeclareNamespaceAndImport.php 15 0 +test/fixable/3.DeclareNamespaceAndImport.php 11 0 test/fixable/4.1.ExtendsAndImplements.php 5 0 -test/fixable/4.2.UsingTraits.php 5 0 +test/fixable/4.2.UsingTraits.php 4 0 test/fixable/4.3.PropertiesAndConstants.php 5 0 test/fixable/4.4.MethodsAndFunctions.php 26 0 test/fixable/4.5.MethodAndFunctionArguments.php 66 0 @@ -23,7 +23,7 @@ test/fixable/5.1.IfElseifElse.php 15 1 test/fixable/5.2.SwitchCase.php 11 0 test/fixable/5.3.WhileAndDoWhile.php 12 0 test/fixable/5.4.ForStructure.php 7 0 -test/fixable/5.5.ForEachStructure.php 12 0 +test/fixable/5.5.ForEachStructure.php 10 0 test/fixable/5.6.TryCatchFinally.php 9 0 test/fixable/5.ControlStructures.php 4 0 test/fixable/6.1.UnaryOperators.php 6 0 @@ -32,11 +32,11 @@ test/fixable/6.3.TernaryOperators.php 13 0 test/fixable/6.Operators.php 97 0 test/fixable/7.Closures.php 2 0 test/fixable/8.AnonymousClasses.php 1 0 -test/fixable/9.CommentingAndDocBlocks.php 22 0 +test/fixable/9.CommentingAndDocBlocks.php 21 0 ---------------------------------------------------------------------- -A TOTAL OF 584 ERRORS AND 2 WARNINGS WERE FOUND IN 30 FILES +A TOTAL OF 567 ERRORS AND 2 WARNINGS WERE FOUND IN 30 FILES ---------------------------------------------------------------------- -PHPCBF CAN FIX 494 OF THESE SNIFF VIOLATIONS AUTOMATICALLY +PHPCBF CAN FIX 487 OF THESE SNIFF VIOLATIONS AUTOMATICALLY ----------------------------------------------------------------------