@@ -42,8 +42,33 @@ index 71be9a5..f9492c7 100644
4242 // @see https://github.com/php/php-src/blob/PHP-7.4/Zend/zend_compile.c "zend_try_compile_special_func"
4343 'array_key_exists' => true,
4444 'array_slice' => true,
45+ diff --git a/src/Unleashed/Sniffs/PHP/ForbiddenClassesSniff.php b/src/Unleashed/Sniffs/PHP/ForbiddenClassesSniff.php
46+ index 80a42a6..dd2fcb7 100644
47+ --- a/src/Unleashed/Sniffs/PHP/ForbiddenClassesSniff.php
48+ +++ b/src/Unleashed/Sniffs/PHP/ForbiddenClassesSniff.php
49+ @@ -19,7 +19,7 @@ final class ForbiddenClassesSniff implements Sniff
50+ *
51+ * @var string[]
52+ */
53+ - public $forbiddenClasses = [
54+ + public array $forbiddenClasses = [
55+ // phpcs:disable Unleashed.PHP.ForbiddenClasses.Forbidden
56+ \DateTime::class,
57+ // phpcs:enable
58+ @@ -27,10 +27,8 @@ final class ForbiddenClassesSniff implements Sniff
59+
60+ /**
61+ * If true, an error will be thrown; otherwise a warning
62+ - *
63+ - * @var bool
64+ */
65+ - public $error = true;
66+ + public bool $error = true;
67+
68+ /**
69+ * Returns an array of tokens this test wants to listen for.
4570diff --git a/tests/expected_report.txt b/tests/expected_report.txt
46- index c07423b..9b0ebf0 100644
71+ index cc0cd5a..c3ebeb0 100644
4772--- a/tests/expected_report.txt
4873+++ b/tests/expected_report.txt
4974@@ -11,11 +11,11 @@ tests/input/concatenation_spacing.php 49 0
@@ -59,8 +84,8 @@ index c07423b..9b0ebf0 100644
5984+ tests/input/example-class.php 41 0
6085 tests/input/forbidden-comments.php 14 0
6186 tests/input/forbidden-functions.php 13 0
62- tests/input/fully-qualified-and-fallbacks .php 1 0
63- @@ -40 ,16 +40 ,16 @@ tests/input/strict-functions.php 4 0
87+ tests/input/ForbiddenClasses .php 7 0
88+ @@ -41 ,16 +41 ,16 @@ tests/input/strict-functions.php 4 0
6489 tests/input/test-case.php 7 0
6590 tests/input/trailing_comma_on_array.php 1 0
6691 tests/input/traits-uses.php 12 0
@@ -72,8 +97,8 @@ index c07423b..9b0ebf0 100644
7297 tests/input/useless-semicolon.php 2 0
7398 tests/input/UselessConditions.php 23 0
7499 ----------------------------------------------------------------------
75- - A TOTAL OF 411 ERRORS AND 8 WARNINGS WERE FOUND IN 43 FILES
76- + A TOTAL OF 416 ERRORS AND 8 WARNINGS WERE FOUND IN 43 FILES
100+ - A TOTAL OF 418 ERRORS AND 8 WARNINGS WERE FOUND IN 44 FILES
101+ + A TOTAL OF 423 ERRORS AND 8 WARNINGS WERE FOUND IN 44 FILES
77102 ----------------------------------------------------------------------
78103- PHPCBF CAN FIX 334 OF THESE SNIFF VIOLATIONS AUTOMATICALLY
79104+ PHPCBF CAN FIX 339 OF THESE SNIFF VIOLATIONS AUTOMATICALLY
0 commit comments