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 | |
class BankAccount | |
{ | |
private $twitter; | |
public function __construct(Twitter $twitter) | |
{ | |
$this->twitter = $twitter; | |
} | |
public function deposit($amount){ | |
} |
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 | |
/** @Entity */ | |
class Bug | |
{ | |
/** @Column(type="integer") */ | |
private $id; | |
/** @Column(length=50) */ | |
private $status; | |
//... | |
} |
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 | |
class Foo | |
{ | |
private $private; | |
public function __construct($value) | |
{ | |
$this->private = $value; | |
} | |
public function getOther(Foo $object) | |
{ |
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 | |
// client code | |
$customer = $customerRepository->find($id); | |
$orders = $customer->getOrders(); |
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/sh | |
alias gs="git status" | |
alias gc="git commit" | |
alias gr="git checkout" | |
alias ga="git add" | |
alias gl="git lola" |
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/sh | |
alias gs="git status" | |
alias gc="git commit" | |
alias gr="git checkout" | |
alias ga="git add" | |
alias gl="git lola" |
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 | |
protected function assertStringDistanceInPercent($minimumPercentage, $expected, $actual) | |
{ | |
$percentage = 0; | |
similar_text($expected, $actual, $percentage); | |
$this->assertGreaterThanOrEqual( | |
$minimumPercentage, | |
$percentage, | |
"The distance between the strings should be greater than or equal to $minimumPercentage%, got $percentage%"); |
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
; example deps.ini file | |
[twig] | |
git=http://github.com/fabpot/Twig.git | |
target=vendor/twig | |
version=v1.7.0 |
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
<!doctype html> | |
<html ng-app> | |
<script src="http://code.angularjs.org/angular-1.0.0rc3.min.js"></script> | |
<script src="https://raw.github.com/madrobby/keymaster/master/keymaster.min.js"></script> | |
<script> | |
function HelloCntl($scope, $location) { | |
$scope.name = 'World'; | |
$location.path('/foo'); | |
key('x', function() { | |
console.log('x key pressed'); |
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
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \[\1\]/' | |
} | |
if [[ ${EUID} == 0 ]] ; then | |
PS1='\[\033[01;31m\]\u@\h \[\033[01;34m\]\w\[\033[01;35m\]$(parse_git_branch)\[\033[01;34m\] \$ \[\033[00m\]' | |
else | |
PS1='\[\033[01;31m\]\u@\h \[\033[01;00m\]\w\[\033[00;33m\]$(parse_git_branch)\[\033[00m\] \$ ' |
OlderNewer