public function getBranch(string $name)
    {
        /** @var Branch $branch */
        foreach ($this->getBranches() as $branch) {
            if ($branch->getName() === $name) {
                return $branch;
            }
        }

        return null;
    }