Skip to content

Instantly share code, notes, and snippets.

@mageekguy
mageekguy / gist:f873ffaf0cdc5f69d108
Created May 12, 2015
Extends and private properties are in a boat…
View gist:f873ffaf0cdc5f69d108
<?php
namespace
{
class abscisse
{
private $value;
function __construct($value)
{
View gist:f96066782bf2d742e75b
<?php
namespace world;
use
cli
;
abstract class human
{
@mageekguy
mageekguy / gist:6f7339723c12b75bfb2d
Last active Aug 29, 2015
A teenager want alcool in east oriented manner!
View gist:6f7339723c12b75bfb2d
<?php
/*
Un barman peut servir un verre d'alcool à un client :
1) s'il a plus de 18 ans
2) s'il dispose du ou des alcools nécessaires (dans le cas d'un cocktail) en stock.
*/
interface barman
{
View gist:6d68dc736f19108732a6
<?php
namespace east\request;
interface http
{
function methodIsAskedByHttpRequestMatcher(http\matcher $matcher);
function pathIsAskedByHttpRequestMatcher(http\matcher $matcher);
}
@mageekguy
mageekguy / gist:a0df0ac63dcda686da0d
Created Apr 8, 2015
the-4-rules-of-east-oriented-code-rule-4
View gist:a0df0ac63dcda686da0d
<?php
abstract class data
{
private
$value
;
function __construct($value)
{
@mageekguy
mageekguy / gist:30598b826bdd93b60774
Last active Aug 29, 2015
East oriented movie lister
View gist:30598b826bdd93b60774
<?php
namespace east\movie\library\finder;
use
east,
east\movie,
east\movie\library
;
@mageekguy
mageekguy / gist:77a1f5a08d22fbd00554
Last active Aug 29, 2015
east oriented mailqueue management [WIP]
View gist:77a1f5a08d22fbd00554
<?php
namespace api\data;
final class data
{
private
$value
;
@mageekguy
mageekguy / gist:0bd0a5be9632ff1b62e0
Last active Aug 29, 2015
Immutability vs. mutability
View gist:0bd0a5be9632ff1b62e0
<?php
interface console
{
function newData($data);
function noMoreData();
function dataGeneratorIs(dataGenerator $dataGenerator);
}
interface dataGenerator
@mageekguy
mageekguy / gist:f6e78ae0c6c8bbd0b92b
Last active Aug 29, 2015
east oriented game of life
View gist:f6e78ae0c6c8bbd0b92b
<?php
namespace gol;
interface cell
{
function isAtAbscissaAndOrdinateInView($x, $y, view $view);
function isAtAbscissaAndOrdinateInGrid($x, $y, grid $grid);
function cellNeighborIs(cell $cell);
function cellNeighborIsDead();
@mageekguy
mageekguy / gist:dd610593e4be3ff90504
Last active Aug 29, 2015
east oriented data loader
View gist:dd610593e4be3ff90504
<?php
namespace data
{
interface loader
{
function dataNeedDataWithName(name $name);
}
interface loadableData