Skip to content

Commit

Permalink
QA
Browse files Browse the repository at this point in the history
  • Loading branch information
koencaerels committed Jul 11, 2024
1 parent a181734 commit 74850c6
Show file tree
Hide file tree
Showing 33 changed files with 47 additions and 103 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/php_build_and_qa_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
steps:
- uses: shivammathur/setup-php@2cb9b829437ee246e9b3cac53555a39208ca6d28
with:
php-version: '8.2'
php-version: '8.3'

- uses: actions/checkout@v3

Expand Down
2 changes: 1 addition & 1 deletion application/YoshiKan/Application/QueryBus.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class QueryBus
use GetMemberTrait;

protected BasePermissionService $permission;
private const ADMIN = 1;
private const int ADMIN = 1;

// ——————————————————————————————————————————————————————————————————————————
// Constructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

class BasePermissionService
{
protected const NOT_ALLOWED_DATA = 'Action not allowed for this user.';
protected const NOT_ALLOWED_ROLE = 'Action not allowed for this user.';
protected const string NOT_ALLOWED_DATA = 'Action not allowed for this user.';
protected const string NOT_ALLOWED_ROLE = 'Action not allowed for this user.';

// ————————————————————————————————————————————————————————————————————
// Constructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ interface FederationRepository
{
public function nextIdentity(): Uuid;

public function save(Federation $model): ?int;
public function save(Federation $model): int;

public function delete(Federation $model): bool;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ interface GradeLogRepository
{
public function nextIdentity(): Uuid;

public function save(GradeLog $model): ?int;
public function save(GradeLog $model): int;

public function delete(GradeLog $model): bool;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ interface GradeRepository
{
public function nextIdentity(): Uuid;

public function save(Grade $model): ?int;
public function save(Grade $model): int;

public function delete(Grade $model): bool;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ interface GroupRepository
{
public function nextIdentity(): Uuid;

public function save(Group $model): ?int;
public function save(Group $model): int;

public function delete(Group $model): bool;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ interface LocationRepository
{
public function nextIdentity(): Uuid;

public function save(Location $model): ?int;
public function save(Location $model): int;

public function delete(Location $model): bool;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ interface MemberImageRepository
{
public function nextIdentity(): Uuid;

public function save(MemberImage $model): ?int;
public function save(MemberImage $model): int;

public function delete(MemberImage $model): bool;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ interface MemberRepository
{
public function nextIdentity(): Uuid;

public function save(Member $model): ?int;
public function save(Member $model): int;

public function delete(Member $model): bool;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ interface PeriodRepository
{
public function nextIdentity(): Uuid;

public function save(Period $model): ?int;
public function save(Period $model): int;

public function delete(Period $model): bool;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ interface SettingsRepository
{
public function nextIdentity(): Uuid;

public function save(Settings $model): ?int;
public function save(Settings $model): int;

public function delete(Settings $model): bool;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ interface SubscriptionItemRepository
{
public function nextIdentity(): Uuid;

public function save(SubscriptionItem $model): ?int;
public function save(SubscriptionItem $model): int;

public function delete(SubscriptionItem $model): bool;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ interface SubscriptionRepository
{
public function nextIdentity(): Uuid;

public function save(Subscription $model): ?int;
public function save(Subscription $model): int;

public function delete(Subscription $model): bool;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ interface MessageRepository
{
public function nextIdentity(): Uuid;

public function save(Message $model): ?int;
public function save(Message $model): int;

public function delete(Message $model): bool;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ interface JudogiRepository
{
public function nextIdentity(): Uuid;

public function save(Judogi $model): ?int;
public function save(Judogi $model): int;

public function delete(Judogi $model): bool;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ interface MemberAccessCodeRepository
{
public function nextIdentity(): Uuid;

public function save(MemberAccessCode $model): ?int;
public function save(MemberAccessCode $model): int;

public function delete(MemberAccessCode $model): bool;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,13 @@ public function nextIdentity(): Uuid
// Single entity functions
// —————————————————————————————————————————————————————————————————————————

public function save(Federation $model): ?int
public function save(Federation $model): int
{
$model->setChecksum();
$em = $this->getEntityManager();
$em->persist($model);
$id = 0;
if ($model->getId()) {
$id = $model->getId();
}

return $id;
return $model->getId() ?? 0;
}

public function delete(Federation $model): bool
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,13 @@ public function nextIdentity(): Uuid
// Single entity functions
// —————————————————————————————————————————————————————————————————————————

public function save(GradeLog $model): ?int
public function save(GradeLog $model): int
{
$model->setChecksum();
$em = $this->getEntityManager();
$em->persist($model);
$id = 0;
if ($model->getId()) {
$id = $model->getId();
}

return $id;
return $model->getId() ?? 0;
}

public function delete(GradeLog $model): bool
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,13 @@ public function nextIdentity(): Uuid
// Single entity functions
// —————————————————————————————————————————————————————————————————————————

public function save(Grade $model): ?int
public function save(Grade $model): int
{
$model->setChecksum();
$em = $this->getEntityManager();
$em->persist($model);
$id = 0;
if ($model->getId()) {
$id = $model->getId();
}

return $id;
return $model->getId() ?? 0;
}

public function delete(Grade $model): bool
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,13 @@ public function nextIdentity(): Uuid
// Single entity functions
// —————————————————————————————————————————————————————————————————————————

public function save(Group $model): ?int
public function save(Group $model): int
{
$model->setChecksum();
$em = $this->getEntityManager();
$em->persist($model);
$id = 0;
if ($model->getId()) {
$id = $model->getId();
}

return $id;
return $model->getId() ?? 0;
}

public function delete(Group $model): bool
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,13 @@ public function nextIdentity(): Uuid
// Single entity functions
// —————————————————————————————————————————————————————————————————————————

public function save(Location $model): ?int
public function save(Location $model): int
{
$model->setChecksum();
$em = $this->getEntityManager();
$em->persist($model);
$id = 0;
if ($model->getId()) {
$id = $model->getId();
}

return $id;
return $model->getId() ?? 0;
}

public function delete(Location $model): bool
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,13 @@ public function nextIdentity(): Uuid
// Single entity functions
// —————————————————————————————————————————————————————————————————————————

public function save(MemberImage $model): ?int
public function save(MemberImage $model): int
{
$model->setChecksum();
$em = $this->getEntityManager();
$em->persist($model);
$id = 0;
if ($model->getId()) {
$id = $model->getId();
}

return $id;
return $model->getId() ?? 0;
}

public function delete(MemberImage $model): bool
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,13 @@ public function nextIdentity(): Uuid
// Single entity functions
// —————————————————————————————————————————————————————————————————————————

public function save(Member $model): ?int
public function save(Member $model): int
{
$model->setChecksum();
$em = $this->getEntityManager();
$em->persist($model);
$id = 0;
if ($model->getId()) {
$id = $model->getId();
}

return $id;
return $model->getId() ?? 0;
}

public function delete(Member $model): bool
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,13 @@ public function nextIdentity(): Uuid
// Single entity functions
// —————————————————————————————————————————————————————————————————————————

public function save(Period $model): ?int
public function save(Period $model): int
{
$model->setChecksum();
$em = $this->getEntityManager();
$em->persist($model);
$id = 0;
if ($model->getId()) {
$id = $model->getId();
}

return $id;
return $model->getId() ?? 0;
}

public function delete(Period $model): bool
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,13 @@ public function nextIdentity(): Uuid
// Single entity functions
// —————————————————————————————————————————————————————————————————————————

public function save(Settings $model): ?int
public function save(Settings $model): int
{
$model->setChecksum();
$em = $this->getEntityManager();
$em->persist($model);
$id = 0;
if ($model->getId()) {
$id = $model->getId();
}

return $id;
return $model->getId() ?? 0;
}

public function delete(Settings $model): bool
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,13 @@ public function nextIdentity(): Uuid
// Single entity functions
// —————————————————————————————————————————————————————————————————————————

public function save(SubscriptionItem $model): ?int
public function save(SubscriptionItem $model): int
{
$model->setChecksum();
$em = $this->getEntityManager();
$em->persist($model);
$id = 0;
if ($model->getId()) {
$id = $model->getId();
}

return $id;
return $model->getId() ?? 0;
}

public function delete(SubscriptionItem $model): bool
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,13 @@ public function nextIdentity(): Uuid
// Single entity functions
// —————————————————————————————————————————————————————————————————————————

public function save(Subscription $model): ?int
public function save(Subscription $model): int
{
$model->setChecksum();
$em = $this->getEntityManager();
$em->persist($model);
$id = 0;
if ($model->getId()) {
$id = $model->getId();
}

return $id;
return $model->getId() ?? 0;
}

public function delete(Subscription $model): bool
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,13 @@ public function nextIdentity(): Uuid
// Single entity functions
// —————————————————————————————————————————————————————————————————————————

public function save(Message $model): ?int
public function save(Message $model): int
{
$model->setChecksum();
$em = $this->getEntityManager();
$em->persist($model);
$id = 0;
if ($model->getId()) {
$id = $model->getId();
}

return $id;
return $model->getId() ?? 0;
}

public function delete(Message $model): bool
Expand Down
Loading

0 comments on commit 74850c6

Please sign in to comment.