Skip to content

Commit 8f8f4e0

Browse files
committed
Continued with revision for PR#87
1 parent c16d5e3 commit 8f8f4e0

10 files changed

Lines changed: 127 additions & 81 deletions

File tree

composer.lock

Lines changed: 39 additions & 39 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Adapter/Driver/Pdo/Result.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace PhpDb\Adapter\Driver\Pdo;
46

57
use Closure;

src/Adapter/Profiler/Profiler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class Profiler implements ProfilerInterface
2424
* @throws InvalidArgumentException
2525
* @return $this Provides a fluent interface
2626
*/
27-
public function profilerStart(string|StatementContainerInterface $target): static
27+
public function profilerStart(string|StatementContainerInterface $target): ProfilerInterface
2828
{
2929
$profileInformation = [
3030
'sql' => '',
@@ -52,7 +52,7 @@ public function profilerStart(string|StatementContainerInterface $target): stati
5252
/**
5353
* @return $this Provides a fluent interface
5454
*/
55-
public function profilerFinish(): static
55+
public function profilerFinish(): ProfilerInterface
5656
{
5757
if (! isset($this->profiles[$this->currentIndex])) {
5858
throw new Exception\RuntimeException(

src/Adapter/Profiler/ProfilerInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
interface ProfilerInterface
1010
{
11-
public function profilerStart(string|StatementContainerInterface $target): mixed;
11+
public function profilerStart(string|StatementContainerInterface $target): ProfilerInterface;
1212

1313
/**
1414
* @return $this

src/Metadata/Object/ConstraintKeyObject.php

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,15 @@
66

77
class ConstraintKeyObject
88
{
9-
public const FK_CASCADE = 'CASCADE';
9+
final public const FK_CASCADE = 'CASCADE';
1010

11-
public const FK_SET_NULL = 'SET NULL';
11+
final public const FK_SET_NULL = 'SET NULL';
1212

13-
public const FK_NO_ACTION = 'NO ACTION';
13+
final public const FK_NO_ACTION = 'NO ACTION';
1414

15-
public const FK_RESTRICT = 'RESTRICT';
15+
final public const FK_RESTRICT = 'RESTRICT';
1616

17-
public const FK_SET_DEFAULT = 'SET DEFAULT';
18-
19-
protected string $columnName;
17+
final public const FK_SET_DEFAULT = 'SET DEFAULT';
2018

2119
protected ?int $ordinalPosition = null;
2220

@@ -35,9 +33,8 @@ class ConstraintKeyObject
3533
/**
3634
* Constructor
3735
*/
38-
public function __construct(string $column)
36+
public function __construct(protected string $columnName)
3937
{
40-
$this->setColumnName($column);
4138
}
4239

4340
/**

src/Metadata/Source/AbstractSource.php

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,6 @@ public function getTables(?string $schema = null, bool $includeViews = false): a
119119
return $tables;
120120
}
121121

122-
/**
123-
* {}
124-
*/
125122
#[Override]
126123
public function getTable(string $tableName, ?string $schema = null): TableObject|ViewObject
127124
{
@@ -197,9 +194,7 @@ public function getViews(?string $schema = null): array
197194
return $views;
198195
}
199196

200-
/**
201-
* {}
202-
*/
197+
203198
#[Override]
204199
public function getView(string $viewName, ?string $schema = null): ViewObject|TableObject
205200
{
@@ -217,9 +212,6 @@ public function getView(string $viewName, ?string $schema = null): ViewObject|Ta
217212
throw new Exception('View "' . $viewName . '" does not exist');
218213
}
219214

220-
/**
221-
* {}
222-
*/
223215
#[Override]
224216
public function getColumnNames(string $table, ?string $schema = null): array
225217
{
@@ -256,9 +248,6 @@ public function getColumns(string $table, ?string $schema = null): array
256248
return $columns;
257249
}
258250

259-
/**
260-
* {}
261-
*/
262251
#[Override]
263252
public function getColumn(string $columnName, string $table, ?string $schema = null): ColumnObject
264253
{
@@ -310,9 +299,6 @@ public function getConstraints(string $table, ?string $schema = null): array
310299
return $constraints;
311300
}
312301

313-
/**
314-
* {}
315-
*/
316302
#[Override]
317303
public function getConstraint(
318304
string $constraintName,
@@ -427,9 +413,6 @@ public function getTriggers(?string $schema = null): array
427413
return $triggers;
428414
}
429415

430-
/**
431-
* {}
432-
*/
433416
#[Override]
434417
public function getTrigger(string $triggerName, ?string $schema = null): TriggerObject
435418
{

0 commit comments

Comments
 (0)