Skip to content

Commit 006f198

Browse files
committed
added common connection configuration
1 parent 70b336f commit 006f198

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed
File renamed without changes.

src/Bolt/StateTransitionRepository.php renamed to src/Bolt/ServerStateTransitionRepository.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,22 @@ final class StateTransitionRepository
8585
/** @var list<StateTransition> */
8686
private array $transitions;
8787

88-
public function __construct()
88+
private function __construct()
8989
{
9090
$this->transitions = array_map(static fn ($x) => StateTransition::fromArray($x), self::TRANSITIONS);
9191
}
9292

93+
private static ?self $instance = null;
94+
95+
public static function getInstance(): self
96+
{
97+
if (self::$instance === null) {
98+
self::$instance = new self();
99+
}
100+
101+
return self::$instance;
102+
}
103+
93104
/**
94105
* @return array<string, string|null>
95106
*/
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?php
2+
3+
namespace Laudis\Neo4j\Common;
4+
5+
class ConnectionConfiguration
6+
{
7+
8+
}

0 commit comments

Comments
 (0)