Specification
Implementation of the specification pattern in PHP
Install / Use
/learn @rikbruil/SpecificationREADME
Specification
PHP implementation of the Specification pattern
Usage
$overDue = new OverDueSpecification();
$noticeSent = new NoticeSentSpecification();
$inCollection = new InCollectionSpecification();
// example of specification pattern logic chaining
$sendToCollection = $overDue->andX($noticeSent)
->not($inCollection);
foreach ($service->getInvoices() as $currentInvoice) {
if (! $sendToCollection->isSatisfiedBy($currentInvoice)) {
continue;
}
$currentInvoice->sendToCollection();
}
Requirements
- PHP 5.3+
License
Specification is licensed under the MIT License - see the LICENSE file for details
Related Skills
product-manager-skills
34PM skill for Claude Code, Codex, Cursor, and Windsurf: diagnose SaaS metrics, critique PRDs, plan roadmaps, run discovery, and coach PM career transitions.
devplan-mcp-server
3MCP server for generating development plans, project roadmaps, and task breakdowns for Claude Code. Turn project ideas into paint-by-numbers implementation plans.

