This file contains hidden or 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); | |
| namespace Mathy\Ir { | |
| use Mathy\Bytecode\Instruction; | |
| /** | |
| * A node in the IR expression/statement tree. | |
| */ |
This file contains hidden or 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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <array> | |
| <dict> | |
| <key>phrase</key> | |
| <string>α</string> | |
| <key>shortcut</key> | |
| <string>;Alpha</string> | |
| </dict> |
This file contains hidden or 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); | |
| require_once __DIR__ . '/../vendor/autoload.php'; | |
| use Psl\Ansi; | |
| use Psl\Ansi\Color; | |
| use Psl\Ansi\Style; | |
| use Psl\Async; |
This file contains hidden or 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 | |
| interface Hash { | |
| public function hash(Hasher $hasher): int; | |
| } | |
| interface ConcurrentHashMap<K: Hash, V> { | |
| // ... | |
| public function flatten<S>(): ConcurrentHashMap<K, S> |
This file contains hidden or 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
| /// Increments an alphanumeric string. | |
| /// | |
| /// Rust implementation based on PHP's str_increment function from php-src: | |
| /// https://github.com/php/php-src/blob/1de16c7f15f3f927bf7e7c26b3a6b1bd5803b1cc/ext/standard/string.c#L1227 | |
| /// | |
| /// # Arguments | |
| /// | |
| /// * `input` - The string to increment | |
| /// |
This file contains hidden or 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
| #!/usr/bin/env bash | |
| set -euo pipefail | |
| REPO="carthage-software/mago" | |
| BIN_NAME="mago" | |
| TMP_DIR=$(mktemp -d) | |
| NEW_ISSUE="https://github.com/carthage-software/mago/issues/new" | |
| INSTALL_DIR="" |
This file contains hidden or 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
| fennec check | |
| error: argument 2 of function 'Qux\foo' expected `int`, but `non-empty-list { 12 }` was found | |
| ┌─ main.php:9:14 | |
| │ | |
| 9 │ foo("hello", [12], 1.0); | |
| │ ^^^^ argument 2 has type `non-empty-list { 12 }` | |
| │ | |
| ┌─ foo.php:7:27 | |
| │ | |
| 7 │ function foo(string $bar, int $baz, bool $f): void |
This file contains hidden or 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); | |
| namespace App; | |
| enum ArticleStatus { | |
| case Published; | |
| case Draft; | |
| case Archived; |
This file contains hidden or 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); | |
| namespace App; | |
| struct User { | |
| string $identifier; | |
| } |
This file contains hidden or 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); | |
| use Psl\Async; | |
| use Psl\IO; | |
| require 'vendor/autoload.php'; | |
| function fetch(string $id): string { |
NewerOlder