Skip to content

Instantly share code, notes, and snippets.

View arenowebdev's full-sized avatar

David Mosher arenowebdev

View GitHub Profile
@arenowebdev
arenowebdev / pre-commit
Created January 29, 2016 08:06 — forked from martinbean/pre-commit
Pre-commit hook to detect if any files contain dd()
#!/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)) {