This file contains 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 characters
<?php | |
class HttpException extends \Exception | |
{ | |
/** | |
* List of additional headers | |
* | |
* @var array | |
*/ | |
private $headers = array(); |
This file contains 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 characters
<?php | |
/** | |
* Content from http://en.wikipedia.org/wiki/List_of_HTTP_status_codes | |
* | |
* You may also want a list of unofficial codes: | |
* | |
* 103 => 'Checkpoint', | |
* 218 => 'This is fine', // Apache Web Server | |
* 419 => 'Page Expired', // Laravel Framework |
This file contains 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 characters
<?php | |
$langinfo = array( | |
'LC_TIME' => array( | |
'ABDAY_1' => 'Abbreviated name of fist day of the week', | |
'ABDAY_2' => 'Abbreviated name of second day of the week', | |
'ABDAY_3' => 'Abbreviated name of third day of the week', | |
'ABDAY_4' => 'Abbreviated name of fourth day of the week', | |
'ABDAY_5' => 'Abbreviated name of fifth day of the week', | |
'ABDAY_6' => 'Abbreviated name of sixth day of the week', |
This file contains 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 characters
<?php | |
abstract class AbstractEnum | |
{ | |
/** | |
* @var string | |
*/ | |
private $name; |
This file contains 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 characters
#!/usr/bin/env bash | |
# Usage: {script} DIRECTORY | |
# Find PHP's commented code and remove then. | |
# | |
# --help, -h Displays this help | |
# | |
# Report bugs to Henrique Moody <henriquemoody@gmail.com> | |
# | |
declare -r SCRIPT_NAME=$(basename ${0}) |
This file contains 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 characters
# Bash-Completion script for PHPUnit | |
# | |
# Created by Henrique Moody <henriquemoody@gmail.com> | |
# | |
_phpunit() | |
{ | |
COMPREPLY=() | |
local cur="${COMP_WORDS[COMP_CWORD]}" | |
local prev="${COMP_WORDS[COMP_CWORD-1]}" |
This file contains 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 characters
<?php | |
class FluentCache implements \ArrayAccess | |
{ | |
private $cache; | |
public function __construct(\Doctrine\Common\Cache\Cache $cache) | |
{ | |
$this->cache = $cache; |
This file contains 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 characters
#!/usr/bin/env bash | |
# Usage: {script} FILE1 FILE2 ... | |
# | |
# --help, h Displays this help | |
# | |
# Report bugs to Henrique Moody <henriquemoody@gmail.com> | |
# | |
_help() | |
{ |
This file contains 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 characters
#!/usr/bin/env php | |
<?php | |
$file = array_shift($_SERVER['argv']); | |
$help = "Utilização de {$file} [ OPTIONS ] | |
-s, --say Diz alguma coisa | |
-t, --to Diz pra quem quer dizer alguma coisa | |
"; | |
if (empty($_SERVER['argv'])) { |