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); | |
// PHP 8 | |
final class DependencyInjectionExampleNew | |
{ | |
public function __construct(private string $var) {} | |
} | |
// PHP 7.4 | |
final class DependencyInjectionExample |
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
// Async arrow functions look like this: | |
const foo = async () => { | |
// do something | |
} | |
// Async arrow functions look like this for a single argument passed to it: | |
const foo = async evt => { |
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 implode("\n", array_map(function($inst){ return "- ".$inst->getUrl()->toString(); }, $customer->getInstallations()->toArray())) |
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); | |
// namespace... | |
final class Encrypter | |
{ | |
private string $key; | |
private string $cipher; | |
const DEFAULT_CIPHER = 'AES-256-CBC'; |
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
npm i bootstrap-icons | |
import "../node_modules/bootstrap-icons/font/bootstrap-icons.css"; |
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); | |
namespace Acme\Common\Application; | |
final class Filter | |
{ | |
private string $column; | |
private int $option; | |
private string $value; |
NewerOlder