public function apply($condition, callable $onMatch = null) : self
    {
         if (!is_callable($condition)) {
            if (!$condition instanceof Condition) {
                throw new \InvalidArgumentException('Expected a \nyx\diagnostics\Condition or a callable as first argument, got ['.diagnostics\Debug::getTypeName($condition).'] instead.');
            }

            $this->conditions[] = $condition;
        } else {
            // Both parameters are/should be callables.
            if (null === $onMatch) {
                throw new \InvalidArgumentException('A callable must be given as second parameter when the first is also a callable.');
            }

            $this->conditions[] = [
                'matcher' => $condition,
                'onMatch' => $onMatch
            ];
        }

        return $this;
    }