Skip to content

Commit 04d4241

Browse files
authored
Merge pull request #35 from tbreuss/develop
Develop
2 parents 4e9d74b + 06017d8 commit 04d4241

22 files changed

Lines changed: 52 additions & 2 deletions

File tree

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ charset = utf-8
99
indent_style = space
1010
indent_size = 4
1111

12-
[*.{html,json,twig}]
12+
[*.{html,json,neon,twig}]
1313
indent_style = space
1414
indent_size = 2

.github/workflows/cicd.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ jobs:
3030
run: composer install --no-progress --prefer-dist --optimize-autoloader
3131
- name: Test coding style
3232
run: bin/coding-style.sh
33+
- name: Run static code analysis
34+
run: bin/code-analysis.sh
3335
- name: Run functional tests
3436
run: bin/functional.sh localhost:9876
3537
- name: Run website tests

bin/code-analysis.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/sh
2+
# Run static code analysis against a Docker container
3+
4+
set -eu
5+
6+
docker run --rm -v .:/app ghcr.io/phpstan/phpstan analyse

phpstan.neon

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
parameters:
2+
level: 5
3+
paths:
4+
- .
5+
excludePaths:
6+
- **/vendor/**
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php declare(strict_types=1);
22

3+
/** @var tebe\zack\routing\PhpRouteHandler $this */
4+
35
return $this->html('articles/comments.html.twig', [
46
'title' => 'GET: Articles.[id].Comments.Php',
57
]);
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php declare(strict_types=1);
22

3+
/** @var tebe\zack\routing\PhpRouteHandler $this */
4+
35
return $this->html('articles/detail.html.twig', [
46
'title' => 'GET: Articles.[id].Php',
57
]);
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php declare(strict_types=1);
22

3+
/** @var tebe\zack\routing\PhpRouteHandler $this */
4+
35
return $this->html('articles/list.html.twig', [
46
'title' => 'GET: Articles.Php',
57
]);

tests/_data/routes/doc-examples/hello/[name].php

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

3+
/** @var Symfony\Component\HttpFoundation\Request $request */
4+
35
use Symfony\Component\HttpFoundation\Response;
46

57
$name = $request->attributes->get('name');

tests/_data/routes/doc-examples/hello/[name]/[age].php

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

3+
/** @var Symfony\Component\HttpFoundation\Request $request */
4+
35
use Symfony\Component\HttpFoundation\Response;
46

57
$name = $request->attributes->get('name');
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
<?php declare(strict_types=1);
22

3+
/** @var Symfony\Component\HttpFoundation\Request $request */
4+
35
use Symfony\Component\HttpFoundation\Response;
46

57
$name = $request->attributes->get('name');
68

7-
return new Response("Hello ${name}!", 200);
9+
return new Response("Hello $name!", 200);

0 commit comments

Comments
 (0)