Completed
Pull Request — develop (#1492)
by Zack
28:58 queued 09:00
created
src/Standards/Generic/Sniffs/Arrays/DisallowLongArraySyntaxSniff.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 DisallowLongArraySyntaxSniff implements Sniff
16
-{
15
+class DisallowLongArraySyntaxSniff implements Sniff {
17 16
 
18 17
 
19 18
     /**
@@ -21,8 +20,7 @@  discard block
 block discarded – undo
21 20
      *
22 21
      * @return int[]
23 22
      */
24
-    public function register()
25
-    {
23
+    public function register() {
26 24
         return [T_ARRAY];
27 25
 
28 26
     }//end register()
@@ -37,8 +35,7 @@  discard block
 block discarded – undo
37 35
      *
38 36
      * @return void
39 37
      */
40
-    public function process(File $phpcsFile, $stackPtr)
41
-    {
38
+    public function process(File $phpcsFile, $stackPtr) {
42 39
         $tokens = $phpcsFile->getTokens();
43 40
 
44 41
         $phpcsFile->recordMetric($stackPtr, 'Short array syntax used', 'no');
Please login to merge, or discard this patch.
php_codesniffer/src/Standards/Generic/Sniffs/Arrays/ArrayIndentSniff.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\AbstractArraySniff;
13 13
 use PHP_CodeSniffer\Util\Tokens;
14 14
 
15
-class ArrayIndentSniff extends AbstractArraySniff
16
-{
15
+class ArrayIndentSniff extends AbstractArraySniff {
17 16
 
18 17
     /**
19 18
      * The number of spaces each array key should be indented.
@@ -36,8 +35,7 @@  discard block
 block discarded – undo
36 35
      *
37 36
      * @return void
38 37
      */
39
-    public function processSingleLineArray($phpcsFile, $stackPtr, $arrayStart, $arrayEnd, $indices)
40
-    {
38
+    public function processSingleLineArray($phpcsFile, $stackPtr, $arrayStart, $arrayEnd, $indices) {
41 39
 
42 40
     }//end processSingleLineArray()
43 41
 
@@ -55,8 +53,7 @@  discard block
 block discarded – undo
55 53
      *
56 54
      * @return void
57 55
      */
58
-    public function processMultiLineArray($phpcsFile, $stackPtr, $arrayStart, $arrayEnd, $indices)
59
-    {
56
+    public function processMultiLineArray($phpcsFile, $stackPtr, $arrayStart, $arrayEnd, $indices) {
60 57
         $tokens = $phpcsFile->getTokens();
61 58
 
62 59
         $first          = $phpcsFile->findFirstOnLine(T_WHITESPACE, $stackPtr, true);
Please login to merge, or discard this patch.
Standards/Generic/Sniffs/Functions/OpeningFunctionBraceBsdAllmanSniff.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 OpeningFunctionBraceBsdAllmanSniff implements Sniff
17
-{
16
+class OpeningFunctionBraceBsdAllmanSniff implements Sniff {
18 17
 
19 18
     /**
20 19
      * Should this sniff check function braces?
@@ -36,8 +35,7 @@  discard block
 block discarded – undo
36 35
      *
37 36
      * @return int[]
38 37
      */
39
-    public function register()
40
-    {
38
+    public function register() {
41 39
         return [
42 40
             T_FUNCTION,
43 41
             T_CLOSURE,
@@ -55,8 +53,7 @@  discard block
 block discarded – undo
55 53
      *
56 54
      * @return void
57 55
      */
58
-    public function process(File $phpcsFile, $stackPtr)
59
-    {
56
+    public function process(File $phpcsFile, $stackPtr) {
60 57
         $tokens = $phpcsFile->getTokens();
61 58
 
62 59
         if (isset($tokens[$stackPtr]['scope_opener']) === false) {
Please login to merge, or discard this patch.
Generic/Sniffs/Functions/OpeningFunctionBraceKernighanRitchieSniff.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 OpeningFunctionBraceKernighanRitchieSniff implements Sniff
17
-{
16
+class OpeningFunctionBraceKernighanRitchieSniff implements Sniff {
18 17
 
19 18
 
20 19
     /**
@@ -37,8 +36,7 @@  discard block
 block discarded – undo
37 36
      *
38 37
      * @return void
39 38
      */
40
-    public function register()
41
-    {
39
+    public function register() {
42 40
         return [
43 41
             T_FUNCTION,
44 42
             T_CLOSURE,
@@ -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
         if (isset($tokens[$stackPtr]['scope_opener']) === false) {
Please login to merge, or discard this patch.
src/Standards/Generic/Sniffs/Functions/FunctionCallArgumentSpacingSniff.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 FunctionCallArgumentSpacingSniff implements Sniff
17
-{
16
+class FunctionCallArgumentSpacingSniff 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_ISSET,
@@ -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
         // Skip tokens that are the names of functions or classes
Please login to merge, or discard this patch.
src/Standards/Generic/Sniffs/Functions/CallTimePassByReferenceSniff.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 CallTimePassByReferenceSniff implements Sniff
17
-{
16
+class CallTimePassByReferenceSniff 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_VARIABLE,
@@ -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
         $findTokens   = Tokens::$emptyTokens;
Please login to merge, or discard this patch.
php_codesniffer/src/Standards/Zend/Tests/Files/ClosingTagUnitTest.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -11,8 +11,7 @@  discard block
 block discarded – undo
11 11
 
12 12
 use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest;
13 13
 
14
-class ClosingTagUnitTest extends AbstractSniffUnitTest
15
-{
14
+class ClosingTagUnitTest extends AbstractSniffUnitTest {
16 15
 
17 16
 
18 17
     /**
@@ -25,8 +24,7 @@  discard block
 block discarded – undo
25 24
      *
26 25
      * @return array<int, int>
27 26
      */
28
-    public function getErrorList($testFile='')
29
-    {
27
+    public function getErrorList($testFile='') {
30 28
         switch ($testFile) {
31 29
         case 'ClosingTagUnitTest.1.inc':
32 30
             return [11 => 1];
@@ -55,8 +53,7 @@  discard block
 block discarded – undo
55 53
      *
56 54
      * @return array<int, int>
57 55
      */
58
-    public function getWarningList()
59
-    {
56
+    public function getWarningList() {
60 57
         return [];
61 58
 
62 59
     }//end getWarningList()
Please login to merge, or discard this patch.
src/Standards/Zend/Tests/NamingConventions/ValidVariableNameUnitTest.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -11,8 +11,7 @@  discard block
 block discarded – undo
11 11
 
12 12
 use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest;
13 13
 
14
-class ValidVariableNameUnitTest extends AbstractSniffUnitTest
15
-{
14
+class ValidVariableNameUnitTest extends AbstractSniffUnitTest {
16 15
 
17 16
 
18 17
     /**
@@ -23,8 +22,7 @@  discard block
 block discarded – undo
23 22
      *
24 23
      * @return array<int, int>
25 24
      */
26
-    public function getErrorList()
27
-    {
25
+    public function getErrorList() {
28 26
         return [
29 27
             3   => 1,
30 28
             5   => 1,
@@ -66,8 +64,7 @@  discard block
 block discarded – undo
66 64
      *
67 65
      * @return array<int, int>
68 66
      */
69
-    public function getWarningList()
70
-    {
67
+    public function getWarningList() {
71 68
         return [
72 69
             6   => 1,
73 70
             14  => 1,
Please login to merge, or discard this patch.
src/Standards/Zend/Tests/NamingConventions/ValidVariableNameUnitTest.inc 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -5,8 +5,7 @@  discard block
 block discarded – undo
5 5
 $_varName = 'hello';
6 6
 $varname2 = 'hello';
7 7
 
8
-class MyClass
9
-{
8
+class MyClass {
10 9
     $varName  = 'hello';
11 10
     $var_name = 'hello';
12 11
     $varname  = 'hello';
@@ -102,8 +101,7 @@  discard block
 block discarded – undo
102 101
 var_dump($HTTP_RAW_POST_DATA);
103 102
 var_dump($php_errormsg);
104 103
 
105
-interface Base
106
-{
104
+interface Base {
107 105
     protected $anonymous;
108 106
 
109 107
     public function __construct();
Please login to merge, or discard this patch.