Skip to content

Commit

Permalink
Changed error message to be consistent with others (ref #2582)
Browse files Browse the repository at this point in the history
  • Loading branch information
gsherwood committed Nov 12, 2019
1 parent 8f4ec56 commit e1b6ccd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Standards/Generic/Sniffs/Files/FilePermissionsSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,8 @@ public function process(File $phpcsFile, $stackPtr)

if ($filename !== 'STDIN') {
$perms = fileperms($phpcsFile->getFilename());

if (($perms & 0x0040) !== 0 || ($perms & 0x0008) !== 0 || ($perms & 0x0001) !== 0) {
$error = "A PHP file should not be executable. Found file permission set to %s.";
$error = 'A PHP file should not be executable; found file permissions set to %s';
$data = [substr(sprintf('%o', $perms), -4)];
$phpcsFile->addError($error, 0, 'Executable', $data);
}
Expand Down

0 comments on commit e1b6ccd

Please sign in to comment.