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
<?php | |
declare(strict_types=1); | |
function add(float $a, float $b): float { | |
return $a + $b; | |
} | |
echo add(1, 2); |
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 myLog(string $message): string { | |
return $message; | |
} |
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 // strict | |
class Caller { | |
public function set(string $property_name, Foo $object): void { | |
$object->$property_name = 'poopy'; | |
} | |
public function call(string $property_name, Foo $object): string { | |
return $object->$property_name; | |
} | |
} |
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
hhvm.log.use_syslog = false | |
hhvm.log.use_cronolog = true | |
hhvm.log.use_log_file = true | |
hhvm.log.file = /var/log/hhvm/hhvm.log-%Y-%m-%d | |
hhvm.log.sym_link = /var/log/hhvm/hhvm.log | |
hhvm.log.always_escape_log = false | |
hhvm.log.header = true | |
hhvm.log.always_log_unhandled_exceptions = false |
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 Wrapper<Tval as num> { | |
private Tval $value; | |
public function __construct(Tval $value) { | |
$this->value = $value; | |
} | |
public function setValue(Tval $value): void { | |
$this->value = $value; |
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 Wrapper<Tval as num> { | |
private Tval $value; | |
public function __construct(Tval $value) { | |
$this->value = $value; | |
} | |
public function setValue(Tval $value): void { | |
$this->value = $value; |
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
<?php | |
class Foo { | |
public function shape($bar, $baz) { | |
} | |
} |
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 | |
interface ExceptionWithCode { | |
public function getCode(); | |
} | |
class Checkout_Exception extends Exception implements ExceptionWithCode { | |
protected $data = []; | |
public function __construct($msg = "", $code = 0, $data = []) { |
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
/* base view template */ | |
var ViewTemplate = Backbone.View.extend({ | |
// containing element | |
el: $('body'), | |
// events | |
events: {}, | |
// initialize |
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
global: | |
env: | |
- LARAVEL_ENV: production | |
web1: | |
name: hipsta2 | |
shared_writable_dirs: | |
- /storage/cache | |
- /storage/database | |
- /storage/logs | |
- /storage/sessions |