Completed
Branch BUG/required-message-fields (8f9492)
by
unknown
10:53 queued 20s
created
src/Standards/Squiz/Sniffs/Operators/ValidLogicalOperatorsSniff.php 1 patch
Indentation   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -16,52 +16,52 @@
 block discarded – undo
16 16
 {
17 17
 
18 18
 
19
-    /**
20
-     * Returns an array of tokens this test wants to listen for.
21
-     *
22
-     * @return array
23
-     */
24
-    public function register()
25
-    {
26
-        return [
27
-            T_LOGICAL_AND,
28
-            T_LOGICAL_OR,
29
-        ];
19
+	/**
20
+	 * Returns an array of tokens this test wants to listen for.
21
+	 *
22
+	 * @return array
23
+	 */
24
+	public function register()
25
+	{
26
+		return [
27
+			T_LOGICAL_AND,
28
+			T_LOGICAL_OR,
29
+		];
30 30
 
31
-    }//end register()
31
+	}//end register()
32 32
 
33 33
 
34
-    /**
35
-     * Processes this test, when one of its tokens is encountered.
36
-     *
37
-     * @param \PHP_CodeSniffer\Files\File $phpcsFile The current file being scanned.
38
-     * @param int                         $stackPtr  The position of the current token in the
39
-     *                                               stack passed in $tokens.
40
-     *
41
-     * @return void
42
-     */
43
-    public function process(File $phpcsFile, $stackPtr)
44
-    {
45
-        $tokens = $phpcsFile->getTokens();
34
+	/**
35
+	 * Processes this test, when one of its tokens is encountered.
36
+	 *
37
+	 * @param \PHP_CodeSniffer\Files\File $phpcsFile The current file being scanned.
38
+	 * @param int                         $stackPtr  The position of the current token in the
39
+	 *                                               stack passed in $tokens.
40
+	 *
41
+	 * @return void
42
+	 */
43
+	public function process(File $phpcsFile, $stackPtr)
44
+	{
45
+		$tokens = $phpcsFile->getTokens();
46 46
 
47
-        $replacements = [
48
-            'and' => '&&',
49
-            'or'  => '||',
50
-        ];
47
+		$replacements = [
48
+			'and' => '&&',
49
+			'or'  => '||',
50
+		];
51 51
 
52
-        $operator = strtolower($tokens[$stackPtr]['content']);
53
-        if (isset($replacements[$operator]) === false) {
54
-            return;
55
-        }
52
+		$operator = strtolower($tokens[$stackPtr]['content']);
53
+		if (isset($replacements[$operator]) === false) {
54
+			return;
55
+		}
56 56
 
57
-        $error = 'Logical operator "%s" is prohibited; use "%s" instead';
58
-        $data  = [
59
-            $operator,
60
-            $replacements[$operator],
61
-        ];
62
-        $phpcsFile->addError($error, $stackPtr, 'NotAllowed', $data);
57
+		$error = 'Logical operator "%s" is prohibited; use "%s" instead';
58
+		$data  = [
59
+			$operator,
60
+			$replacements[$operator],
61
+		];
62
+		$phpcsFile->addError($error, $stackPtr, 'NotAllowed', $data);
63 63
 
64
-    }//end process()
64
+	}//end process()
65 65
 
66 66
 
67 67
 }//end class
Please login to merge, or discard this patch.
php_codesniffer/src/Standards/Zend/Tests/Debug/CodeAnalyzerUnitTest.inc 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 function myFunction($variable) {
3
-    // $variable is unused.
4
-    echo 'hi';
3
+	// $variable is unused.
4
+	echo 'hi';
5 5
 }
6 6
 ?>
Please login to merge, or discard this patch.
php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.7.inc 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,5 +4,5 @@
 block discarded – undo
4 4
 //some code
5 5
 function foo()
6 6
 {
7
-    return 'bar';
7
+	return 'bar';
8 8
 }
Please login to merge, or discard this patch.
php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.3.inc 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,5 +2,5 @@
 block discarded – undo
2 2
 define("MAXSIZE", 100);
3 3
 $defined = true;
