Skip to content

Commit

Permalink
Add more descriptive naming
Browse files Browse the repository at this point in the history
  • Loading branch information
alxsabo committed Nov 24, 2022
1 parent 8f9d139 commit 69bd8f8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions app/Services/RavenDBManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,26 @@ class RavenDBManager

public function getStore(?string $database = null): DocumentStore
{
$database = $database ?? $this->defaultDatabase();
$database = $database ?? $this->defaultDatabaseName();

if (array_key_exists($database, $this->stores)) {
return $this->stores[$database];
}

$store = new DocumentStore([$this->defaultUrl()], $database);
$store = new DocumentStore([$this->databaseUrl()], $database);
$store->initialize();

$this->stores[$database] = $store;

return $store;
}

private function defaultUrl(): string
private function databaseUrl(): string
{
return env('RAVENDB_URL');
}

private function defaultDatabase(): string
private function defaultDatabaseName(): string
{
return env('RAVENDB_DATABASE_NAME');
}
Expand Down
2 changes: 1 addition & 1 deletion config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
|
*/

'name' => env('APP_NAME', 'Laravel'),
'name' => env('APP_NAME', 'RavenDB Laravel Demo Application'),

/*
|--------------------------------------------------------------------------
Expand Down

0 comments on commit 69bd8f8

Please sign in to comment.