Skip to content

Commit 57f4cdd

Browse files
committed
fix: datatype issue
1 parent 0b88ec2 commit 57f4cdd

2 files changed

Lines changed: 4 additions & 10 deletions

File tree

src/Facade/Database.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
namespace Scrawler\Arca\Facade;
1515

1616
use Scrawler\Arca\Collection;
17-
use Scrawler\Arca\Connection;
1817
use Scrawler\Arca\Database as DB;
1918
use Scrawler\Arca\Factory\DatabaseFactory;
2019
use Scrawler\Arca\Model;
@@ -34,10 +33,6 @@ class Database
3433
*/
3534
public static function connect(array $connectionParams): DB
3635
{
37-
if(isset(self::$database)) {
38-
return self::$database;
39-
}
40-
4136
$factory = new DatabaseFactory();
4237
self::$database = $factory->build($connectionParams);
4338

src/QueryBuilder.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,9 @@ final class QueryBuilder extends DoctrineQueryBuilder
2323
{
2424
private string $table;
2525
/**
26-
* @var array<string>
26+
* @var AbstractSchemaManager
2727
*/
28-
29-
private readonly AbstractSchemaManager $SchemaManager;
28+
private readonly AbstractSchemaManager $schemaManager;
3029

3130
public function __construct(
3231
Connection $connection,
@@ -45,7 +44,7 @@ public function from(string $table, ?string $alias = null): QueryBuilder
4544

4645
public function get(): Collection
4746
{
48-
if (!$this->SchemaManager->tableExists($this->table)) {
47+
if (!$this->schemaManager->tableExists($this->table)) {
4948
return Collection::fromIterable([]);
5049
}
5150
$model = $this->modelManager->create($this->table);
@@ -57,7 +56,7 @@ public function get(): Collection
5756

5857
public function first(): ?Model
5958
{
60-
if (!$this->SchemaManager->tableExists($this->table)) {
59+
if (!$this->schemaManager->tableExists($this->table)) {
6160
return null;
6261
}
6362

0 commit comments

Comments
 (0)