4 4
 if (defined('MINSIZE') === false) {
5
-    $defined = false;
5
+	$defined = false;
6 6
 }
Please login to merge, or discard this patch.
php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.2.inc 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
 const CONSTANT2 = 2;
6 6
 
7 7
 if ($something) {
8
-    echo 'hi';
8
+	echo 'hi';
9 9
 }
10 10
 
11 11
 $var = myFunction();
@@ -16,9 +16,9 @@  discard block
 block discarded – undo
16 16
 
17 17
 $c = new class extends Something{
18 18
 
19
-    public function someMethod()
20
-    {
21
-        // ...
22
-    }
19
+	public function someMethod()
20
+	{
21
+		// ...
22
+	}
23 23
 
24 24
 };
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 echo $object -> define();
15 15
 Foo::define();
16 16
 
17
-$c = new class extends Something{
17
+$c = new class extends Something {
18 18
 
19 19
     public function someMethod()
20 20
     {
Please login to merge, or discard this patch.
php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.9.inc 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,5 +4,5 @@
 block discarded – undo
4 4
 // phpcs:enable
5 5
 $defined = true;
6 6
 if (defined('MINSIZE') === false) {
7
-    $defined = false;
7
+	$defined = false;
8 8
 }
Please login to merge, or discard this patch.
php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.4.inc 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <html>
2 2
 <?php
3 3
 function printHead() {
4
-    echo '<head></head>';
4
+	echo '<head></head>';
5 5
 }
6 6
 
7 7
 printHead();
Please login to merge, or discard this patch.
php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.php 3 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
      *
26 26
      * @return array<int, int>
27 27
      */
28
-    public function getErrorList($testFile='')
28
+    public function getErrorList($testFile = '')
29 29
     {
30 30
         return [];
31 31
 
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
      *
43 43
      * @return array<int, int>
44 44
      */
45
-    public function getWarningList($testFile='')
45
+    public function getWarningList($testFile = '')
46 46
     {
47 47
         switch ($testFile) {
48 48
         case 'SideEffectsUnitTest.3.inc':
Please login to merge, or discard this patch.
Indentation   +53 added lines, -53 removed lines patch added patch discarded remove patch
@@ -15,66 +15,66 @@
 block discarded – undo
15 15
 {
16 16
 
17 17
 
18
-    /**
19
-     * Set CLI values before the file is tested.
20
-     *
21
-     * @param string                  $testFile The name of the file being tested.
22
-     * @param \PHP_CodeSniffer\Config $config   The config data for the test run.
23
-     *
24
-     * @return void
25
-     */
26
-    public function setCliValues($testFile, $config)
27
-    {
28
-        if ($testFile === 'SideEffectsUnitTest.12.inc') {
29
-            $config->annotations = false;
30
-        }
18
+	/**
19
+	 * Set CLI values before the file is tested.
20
+	 *
21
+	 * @param string                  $testFile The name of the file being tested.
22
+	 * @param \PHP_CodeSniffer\Config $config   The config data for the test run.
23
+	 *
24
+	 * @return void
25
+	 */
26
+	public function setCliValues($testFile, $config)
27
+	{
28
+		if ($testFile === 'SideEffectsUnitTest.12.inc') {
29
+			$config->annotations = false;
30
+		}
31 31
 
32
-    }//end setCliValues()
32
+	}//end setCliValues()
33 33
 
34 34
 
35
-    /**
36
-     * Returns the lines where errors should occur.
37
-     *
38
-     * The key of the array should represent the line number and the value
39
-     * should represent the number of errors that should occur on that line.
40
-     *
41
-     * @param string $testFile The name of the file being tested.
42
-     *
43
-     * @return array<int, int>
44
-     */
45
-    public function getErrorList($testFile='')
46
-    {
47
-        return [];
35
+	/**
36
+	 * Returns the lines where errors should occur.
37
+	 *
38
+	 * The key of the array should represent the line number and the value
39
+	 * should represent the number of errors that should occur on that line.
40
+	 *
41
+	 * @param string $testFile The name of the file being tested.
42
+	 *
43
+	 * @return array<int, int>
44
+	 */
45
+	public function getErrorList($testFile='')
46
+	{
47
+		return [];
48 48
 
49
-    }//end getErrorList()
49
+	}//end getErrorList()
50 50
 
51 51
 
52
-    /**
53
-     * Returns the lines where warnings should occur.
54
-     *
55
-     * The key of the array should represent the line number and the value
56
-     * should represent the number of warnings that should occur on that line.
57
-     *
58
-     * @param string $testFile The name of the file being tested.
59
-     *
60
-     * @return array<int, int>
61
-     */
62
-    public function getWarningList($testFile='')
63
-    {
64
-        switch ($testFile) {
65
-        case 'SideEffectsUnitTest.3.inc':
66
-        case 'SideEffectsUnitTest.4.inc':
67
-        case 'SideEffectsUnitTest.5.inc':
68
-        case 'SideEffectsUnitTest.10.inc':
69
-        case 'SideEffectsUnitTest.12.inc':
70
-        case 'SideEffectsUnitTest.15.inc':
71
-        case 'SideEffectsUnitTest.16.inc':
72
-            return [1 => 1];
73
-        default:
74
-            return [];
75
-        }//end switch
52
+	/**
53
+	 * Returns the lines where warnings should occur.
54
+	 *
55
+	 * The key of the array should represent the line number and the value
56
+	 * should represent the number of warnings that should occur on that line.
57
+	 *
58
+	 * @param string $testFile The name of the file being tested.
59
+	 *
60
+	 * @return array<int, int>
61
+	 */
62
+	public function getWarningList($testFile='')
63
+	{
64
+		switch ($testFile) {
65
+		case 'SideEffectsUnitTest.3.inc':
66
+		case 'SideEffectsUnitTest.4.inc':
67
+		case 'SideEffectsUnitTest.5.inc':
68
+		case 'SideEffectsUnitTest.10.inc':
69
+		case 'SideEffectsUnitTest.12.inc':
70
+		case 'SideEffectsUnitTest.15.inc':
71
+		case 'SideEffectsUnitTest.16.inc':
72
+			return [1 => 1];
73
+		default:
74
+			return [];
75
+		}//end switch
76 76
 
77
-    }//end getWarningList()
77
+	}//end getWarningList()
78 78
 
79 79
 
80 80
 }//end class
Please login to merge, or discard this patch.
Switch Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -62,16 +62,16 @@
 block discarded – undo
62 62
     public function getWarningList($testFile='')
63 63
     {
64 64
         switch ($testFile) {
65
-        case 'SideEffectsUnitTest.3.inc':
66
-        case 'SideEffectsUnitTest.4.inc':
67
-        case 'SideEffectsUnitTest.5.inc':
68
-        case 'SideEffectsUnitTest.10.inc':
69
-        case 'SideEffectsUnitTest.12.inc':
70
-        case 'SideEffectsUnitTest.15.inc':
71
-        case 'SideEffectsUnitTest.16.inc':
72
-            return [1 => 1];
73
-        default:
74
-            return [];
65
+        	case 'SideEffectsUnitTest.3.inc':
66
+        	case 'SideEffectsUnitTest.4.inc':
67
+        	case 'SideEffectsUnitTest.5.inc':
68
+        	case 'SideEffectsUnitTest.10.inc':
69
+        	case 'SideEffectsUnitTest.12.inc':
70
+        	case 'SideEffectsUnitTest.15.inc':
71
+        	case 'SideEffectsUnitTest.16.inc':
72
+            	return [1 => 1];
73
+        	default:
74
+            	return [];
75 75
         }//end switch
76 76
 
77 77
     }//end getWarningList()
Please login to merge, or discard this patch.
php_codesniffer/src/Standards/PSR1/Tests/Files/SideEffectsUnitTest.11.inc 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 define("MAXSIZE", 100);
5 5
 $defined = true;
6 6
 if (defined('MINSIZE') === false) {
7
-    $defined = false;
7
+	$defined = false;
8 8
 }
9 9
 
10 10
 // phpcs:enable PEAR
Please login to merge, or discard this patch.