Skip to content

Instantly share code, notes, and snippets.

View jacobsantos's full-sized avatar

Jacob Santos jacobsantos

View GitHub Profile
@jacobsantos
jacobsantos / CacheDataInterface.php
Last active August 29, 2015 14:24
WordPress Cache Refactoring Example
<?php
interface CacheDataInterface {
public function setIndex($name, $group = '');
public function index();
public function setData( $value );
public function data();
public function increment( $offset = 1 );
protocol SomethingProtocol {
public doSomething();
}
@jacobsantos
jacobsantos / java-interface-presentation
Last active August 29, 2015 14:10
Basic Java Interface
public interface ISomething {
public void doSomething();
}
@jacobsantos
jacobsantos / describe1.php
Created August 12, 2014 15:00
Describe function with example description and action
<?php
describe(
// The description of the specification.
'the describe function needs to have callable and context',
// All of the options and tests are contained within this closure.
// The closure or invoke object must accept no arguments, because none will
// be given when called.
function() {}
);