Last active
August 29, 2015 14:10
-
-
Save icambridge/26159043a232e7206b40 to your computer and use it in GitHub Desktop.
This file contains 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
<?hh | |
class Example { | |
private int $numberNine = 9; | |
} |
This file contains 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
<?hh | |
const int NUMBER_NINE = 9; |
This file contains 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
<?hh | |
function example(TypeOne $typeOne, int $anInteger){} |
This file contains 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
<?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); | |
} | |
} |
This file contains 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
<?hh | |
function returnsTrue(): bool { return true; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment