These learning resources primarily focus on programming using Good Design Principles and Design Patterns
- There is an emphasis on learning using PHP, although most patterns are universal to every object orientated language.
| #!/usr/bin/env bash | |
| export TARGET_REF=${TARGET_REF:-HEAD} | |
| git show "$TARGET_REF:psalm-baseline.xml" | xmllint --xpath 'count(//file[not(starts-with(@src, "test"))]/*/code)' - |
| <?php | |
| declare(strict_types=1); | |
| /** | |
| * TRIFFT BACKEND | |
| * @copyright Copyright (c) 2019 TRIFFT ME s.r.o. (https://www.trifft.me) | |
| * @author Matus Nickel <[email protected]> | |
| */ |
| <?php | |
| declare(strict_types=1); | |
| namespace Funct\Ion\Microsite\Base\ReadModel\MicrositeCollections; | |
| use Prooph\EventStore\Projection\AbstractReadModel; | |
| use RuntimeException; | |
| final class CombinedReadModel extends AbstractReadModel |
| <?php | |
| // Context: I'm trying to argue that DI (and DIC) are great, and DIC libs suck. | |
| // Happy to be proven wrong! | |
| final class Router { | |
| private $dependencies; | |
| public function __construct (Dependencies $dependencies) { | |
| $this->dependencies = $dependencies; | |
| // You might say that this is Service Locator, but it's not. This router is toplevel, | |
| // and toplevel must have access to dependencies. After that it can all just bubble nicely using proper DI. |
| # Install git fame | |
| gem install git_fame | |
| # Install all vendors with source | |
| rm -rf vendor/* | |
| composer update --prefer-source | |
| # Do the calculations. This might take 30 minutes to complete. | |
| rm output.txt | |
| find ./vendor -type d -depth 2 ! -path "./vendor/composer" -exec echo {} \; -exec git fame --sort=loc --hide-progressbar --repository={} \; >> output.txt |
| <?php | |
| declare(strict_types = 1); | |
| namespace Acme\Middleware; | |
| use Interop\Http\ServerMiddleware\DelegateInterface; | |
| use Interop\Http\ServerMiddleware\MiddlewareInterface; | |
| use Prooph\Common\Messaging\MessageFactory; | |
| use Prooph\Psr7Middleware\MetadataGatherer; |
| <?php declare(strict_types=1); | |
| require_once "✨.🐘"; | |
| ✨($_)->strlen("foo")->var_dump($_); |