Advertisement
Guest User

Untitled

a guest
Sep 26th, 2012
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 0.63 KB | None | 0 0
  1. -        $blankLines   = $lastLine - $lastCodeLine;
  2. -        if ($blankLines === 0) {
  3. -            $error = 'Expected 1 blank line at end of file; 0 found';
  4. -            $data  = array($blankLines);
  5. -            $phpcsFile->addError($error, $stackPtr, 'NotFound', $data);
  6. -        } else if ($blankLines > 1) {
  7. -            $error = 'Expected 1 blank line at end of file; "%s" found';
  8. -            $data  = array($blankLines);
  9. +        $blankLines   = ($lastLine - $lastCodeLine);
  10. +        if ($blankLines > 0) {
  11. +            $error = 'Expected 1 blank line at end of file; %s found';
  12. +            $data  = array($blankLines + 1);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement