Browse Source

minor #2820 MagicConstantCasingFixer - Remove defined check (SpacePossum)

This PR was merged into the 2.3 branch.

Discussion
----------

MagicConstantCasingFixer - Remove defined check

This test is no longer needed on 2.3 and up.

https://3v4l.org/ufX57

Commits
-------

a5e0b33c Remove defined check.
Dariusz Ruminski 7 years ago
parent
commit
b8d39c4cbd
1 changed files with 1 additions and 4 deletions
  1. 1 4
      src/Fixer/Casing/MagicConstantCasingFixer.php

+ 1 - 4
src/Fixer/Casing/MagicConstantCasingFixer.php

@@ -74,11 +74,8 @@ final class MagicConstantCasingFixer extends AbstractFixer
                 T_METHOD_C => '__METHOD__',
                 T_NS_C => '__NAMESPACE__',
                 CT::T_CLASS_CONSTANT => 'class',
+                T_TRAIT_C => '__TRAIT__',
             ];
-
-            if (defined('T_TRAIT_C')) {
-                $magicConstants[T_TRAIT_C] = '__TRAIT__';
-            }
         }
 
         return $magicConstants;