public function addResponse(ResponseDeclaration $response) { $this->responses[$response->getSerial()] = $response; $response->setRelatedItem($this); }