Completed
Pull Request — develop (#1492)
by
unknown
16:55 queued 12s
created
php_codesniffer/src/Standards/Generic/Sniffs/Metrics/NestingLevelSniff.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -13,8 +13,7 @@  discard block
 block discarded – undo
13 13
 use PHP_CodeSniffer\Sniffs\Sniff;
14 14
 use PHP_CodeSniffer\Files\File;
15 15
 
16
-class NestingLevelSniff implements Sniff
17
-{
16
+class NestingLevelSniff implements Sniff {
18 17
 
19 18
     /**
20 19
      * A nesting level higher than this value will throw a warning.
@@ -36,8 +35,7 @@  discard block
 block discarded – undo
36 35
      *
37 36
      * @return array
38 37
      */
39
-    public function register()
40
-    {
38
+    public function register() {
41 39
         return [T_FUNCTION];
42 40
 
43 41
     }//end register()
@@ -52,8 +50,7 @@  discard block
 block discarded – undo
52 50
      *
53 51
      * @return void
54 52
      */
55
-    public function process(File $phpcsFile, $stackPtr)
56
-    {
53
+    public function process(File $phpcsFile, $stackPtr) {
57 54
         $tokens = $phpcsFile->getTokens();
58 55
 
59 56
         // Ignore abstract methods.
Please login to merge, or discard this patch.
src/Standards/Generic/Sniffs/Metrics/CyclomaticComplexitySniff.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -17,8 +17,7 @@  discard block
 block discarded – undo
17 17
 use PHP_CodeSniffer\Sniffs\Sniff;
18 18
 use PHP_CodeSniffer\Files\File;
19 19
 
20
-class CyclomaticComplexitySniff implements Sniff
21
-{
20
+class CyclomaticComplexitySniff implements Sniff {
22 21
 
23 22
     /**
24 23
      * A complexity higher than this value will throw a warning.
@@ -40,8 +39,7 @@  discard block
 block discarded – undo
40 39
      *
41 40
      * @return array
42 41
      */
43
-    public function register()
44
-    {
42
+    public function register() {
45 43
         return [T_FUNCTION];
46 44
 
47 45
     }//end register()
@@ -56,8 +54,7 @@  discard block
 block discarded – undo
56 54
      *
57 55
      * @return void
58 56
      */
59
-    public function process(File $phpcsFile, $stackPtr)
60
-    {
57
+    public function process(File $phpcsFile, $stackPtr) {
61 58
         $tokens = $phpcsFile->getTokens();
62 59
 
63 60
         // Ignore abstract methods.
Please login to merge, or discard this patch.
php_codesniffer/src/Standards/Generic/Sniffs/Commenting/DocCommentSniff.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -12,8 +12,7 @@  discard block
 block discarded – undo
12 12
 use PHP_CodeSniffer\Sniffs\Sniff;
13 13
 use PHP_CodeSniffer\Files\File;
14 14
 
15
-class DocCommentSniff implements Sniff
16
-{
15
+class DocCommentSniff implements Sniff {
17 16
 
18 17
     /**
19 18
      * A list of tokenizers this sniff supports.
@@ -31,8 +30,7 @@  discard block
 block discarded – undo
31 30
      *
32 31
      * @return array
33 32
      */
34
-    public function register()
35
-    {
33
+    public function register() {
36 34
         return [T_DOC_COMMENT_OPEN_TAG];
37 35
 
38 36
     }//end register()
@@ -47,8 +45,7 @@  discard block
 block discarded – undo
47 45
      *
48 46
      * @return void
49 47
      */
50
-    public function process(File $phpcsFile, $stackPtr)
51
-    {
48
+    public function process(File $phpcsFile, $stackPtr) {
52 49
         $tokens = $phpcsFile->getTokens();
53 50
 
54 51
         if (isset($tokens[$stackPtr]['comment_closer']) === false
Please login to merge, or discard this patch.
php_codesniffer/src/Standards/Generic/Sniffs/Commenting/FixmeSniff.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -14,8 +14,7 @@  discard block
 block discarded – undo
14 14
 use PHP_CodeSniffer\Files\File;
15 15
 use PHP_CodeSniffer\Util\Tokens;
16 16
 
17
-class FixmeSniff implements Sniff
18
-{
17
+class FixmeSniff implements Sniff {
19 18
 
20 19
     /**
21 20
      * A list of tokenizers this sniff supports.
@@ -33,8 +32,7 @@  discard block
 block discarded – undo
33 32
      *
34 33
      * @return array
35 34
      */
36
-    public function register()
37
-    {
35
+    public function register() {
38 36
         return array_diff(Tokens::$commentTokens, Tokens::$phpcsCommentTokens);
39 37
 
40 38
     }//end register()
@@ -49,8 +47,7 @@  discard block
 block discarded – undo
49 47
      *
50 48
      * @return void
51 49
      */
52
-    public function process(File $phpcsFile, $stackPtr)
53
-    {
50
+    public function process(File $phpcsFile, $stackPtr) {
54 51
         $tokens = $phpcsFile->getTokens();
55 52
 
56 53
         $content = $tokens[$stackPtr]['content'];
Please login to merge, or discard this patch.
php_codesniffer/src/Standards/Generic/Sniffs/Commenting/TodoSniff.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -13,8 +13,7 @@  discard block
 block discarded – undo
13 13
 use PHP_CodeSniffer\Files\File;
14 14
 use PHP_CodeSniffer\Util\Tokens;
15 15
 
16
-class TodoSniff implements Sniff
17
-{
16
+class TodoSniff implements Sniff {
18 17
 
19 18
     /**
20 19
      * A list of tokenizers this sniff supports.
@@ -32,8 +31,7 @@  discard block
 block discarded – undo
32 31
      *
33 32
      * @return array
34 33
      */
35
-    public function register()
36
-    {
34
+    public function register() {
37 35
         return array_diff(Tokens::$commentTokens, Tokens::$phpcsCommentTokens);
38 36
 
39 37
     }//end register()
@@ -48,8 +46,7 @@  discard block
 block discarded – undo
48 46
      *
49 47
      * @return void
50 48
      */
51
-    public function process(File $phpcsFile, $stackPtr)
52
-    {
49
+    public function process(File $phpcsFile, $stackPtr) {
53 50
         $tokens = $phpcsFile->getTokens();
54 51
 
55 52
         $content = $tokens[$stackPtr]['content'];
Please login to merge, or discard this patch.
Standards/Generic/Sniffs/ControlStructures/InlineControlStructureSniff.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -13,8 +13,7 @@  discard block
 block discarded – undo
13 13
 use PHP_CodeSniffer\Files\File;
14 14
 use PHP_CodeSniffer\Util\Tokens;
15 15
 
16
-class InlineControlStructureSniff implements Sniff
17
-{
16
+class InlineControlStructureSniff implements Sniff {
18 17
 
19 18
     /**
20 19
      * A list of tokenizers this sniff supports.
@@ -39,8 +38,7 @@  discard block
 block discarded – undo
39 38
      *
40 39
      * @return array
41 40
      */
42
-    public function register()
43
-    {
41
+    public function register() {
44 42
         return [
45 43
             T_IF,
46 44
             T_ELSE,
@@ -64,8 +62,7 @@  discard block
 block discarded – undo
64 62
      *
65 63
      * @return void
66 64
      */
67
-    public function process(File $phpcsFile, $stackPtr)
68
-    {
65
+    public function process(File $phpcsFile, $stackPtr) {
69 66
         $tokens = $phpcsFile->getTokens();
70 67
 
71 68
         if (isset($tokens[$stackPtr]['scope_opener']) === true) {
Please login to merge, or discard this patch.
src/Standards/Generic/Sniffs/NamingConventions/ConstructorNameSniff.php 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -16,8 +16,7 @@  discard block
 block discarded – undo
16 16
 use PHP_CodeSniffer\Sniffs\AbstractScopeSniff;
17 17
 use PHP_CodeSniffer\Files\File;
18 18
 
19
-class ConstructorNameSniff extends AbstractScopeSniff
20
-{
19
+class ConstructorNameSniff extends AbstractScopeSniff {
21 20
 
22 21
     /**
23 22
      * The name of the class we are currently checking.
@@ -37,8 +36,7 @@  discard block
 block discarded – undo
37 36
     /**
38 37
      * Constructs the test with the tokens it wishes to listen for.
39 38
      */
40
-    public function __construct()
41
-    {
39
+    public function __construct() {
42 40
         parent::__construct([T_CLASS, T_ANON_CLASS, T_INTERFACE], [T_FUNCTION], true);
43 41
 
44 42
     }//end __construct()
@@ -54,8 +52,7 @@  discard block
 block discarded – undo
54 52
      *
55 53
      * @return void
56 54
      */
57
-    protected function processTokenWithinScope(File $phpcsFile, $stackPtr, $currScope)
58
-    {
55
+    protected function processTokenWithinScope(File $phpcsFile, $stackPtr, $currScope) {
59 56
         $tokens = $phpcsFile->getTokens();
60 57
 
61 58
         // Determine if this is a function which needs to be examined.
@@ -120,8 +117,7 @@  discard block
 block discarded – undo
120 117
      *
121 118
      * @return void
122 119
      */
123
-    protected function processTokenOutsideScope(File $phpcsFile, $stackPtr)
124
-    {
120
+    protected function processTokenOutsideScope(File $phpcsFile, $stackPtr) {
125 121
 
126 122
     }//end processTokenOutsideScope()
127 123
 
@@ -134,8 +130,7 @@  discard block
 block discarded – undo
134 130
      *
135 131
      * @return void
136 132
      */
137
-    protected function loadFunctionNamesInScope(File $phpcsFile, $currScope)
138
-    {
133
+    protected function loadFunctionNamesInScope(File $phpcsFile, $currScope) {
139 134
         $this->functionList = [];
140 135
         $tokens = $phpcsFile->getTokens();
141 136
 
Please login to merge, or discard this patch.
Standards/Generic/Sniffs/NamingConventions/UpperCaseConstantNameSniff.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -13,8 +13,7 @@  discard block
 block discarded – undo
13 13
 use PHP_CodeSniffer\Files\File;
14 14
 use PHP_CodeSniffer\Util\Tokens;
15 15
 
16
-class UpperCaseConstantNameSniff implements Sniff
17
-{
16
+class UpperCaseConstantNameSniff implements Sniff {
18 17
 
19 18
 
20 19
     /**
@@ -22,8 +21,7 @@  discard block
 block discarded – undo
22 21
      *
23 22
      * @return array
24 23
      */
25
-    public function register()
26
-    {
24
+    public function register() {
27 25
         return [
28 26
             T_STRING,
29 27
             T_CONST,
@@ -41,8 +39,7 @@  discard block
 block discarded – undo
41 39
      *
42 40
      * @return void
43 41
      */
44
-    public function process(File $phpcsFile, $stackPtr)
45
-    {
42
+    public function process(File $phpcsFile, $stackPtr) {
46 43
         $tokens = $phpcsFile->getTokens();
47 44
 
48 45
         if ($tokens[$stackPtr]['code'] === T_CONST) {
Please login to merge, or discard this patch.
Standards/Generic/Sniffs/NamingConventions/CamelCapsFunctionNameSniff.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -14,8 +14,7 @@  discard block
 block discarded – undo
14 14
 use PHP_CodeSniffer\Util\Tokens;
15 15
 use PHP_CodeSniffer\Files\File;
16 16
 
17
-class CamelCapsFunctionNameSniff extends AbstractScopeSniff
18
-{
17
+class CamelCapsFunctionNameSniff extends AbstractScopeSniff {
19 18
 
20 19
     /**
21 20
      * A list of all PHP magic methods.
@@ -80,8 +79,7 @@  discard block
 block discarded – undo
80 79
     /**
81 80
      * Constructs a Generic_Sniffs_NamingConventions_CamelCapsFunctionNameSniff.
82 81
      */
83
-    public function __construct()
84
-    {
82
+    public function __construct() {
85 83
         parent::__construct(Tokens::$ooScopeTokens, [T_FUNCTION], true);
86 84
 
87 85
     }//end __construct()
@@ -97,8 +95,7 @@  discard block
 block discarded – undo
97 95
      *
98 96
      * @return void
99 97
      */
100
-    protected function processTokenWithinScope(File $phpcsFile, $stackPtr, $currScope)
101
-    {
98
+    protected function processTokenWithinScope(File $phpcsFile, $stackPtr, $currScope) {
102 99
         $tokens = $phpcsFile->getTokens();
103 100
 
104 101
         // Determine if this is a function which needs to be examined.
@@ -183,8 +180,7 @@  discard block
 block discarded – undo
183 180
      *
184 181
      * @return void
185 182
      */
186
-    protected function processTokenOutsideScope(File $phpcsFile, $stackPtr)
187
-    {
183
+    protected function processTokenOutsideScope(File $phpcsFile, $stackPtr) {
188 184
         $functionName = $phpcsFile->getDeclarationName($stackPtr);
189 185
         if ($functionName === null) {
190 186
             // Ignore closures.
Please login to merge, or discard this patch.