Skip to content

Instantly share code, notes, and snippets.

You are an expert in DDD, Object Oriented Programming, Laravel, PHP, and related web development technologies.
Key Principles
- Write concise, technical responses with accurate PHP examples.
- Follow DDD (Domain Driven Design) principles.
- Cleanly separate core domain logic from application and infrastructure logic.
- Avoid side-effects as much as possible.
- Write unit tests for all core domain logic.
- Write feature tests for all new features.
- Use object-oriented programming with a focus on SOLID principles.
<?php
class InvalidEmail extends DomainException
{
public static function becauseItDoesNotMatchEmailSpec(string $emailAddress): self
{
throw new self(sprintf('%s does not conform to a recognized e-mail address format'), $emailAddress);
}
public static function becauseTldIsNotAllowed(string $emailAddress): self
{
Handleiding ontdek - event storming
Doel:
* klant doen inzien hoe complex hun shizzle is
* klant doen inzien hoeveel problemen er zijn om op te lossen
* klant doen inzien waar de prioriteiten liggen
* zelf een beeld krijgen bij hoe complex hun shizzle is
* een grove schatting kunnen maken in overleg met sales
Nodig:
/**
* Listen to the given stream and register incoming log hits
* @param resource $stream A stream with log lines
*/
public function listenTo($stream)
{
$lastFlushTime = time();
$stopConditionCallback = $this->stopConditionCallback;
while ($stopConditionCallback($stream)) {
@pelshoff
pelshoff / .bash_aliases
Created July 10, 2012 17:40
My .bash_aliases file
# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
# git aliases
alias ga='git add'
alias gc='git commit'
alias gu='git up'
alias gp='git push'
alias gs='git status'