Last active
          December 19, 2023 22:14 
        
      - 
      
 - 
        
Save martinbean/0eb43b1ba647bca18064 to your computer and use it in GitHub Desktop.  
Revisions
- 
        
martinbean revised this gist
Feb 8, 2016 . No changes.There are no files selected for viewing
 - 
        
martinbean revised this gist
Feb 3, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -14,7 +14,7 @@ foreach ($files as $file) { $lines = file($file); foreach ($lines as $line => $content) { if (preg_match('/\bdd\(/', $content)) { printf("\033[0;31mdd() found on line %d in %s\033[0m\n", $line + 1, $file); $exitCode = 1; }  - 
        
martinbean revised this gist
Jan 28, 2016 . 1 changed file with 1 addition and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,17 +1,12 @@ #!/usr/bin/php <?php $files = shell_exec('git diff-index --name-only --cached --diff-filter=ACMR HEAD | grep "\.php$"'); $files = explode("\n", trim($files)); $exitCode = 0; foreach ($files as $file) { if (empty($file)) { continue; }  - 
        
martinbean revised this gist
Jan 28, 2016 . 1 changed file with 5 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,6 +7,11 @@ $files = explode("\n", trim($files)); $exitCode = 0; foreach ($files as $file) { // Only check files with .php extension if (strtolower(pathinfo($file, PATHINFO_EXTENSION)) != 'php') { continue; } if (empty($file)) { continue; }  - 
        
martinbean revised this gist
Jan 28, 2016 . 1 changed file with 5 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,10 +7,14 @@ $files = explode("\n", trim($files)); $exitCode = 0; foreach ($files as $file) { if (empty($file)) { continue; } $lines = file($file); foreach ($lines as $line => $content) { if (preg_match('/\sdd\(/', $content)) { printf("\033[0;31mdd() found on line %d in %s\033[0m\n", $line + 1, $file); $exitCode = 1; }  - 
        
martinbean created this gist
Jan 27, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ #!/usr/bin/php <?php $files = shell_exec('git diff-index --name-only --cached --diff-filter=ACMR HEAD'); $files = explode("\n", trim($files)); $exitCode = 0; foreach ($files as $file) { $lines = file($file); foreach ($lines as $line => $content) { if (preg_match('/dd\(/', $content)) { printf("\033[0;31mdd() found on line %d in %s\033[0m\n", $line + 1, $file); $exitCode = 1; } } } exit($exitCode);