Skip to content

Commit

Permalink
Update Apiato.php
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohammad-Alavi committed Jan 11, 2025
1 parent a74deaf commit 818bdfb
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/Foundation/Apiato.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,15 @@ public static function inferBasePath(): string
};
}

/**
* Get the singleton instance of the class.
* TODO: add arch tests to make sure this method is only used in ApiatoServiceProvider
*/
public static function instance(): self
{
return self::$instance;
}

public function basePath(): string
{
return $this->basePath;
Expand Down Expand Up @@ -156,13 +165,6 @@ public function withProviders(string ...$path): self
return $this;
}

// TODO: add arch tests to make sure this method is only used in ApiatoServiceProvider

public static function instance(): self
{
return self::$instance;
}

public function providers(): array
{
$classMapper = new ClassMapGenerator();
Expand Down

0 comments on commit 818bdfb

Please sign in to comment.