/** * Override parent method with new body * * @param string $methodName Method name to override * @param string $body New body for method * * @return static */ public function override($methodName, $body) { $this->methodsCode[$methodName] = $this->getOverriddenMethod($this->class->getMethod($methodName), $body); return $this; }