| @@ 188-191 (lines=4) @@ | ||
| 185 | } |
|
| 186 | } |
|
| 187 | ||
| 188 | if (preg_match('/^\p{Ll}/u', $tokens[$long]['content']) === 1) { |
|
| 189 | $error = 'Doc comment long description must start with a capital letter'; |
|
| 190 | $phpcsFile->addError($error, $long, 'LongNotCapital'); |
|
| 191 | } |
|
| 192 | }//end if |
|
| 193 | ||
| 194 | if (empty($tokens[$commentStart]['comment_tags']) === true) { |
|
| @@ 155-157 (lines=3) @@ | ||
| 152 | // Check for Database Schema Changes. |
|
| 153 | $_pos = $stackPtr; |
|
| 154 | while ( $_pos = $phpcsFile->findNext( array( T_CONSTANT_ENCAPSED_STRING, T_DOUBLE_QUOTED_STRING ), ( $_pos + 1 ), $endOfStatement, null, null, true ) ) { |
|
| 155 | if ( preg_match( '#\b(?:ALTER|CREATE|DROP)\b#i', $tokens[ $_pos ]['content'] ) > 0 ) { |
|
| 156 | $phpcsFile->addError( 'Attempting a database schema change is highly discouraged.', $_pos, 'SchemaChange' ); |
|
| 157 | } |
|
| 158 | } |
|
| 159 | ||
| 160 | // Flag instance if not whitelisted. |
|