- Method::getExampleByType uses
$this->body which doesn't exist. It should use $this->bodyList instead.
$this->bodyList contains BodyInterface elements, but unfortunately BodyInterface is rather limited, so it's impossible to check if it has an example without widening the interface.
Since the same thing can be achieved without using this helper method, I suggest this method is removed (or fixed).