Skip to content

Instantly share code, notes, and snippets.

<?php
class MyLogger implements \Psr\Log\LoggerInterface
{
public function emergency($message, array $context = array())
{
var_dump($message);
}
public function alert($message, array $context = array()) {}
@zedentox
zedentox / pre-commit
Last active September 16, 2017 03:39
Pre-commit hook for PHP_CodeSniffer
phpcsresults=""
for filepath in $(git --no-pager diff --name-only --cached)
do
if [ "${filepath##*.}" == "php" ]
then
tmpresults=$(git --no-pager show :$filepath | phpcs --stdin-path=$filepath -)
if [ "$tmpresults" != "" ]
then
phpcsresults="$phpcsresults\n$tmpresults"
fi

Keybase proof

I hereby claim:

  • I am zedentox on github.
  • I am zedentox (https://keybase.io/zedentox) on keybase.
  • I have a public key ASAI-lTn1FWi1ZTLRFiZl-D4JMyJCx37xg-I0Mdx0IuAvAo

To claim this, I am signing this object: