Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/codesniffer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: "Codesniffer"

on:
pull_request:

push:
branches: ["*"]

schedule:
- cron: "0 8 * * 1"

jobs:
codesniffer:
name: "Codesniffer"
uses: contributte/.github/.github/workflows/codesniffer.yml@v1
with:
php: "8.4"
193 changes: 0 additions & 193 deletions .github/workflows/main.yaml

This file was deleted.

18 changes: 18 additions & 0 deletions .github/workflows/phpstan.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: "Phpstan"

on:
pull_request:

push:
branches: ["*"]

schedule:
- cron: "0 8 * * 1"

jobs:
phpstan:
name: "Phpstan"
uses: contributte/.github/.github/workflows/phpstan.yml@v1
with:
php: "8.4"
make: "init phpstan"
18 changes: 18 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: "Tester"

on:
pull_request:

push:
branches: ["*"]

schedule:
- cron: "0 8 * * 1"

jobs:
tester:
name: "Tester"
uses: contributte/.github/.github/workflows/tester.yml@v1
with:
php: "8.4"
make: "init tests"
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
############################################################
# PROJECT ##################################################
############################################################
.PHONY: project install setup clean
.PHONY: project install setup clean init

project: install setup

init: install setup

install:
composer install

Expand All @@ -30,7 +32,7 @@ csf:
vendor/bin/codefixer app tests

phpstan:
vendor/bin/phpstan analyse -c phpstan.neon --memory-limit=512M app tests/toolkit
vendor/bin/phpstan analyse --memory-limit=512M

tests:
vendor/bin/tester -s -p php --colors 1 -C tests
Expand Down
5 changes: 2 additions & 3 deletions app/Controllers/AbstractController.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<?php

declare(strict_types=1);
<?php declare(strict_types = 1);

namespace App\Controllers;

Expand All @@ -16,4 +14,5 @@ public function __construct(ApiResponseFormatter $apiResponseFormatter)
{
$this->apiResponseFormatter = $apiResponseFormatter;
}

}
5 changes: 2 additions & 3 deletions app/Controllers/ErrorController.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<?php

declare(strict_types=1);
<?php declare(strict_types = 1);

namespace App\Controllers;

Expand All @@ -23,4 +21,5 @@ public function run(Request $request): Response

return new JsonResponse($this->apiResponseFormatter->formatException($exception));
}

}
5 changes: 2 additions & 3 deletions app/Controllers/LoginController.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<?php

declare(strict_types=1);
<?php declare(strict_types = 1);

namespace App\Controllers;

Expand Down Expand Up @@ -28,4 +26,5 @@ public function run(Request $request): Response
{
return new JsonResponse($this->apiResponseFormatter->formatMessage('Hello'));
}

}
5 changes: 2 additions & 3 deletions app/Controllers/PingController.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<?php

declare(strict_types=1);
<?php declare(strict_types = 1);

namespace App\Controllers;

Expand Down Expand Up @@ -28,4 +26,5 @@ public function run(Request $request): Response
{
return new TextResponse('pong');
}

}
5 changes: 2 additions & 3 deletions app/Http/ApiResponseFormatter.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<?php

declare(strict_types=1);
<?php declare(strict_types = 1);

namespace App\Http;

Expand Down Expand Up @@ -45,4 +43,5 @@ public function formatException(Throwable $e): array
'message' => $e->getMessage(),
];
}

}
5 changes: 2 additions & 3 deletions app/Routing/RouterFactory.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<?php

declare(strict_types=1);
<?php declare(strict_types = 1);

namespace App\Routing;

Expand All @@ -13,4 +11,5 @@ public function create(): RouteList
{
return new RouteList();
}

}
4 changes: 1 addition & 3 deletions app/bootstrap.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<?php

declare(strict_types=1);
<?php declare(strict_types = 1);

use Contributte\Bootstrap\ExtraConfigurator;

Expand Down
Loading