Skip to content

Commit d6b77aa

Browse files
committed
Config: fix code style violations in src
https://claude.ai/code/session_01VHxTGscLF36vtGBcPXfThi
1 parent 48c8d87 commit d6b77aa

5 files changed

Lines changed: 12 additions & 18 deletions

File tree

src/DI/NextrasQueryObjectExtension.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ public function beforeCompile(): void
3131
{
3232
$builder = $this->getContainerBuilder();
3333

34-
foreach ($builder->findByType(Repository::class) as $name => $def) {
34+
foreach ($builder->findByType(Repository::class) as $def) {
3535
$def->addTag(InjectExtension::TagInject);
3636
}
3737

38-
foreach ($builder->findByType(Mapper::class) as $name => $def) {
38+
foreach ($builder->findByType(Mapper::class) as $def) {
3939
$def->addTag(InjectExtension::TagInject);
4040
}
4141
}

src/ExecutableQueryObject.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
abstract class ExecutableQueryObject extends QueryObject
99
{
1010

11-
/** @var Connection */
12-
protected $connection;
11+
protected Connection $connection;
1312

1413
public function __construct(Connection $connection)
1514
{

src/QueryObject.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@
77
abstract class QueryObject implements Queryable
88
{
99

10-
protected function postQuery(QueryBuilder $builder): QueryBuilder
11-
{
12-
return $builder;
13-
}
14-
1510
public function fetch(QueryBuilder $builder): QueryBuilder
1611
{
1712
// Build query
@@ -23,4 +18,9 @@ public function fetch(QueryBuilder $builder): QueryBuilder
2318
return $qb;
2419
}
2520

21+
protected function postQuery(QueryBuilder $builder): QueryBuilder
22+
{
23+
return $builder;
24+
}
25+
2626
}

src/QueryObjectContextAwareManager.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
class QueryObjectContextAwareManager implements QueryObjectManager
1111
{
1212

13-
/** @var Container */
14-
protected $context;
13+
protected Container $context;
1514

1615
public function __construct(Container $context)
1716
{
@@ -45,7 +44,7 @@ public function create(string $class): QueryObject
4544
$obj = $this->context->getByType($class);
4645

4746
if (!($obj instanceof QueryObject)) {
48-
throw new InvalidObjectCreationException(sprintf('Created object must be typed of %s, type of %s given.', QueryObject::class, get_class($obj)));
47+
throw new InvalidObjectCreationException(sprintf('Created object must be typed of %s, type of %s given.', QueryObject::class, $obj::class));
4948
}
5049

5150
return $obj;

src/Repository/TRepositoryQueryable.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,14 @@
1313
trait TRepositoryQueryable
1414
{
1515

16-
/** @var Connection */
17-
protected $connection;
16+
protected Connection $connection;
1817

1918
public function injectConnection(Connection $connection): void
2019
{
2120
$this->connection = $connection;
2221
}
2322

24-
/**
25-
* @return Result|IEntity
26-
*/
27-
public function fetch(QueryObject $queryObject, int $hydrationMode = Queryable::HYDRATION_RESULTSET)
23+
public function fetch(QueryObject $queryObject, int $hydrationMode = Queryable::HYDRATION_RESULTSET): Result|IEntity
2824
{
2925
$qb = $queryObject->fetch($this->connection->createQueryBuilder());
3026

0 commit comments

Comments
 (0)