Skip to content

Commit

Permalink
♻️ refactor method name show => list
Browse files Browse the repository at this point in the history
  • Loading branch information
fblaser committed Mar 17, 2024
1 parent 606c5af commit ffce638
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Catalog.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public function __construct(
public function create(string $catName): int
{
// Check if the Catalog name is valid.
if (in_array($catName, array_keys($this->show())) === true) {
if (in_array($catName, array_keys($this->list())) === true) {
throw new Exception('Catalog name already exists.');
}

Expand Down Expand Up @@ -162,7 +162,7 @@ public function getPort(string $catName): int
*
* @return int[] Named array with cat name and port.
*/
public function show(): array
public function list(): array
{
$catalogs = [];
$results = $this->connection->query('SHOW CATALOGS');
Expand Down

0 comments on commit ffce638

Please sign in to comment.