Skip to content

Instantly share code, notes, and snippets.

View pedroresende's full-sized avatar

Pedro Resende pedroresende

View GitHub Profile
@pedroresende
pedroresende / PreCommitHook.php
Created February 2, 2018 10:55 — forked from joaoinacio/PreCommitHook.php
php QC pre-commit hook
#!/usr/bin/php
<?php
/**
* Git pre-commit hook for PHP code quality
* install with `<path-to-file> install`
*/
class PreCommitHook
{
/**
<?php
// src/Controller/HomeController.php
namespace App\Controller;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use App\Service\ConfigGenerator;
use App\Service\StoreFactory;
class HomeController
<?php
$time_start = microtime(true);
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "http://api.fix_trailing_old_variables.kinternal.kwankodev.net/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
### Keybase proof
I hereby claim:
* I am pedroresende on github.
* I am pedroresende (https://keybase.io/pedroresende) on keybase.
* I have a public key ASBFtQIqhM5b5tcMY2nC0gshB3ubRXgUlGF1UZm9GVmFcwo
To claim this, I am signing this object: