Completed
Push — master ( d702ea...59cc4f )
by
unknown
22s
created
phpcs-sniffs/Formidable/Sniffs/WhiteSpace/NoBlankLineAfterLoopOpenSniff.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -49,12 +49,12 @@  discard block
 block discarded – undo
49 49
 		$tokens = $phpcsFile->getTokens();
50 50
 
51 51
 		// Make sure this loop has a scope (curly braces).
52
-		if ( ! isset( $tokens[ $stackPtr ]['scope_opener'] ) ) {
52
+		if ( ! isset( $tokens[$stackPtr]['scope_opener'] ) ) {
53 53
 			return;
54 54
 		}
55 55
 
56
-		$scopeOpener = $tokens[ $stackPtr ]['scope_opener'];
57
-		$scopeCloser = $tokens[ $stackPtr ]['scope_closer'];
56
+		$scopeOpener = $tokens[$stackPtr]['scope_opener'];
57
+		$scopeCloser = $tokens[$stackPtr]['scope_closer'];
58 58
 
59 59
 		// Find the first non-whitespace token after the opening brace.
60 60
 		$firstContent = $phpcsFile->findNext( T_WHITESPACE, $scopeOpener + 1, $scopeCloser, true );
@@ -64,8 +64,8 @@  discard block
 block discarded – undo
64 64
 			return;
65 65
 		}
66 66
 
67
-		$openerLine  = $tokens[ $scopeOpener ]['line'];
68
-		$contentLine = $tokens[ $firstContent ]['line'];
67
+		$openerLine  = $tokens[$scopeOpener]['line'];
68
+		$contentLine = $tokens[$firstContent]['line'];
69 69
 
70 70
 		// Check if there's a blank line between the opener and first content.
71 71
 		// A blank line means the content is more than 1 line after the opener.
@@ -86,8 +86,8 @@  discard block
 block discarded – undo
86 86
 			// Find the whitespace token right after the opener that contains the blank line.
87 87
 			$nextToken = $scopeOpener + 1;
88 88
 
89
-			if ( $tokens[ $nextToken ]['code'] === T_WHITESPACE ) {
90
-				$content      = $tokens[ $nextToken ]['content'];
89
+			if ( $tokens[$nextToken]['code'] === T_WHITESPACE ) {
90
+				$content      = $tokens[$nextToken]['content'];
91 91
 				$newlineCount = substr_count( $content, "\n" );
92 92
 
93 93
 				if ( $newlineCount >= 2 ) {
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 					// Check if the next token is also whitespace with a newline.
101 101
 					$afterNext = $nextToken + 1;
102 102
 
103
-					if ( $afterNext < $firstContent && $tokens[ $afterNext ]['code'] === T_WHITESPACE ) {
103
+					if ( $afterNext < $firstContent && $tokens[$afterNext]['code'] === T_WHITESPACE ) {
104 104
 						// Remove this extra whitespace token.
105 105
 						$phpcsFile->fixer->replaceToken( $afterNext, '' );
106 106
 					}
Please login to merge, or discard this patch.
classes/views/xml/xml.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -17,17 +17,17 @@  discard block
 block discarded – undo
17 17
 do_action( 'frm_xml_export_before_types_loop' );
18 18
 
19 19
 foreach ( $type as $tb_type ) {
20
-	if ( ! isset( $tables[ $tb_type ] ) ) {
20
+	if ( ! isset( $tables[$tb_type] ) ) {
21 21
 		do_action( 'frm_xml_import_' . $tb_type, $args );
22 22
 		continue;
23 23
 	}
24 24
 
25
-	if ( ! isset( $records[ $tb_type ] ) ) {
25
+	if ( ! isset( $records[$tb_type] ) ) {
26 26
 		// No records.
27 27
 		continue;
28 28
 	}
29 29
 
30
-	$item_ids = $records[ $tb_type ];
30
+	$item_ids = $records[$tb_type];
31 31
 
32 32
 	if ( in_array( $tb_type, array( 'styles', 'actions' ), true ) ) {
33 33
 		include __DIR__ . '/posts_xml.php';
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 		include FrmProAppHelper::plugin_path() . '/classes/views/xml/' . $tb_type . '_xml.php';
38 38
 	}
39 39
 
40
-	unset( $item_ids, $records[ $tb_type ], $tb_type );
40
+	unset( $item_ids, $records[$tb_type], $tb_type );
41 41
 }//end foreach
42 42
 
43 43
 /**
Please login to merge, or discard this patch.