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 | |
| class Node | |
| { | |
| /** @var string */ | |
| public $name; | |
| /** @var bool */ | |
| public $visited = false; | |
| public function __construct(string $name) |
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 | |
| final class FindUserByIdHandler | |
| { | |
| private UserRepository $userRepository; | |
| public function __construct(UserRepository $userRepository) | |
| { | |
| $this->userRepository = $userRepository; | |
| } |
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 | |
| final class TraversalTest extends TestCase | |
| { | |
| public function testTraversal(): void | |
| { | |
| $parser = new TokenParser(new Lexer()); | |
| $ast = $parser->parse('/foo|bar{2,}/i'); | |
| $traverser = new Traverser([new RemoveQuantifierVisitor()]); |
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
| function env(string $param): string | |
| { | |
| return sprintf('%env(%s)%', $param); | |
| } |
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 | |
| namespace App\Controller; | |
| use Symfony\Component\HttpFoundation\Response; | |
| use Symfony\Component\Security\Core\Security; | |
| use Twig\Environment; | |
| class AccountPageActionV1 | |
| { |
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
| interface Foo { | |
| foo(): void; | |
| } | |
| // One | |
| type FooBag = { | |
| one: Foo, | |
| two: Foo, | |
| three: Foo | |
| }; |
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 | |
| /** | |
| * @param array<string> $in | |
| * | |
| * @return array<int> | |
| */ | |
| function withIntval(array $in): array | |
| { | |
| return array_map('intval', $in); | |
| } |
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 | |
| // Entity | |
| /** | |
| * @ORM\Repository(DoctrinePricesRepository::class) | |
| */ | |
| class Price { | |
| public function __construct( |
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 | |
| // OPTION A: | |
| class MyController | |
| { | |
| //constructor, properties etc | |
| /** | |
| * @Route("/my/path") | |
| */ |
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 | |
| function connect_while(ApiClient $client): string | |
| { | |
| $tries = 0; | |
| while(true) { | |
| $tries++; | |
| try { | |
| $result = $client->doThing(); |