Skip to content

Instantly share code, notes, and snippets.

💪
creating

Alexander Miertsch codeliner

View GitHub Profile
@codeliner
codeliner / CommandHandler.php
Created Nov 27, 2018
Event Machine Custom Command Handler Flavour
View CommandHandler.php
<?php
declare(strict_types=1);
namespace ProophExample\CommandHandler;
use Prooph\EventMachine\Messaging\Message;
interface CommandHandler
{
public function handle(Message $message): void;
@codeliner
codeliner / domain.md
Last active Aug 21, 2018
ES-Emergency-Call-Issue-7
View domain.md

System

[Supporting] RealtyRegistration

Building- > Entrance -> Appartement -> Contract

The business is about providing accountancy services to the owners of large buildings or organizations that take care of the building when each apartment is owned by a different person.

The first thing to add is a building, it's entrances (each entrance has a different address) and the apartments in the building.

@codeliner
codeliner / Event-Sourced-Saga.xml
Created Aug 1, 2018
ES-Emergency-Call-Issue-6 - draw.io diagram
View Event-Sourced-Saga.xml
<mxfile userAgent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/67.0.3396.99 Chrome/67.0.3396.99 Safari/537.36" version="9.0.1" editor="www.draw.io" type="device"><diagram id="bcd6b23c-19de-0d42-889d-0b111b864ca3" name="Page-1">7Vxbc6O4Ev41rpp5iIubMX7MZXzOqdqdk9qkancfZZBt1QBihZzE59efFhJXYYc4GDO7TiYDtIQk1N2fWt0NE/s+evsXQ8n2VxrgcGIZwdvEfphYlulYLhwEZS8pc9OThA0jgapUEp7I/7AiGoq6IwFOaxU5pSEnSZ3o0zjGPq/REGP0tV5tTcN6rwnaYI3w5KNQp/5OAr6VVM+al/R/Y7LZ5j2b7kKWrJD/Y8PoLlb9TSx7nf3I4gjlbakHTbcooK8Vkv1tYt8zSrk8i97ucSjmNp82ed/yQGkxboZj3uUGS97wgsIdzkfshnDrXZqgGM434vw3/NcOp/wR7SPRrqqxYnn5bRhSH3FC41QvvKdRhGA+VAGMpdq0mga+z6ceZiQRpzHlcLh73RKOnxLkC9orSBvQtjwK4coU3RTz/d8dD0mMFT3ljP7A9zSkLGvWdn0Pr9ZFSc5VGyhrEoaVmgHC3toXdBpzJZqmpa4r9ew78Qt0FJJNDDQf5gaz4pleMOP47SBfzILboEWYRpizPVRRN3gzeYfSH9NV8vJaSqOZK8u2Kom5YCGlAZui6VIK4EQJQrtQ2JpQKM4f5fPtZsPwBgHXtKKhmBy4K3fmdmEyaKTlX5rJ9sybXpLPzvt81nmpsAAHetG3l1Z0GIz788XKMLpxH7sX5747My7I+1kL8DfYhOPgVqyl4rlDlKbErzNGY8D9QvxqDLA+MNEwd2z/BxCN/OJPcQFqApdvhP+h+hbnZY
@codeliner
codeliner / ExcludeBlacklistedFiles.php
Last active Nov 3, 2017
proophessor-do message flow analyzed with prooph/message-flow-analyzer
View ExcludeBlacklistedFiles.php
<?php
declare(strict_types=1);
namespace Prooph\ProophessorDo\Infrastructure\ProophAnalyzer;
use Prooph\MessageFlowAnalyzer\Filter\FileInfoFilter;
final class ExcludeBlacklistedFiles implements FileInfoFilter
{
@codeliner
codeliner / OrgaState.php
Last active Sep 6, 2017
Workshop material
View OrgaState.php
<?php
declare(strict_types=1);
namespace App\Model\Organization;
final class OrgaState
{
public $orgaId;
public $orgaName;
@codeliner
codeliner / ReactTest.tsx
Created Aug 9, 2017
React TS app to reproduce TS inspection errors in PhpStorm
View ReactTest.tsx
import React from 'react'
interface ReactTestProps {foo: string, bar: string}
class ReactTest extends React.Component<ReactTestProps, {}> {
constructor(props: ReactTestProps) {
super(props)
}
}
View EventMachine_Example.postman_collection.json
{
"variables": [],
"info": {
"name": "EventMachine Example",
"_postman_id": "89698ba0-98f0-cc94-2f71-9f19c183e3f3",
"description": "",
"schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json"
},
"item": [
{
@codeliner
codeliner / CargoRouteListner.php
Last active Nov 20, 2018
getprooph.org sample snippet
View CargoRouteListner.php
<?php
declare(strict_types=1);
class CargoRouteListener extends ProcessManager
{
function listenOn(DestiniationWasChanged $event)
{
$rerouteCargo = RerouteCargo::to(
$event->newDestination(),
$event->cargoId()
You can’t perform that action at this time.