Skip to content

Instantly share code, notes, and snippets.

@icambridge
Last active August 29, 2015 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save icambridge/26159043a232e7206b40 to your computer and use it in GitHub Desktop.
Save icambridge/26159043a232e7206b40 to your computer and use it in GitHub Desktop.
<?hh
class Example {
private int $numberNine = 9;
}
<?hh
const int NUMBER_NINE = 9;
<?hh
function example(TypeOne $typeOne, int $anInteger){}
<?hh
namespace Examples;
class Value<T>
{
public function __construct(private T $value) {}
public function get(): T {
return $this->value;
}
}
class Constraint
{
public function isEqual<T>(T $valueOne, T $valueTwo) {
return ($valueOne == $valueTwo);
}
}
<?hh
function returnsTrue(): bool { return true; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment