diff --git a/src/Info/BranchInfos.php b/src/Info/BranchInfos.php index 08faa18..c9a7201 100644 --- a/src/Info/BranchInfos.php +++ b/src/Info/BranchInfos.php @@ -124,18 +124,6 @@ public function parse(): self return $this; } - /** - * @param string $name - * - * @return BranchInfo|null - */ - public function findOne(string $name): ?BranchInfo - { - $list = $this->search($name); - - return $list ? $list[0] : null; - } - /** * @param string $kw * @param int $limit @@ -176,7 +164,7 @@ public function search(string $kw, int $limit = 3): array * * @return BranchInfo|null */ - public function getBranchInfo(string $name, string $from = self::FROM_LOCAL): ?BranchInfo + public function getByName(string $name, string $from = self::FROM_LOCAL): ?BranchInfo { if ($from === self::FROM_LOCAL) { return $this->localBranches[$name] ?? null; diff --git a/src/Repo.php b/src/Repo.php index 561732a..983eac4 100644 --- a/src/Repo.php +++ b/src/Repo.php @@ -341,7 +341,7 @@ public function getBranchInfo(string $name, string $remote = ''): BranchInfo $name = $remote . '/' . $name; } - return $bis->getBranchInfo($name, $from); + return $bis->getByName($name, $from); } /**