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 characters
#!/bin/bash | |
name=$(date +%s) | |
cd ../ | |
mkdir "temp_${name}" | |
cd "temp_${name}" |
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 characters
scrutinizer: | |
inherit: true | |
tools: | |
external_code_coverage: true | |
checks: | |
php: | |
code_rating: true | |
duplication: true | |
filter: | |
paths: [src/*, tests/*] |
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 characters
<?php | |
interface Action | |
{ | |
public function matches(array $message); | |
public function handle($inbox, array $message); | |
} | |
class TwitterAction implements Action | |
{ |
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 characters
<?php | |
use Symfony\Component\Console\Output\StreamOutput; | |
$handle = fopen("php://output", "w"); | |
$stream = new StreamOutput($handle); | |
Artisan::call("migrate", ["--path" => "Acme/Migration"], $stream); |
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 characters
<?php | |
function array_difference(array $first, array $second) { | |
return array_merge( | |
array_diff($first, $second), | |
array_diff($second, $first) | |
); | |
} |
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 characters
<?php | |
trait GreetName | |
{ | |
/** | |
* @return array | |
*/ | |
public function interfacesForGreetName() | |
{ | |
return [HasGreeting::class, HasName::class]; |
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 characters
❯ phpunit --coverage-html=report | |
PHPUnit 4.1.4 by Sebastian Bergmann. | |
Configuration read from /path/to/phpunit.xml | |
................................................................. 65 / 85 ( 76%) | |
.................... | |
Time: 6.87 minutes, Memory: 116.25Mb |
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 characters
❯ composer install | |
Loading composer repositories with package information | |
Installing dependencies (including require-dev) from lock file | |
- Installing illuminate/container (v4.2.8) | |
Loading from cache | |
- Installing michelf/php-markdown (1.4.1) | |
Loading from cache |
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 characters
<?php | |
/** | |
* @param $path | |
* @param $extension | |
* | |
* @return array | |
*/ | |
function getFilesInPathWithExtension($path, $extension) | |
{ |
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 characters
# EditorConfig is awesome: http://EditorConfig.org | |
# top-most EditorConfig file | |
root = true | |
# Unix-style newlines with a newline ending every file | |
[*] | |
end_of_line = lf | |
insert_final_newline = true | |
indent_style = space |