-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2da02ff
commit 91d761b
Showing
44 changed files
with
340 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace DataAccessKit\Repository\Fixture; | ||
|
||
use DataAccessKit\Attribute\Column; | ||
use DataAccessKit\Attribute\Table; | ||
|
||
#[Table] | ||
class Bar | ||
{ | ||
#[Column(primary: true, generated: true)] | ||
public int $id; | ||
|
||
#[Column] | ||
public string $title; | ||
} |
11 changes: 11 additions & 0 deletions
11
data-access-kit/test/Repository/Fixture/CountBadParameterNameRepositoryInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace DataAccessKit\Repository\Fixture; | ||
|
||
use DataAccessKit\Repository\Attribute\Repository; | ||
|
||
#[Repository(Foo::class)] | ||
interface CountBadParameterNameRepositoryInterface | ||
{ | ||
public function countByTitle(string $tytle): int; | ||
} |
11 changes: 11 additions & 0 deletions
11
data-access-kit/test/Repository/Fixture/CountBadReturnTypeRepositoryInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace DataAccessKit\Repository\Fixture; | ||
|
||
use DataAccessKit\Repository\Attribute\Repository; | ||
|
||
#[Repository(Foo::class)] | ||
interface CountBadReturnTypeRepositoryInterface | ||
{ | ||
public function countByTitle(string $title): Foo; | ||
} |
13 changes: 13 additions & 0 deletions
13
data-access-kit/test/Repository/Fixture/DelegateClassDoesNotExistRepositoryInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace DataAccessKit\Repository\Fixture; | ||
|
||
use DataAccessKit\Repository\Attribute\Delegate; | ||
use DataAccessKit\Repository\Attribute\Repository; | ||
|
||
#[Repository(Foo::class)] | ||
interface DelegateClassDoesNotExistRepositoryInterface | ||
{ | ||
#[Delegate('This\Class\Does\Not\Exist')] | ||
public function foo(); | ||
} |
13 changes: 13 additions & 0 deletions
13
data-access-kit/test/Repository/Fixture/DelegateMethodDoesNotExistRepositoryInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace DataAccessKit\Repository\Fixture; | ||
|
||
use DataAccessKit\Repository\Attribute\Delegate; | ||
use DataAccessKit\Repository\Attribute\Repository; | ||
|
||
#[Repository(Foo::class)] | ||
interface DelegateMethodDoesNotExistRepositoryInterface | ||
{ | ||
#[Delegate(DeepThought::class, method: "thisMethodDoesNotExist")] | ||
public function computeTheAnswer(): int; | ||
} |
13 changes: 13 additions & 0 deletions
13
data-access-kit/test/Repository/Fixture/EmptyFileNameSQLFileRepositoryInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace DataAccessKit\Repository\Fixture; | ||
|
||
use DataAccessKit\Repository\Attribute\Repository; | ||
use DataAccessKit\Repository\Attribute\SQLFile; | ||
|
||
#[Repository(Foo::class)] | ||
interface EmptyFileNameSQLFileRepositoryInterface | ||
{ | ||
#[SQLFile("")] | ||
public function findByTitle(string $title): iterable; | ||
} |
13 changes: 13 additions & 0 deletions
13
data-access-kit/test/Repository/Fixture/FileDoesNotExistSQLFileRepositoryInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace DataAccessKit\Repository\Fixture; | ||
|
||
use DataAccessKit\Repository\Attribute\Repository; | ||
use DataAccessKit\Repository\Attribute\SQLFile; | ||
|
||
#[Repository(Foo::class)] | ||
interface FileDoesNotExistSQLFileRepositoryInterface | ||
{ | ||
#[SQLFile(file: __DIR__ . "/file-does-not-exist.sql")] | ||
public function findByTitle(string $title): iterable; | ||
} |
11 changes: 11 additions & 0 deletions
11
data-access-kit/test/Repository/Fixture/FindBadParameterNameRepositoryInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace DataAccessKit\Repository\Fixture; | ||
|
||
use DataAccessKit\Repository\Attribute\Repository; | ||
|
||
#[Repository(Foo::class)] | ||
interface FindBadParameterNameRepositoryInterface | ||
{ | ||
public function findByTitle(string $tytle): iterable; | ||
} |
11 changes: 11 additions & 0 deletions
11
data-access-kit/test/Repository/Fixture/FindBadReturnTypeRepositoryInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace DataAccessKit\Repository\Fixture; | ||
|
||
use DataAccessKit\Repository\Attribute\Repository; | ||
|
||
#[Repository(Foo::class)] | ||
interface FindBadReturnTypeRepositoryInterface | ||
{ | ||
public function findByTitle(string $title): int; | ||
} |
13 changes: 13 additions & 0 deletions
13
data-access-kit/test/Repository/Fixture/MacroColumnsExceptAllColumnRepositoryInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace DataAccessKit\Repository\Fixture; | ||
|
||
use DataAccessKit\Repository\Attribute\Repository; | ||
use DataAccessKit\Repository\Attribute\SQL; | ||
|
||
#[Repository(Foo::class)] | ||
interface MacroColumnsExceptAllColumnRepositoryInterface | ||
{ | ||
#[SQL("SELECT %columns(except id, title, description) FROM foos")] | ||
public function allColumnsExcept(): iterable; | ||
} |
13 changes: 13 additions & 0 deletions
13
...access-kit/test/Repository/Fixture/MacroColumnsExceptUnknownColumnRepositoryInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace DataAccessKit\Repository\Fixture; | ||
|
||
use DataAccessKit\Repository\Attribute\Repository; | ||
use DataAccessKit\Repository\Attribute\SQL; | ||
|
||
#[Repository(Foo::class)] | ||
interface MacroColumnsExceptUnknownColumnRepositoryInterface | ||
{ | ||
#[SQL("SELECT %columns(except non_existent_column) FROM foos")] | ||
public function allColumnsExcept(): iterable; | ||
} |
13 changes: 13 additions & 0 deletions
13
data-access-kit/test/Repository/Fixture/MacroUnknownRepositoryInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace DataAccessKit\Repository\Fixture; | ||
|
||
use DataAccessKit\Repository\Attribute\Repository; | ||
use DataAccessKit\Repository\Attribute\SQL; | ||
|
||
#[Repository(Foo::class)] | ||
interface MacroUnknownRepositoryInterface | ||
{ | ||
#[SQL("SELECT %clonums FROM foos")] | ||
public function allColumns(): iterable; | ||
} |
15 changes: 15 additions & 0 deletions
15
data-access-kit/test/Repository/Fixture/MultipleMethodAttributesRepositoryInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace DataAccessKit\Repository\Fixture; | ||
|
||
use DataAccessKit\Repository\Attribute\Find; | ||
use DataAccessKit\Repository\Attribute\Repository; | ||
use DataAccessKit\Repository\Attribute\SQL; | ||
|
||
#[Repository(Foo::class)] | ||
interface MultipleMethodAttributesRepositoryInterface | ||
{ | ||
#[SQL("SELECT * FROM foos WHERE title = @title")] | ||
#[Find(where: "title = @title")] | ||
public function findByTitle(string $title): iterable; | ||
} |
11 changes: 11 additions & 0 deletions
11
data-access-kit/test/Repository/Fixture/UnhandledMethodRepositoryInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace DataAccessKit\Repository\Fixture; | ||
|
||
use DataAccessKit\Repository\Attribute\Repository; | ||
|
||
#[Repository(Foo::class)] | ||
interface UnhandledMethodRepositoryInterface | ||
{ | ||
public function unhandled(): void; | ||
} |
Oops, something went wrong.