Skip to content

Commit 051e433

Browse files
author
Mokhtar Tlili
committed
add cs and phpstan
1 parent 28a5516 commit 051e433

File tree

10 files changed

+16
-11
lines changed

10 files changed

+16
-11
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
/composer.lock
22
/vendor/
3-
/.idea
3+
/.idea
4+
.php-cs-fixer.cache

composer.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@
3131
"require-dev": {
3232
"phpunit/phpunit": "^9",
3333
"symfony/framework-bundle": "^4.4 || ^5.4 || ^6.0",
34-
"phpspec/prophecy-phpunit": "^2.0"
34+
"phpspec/prophecy-phpunit": "^2.0",
35+
"friendsofphp/php-cs-fixer": "^3.13",
36+
"phpstan/phpstan": "^1.9"
3537
},
3638
"autoload": {
3739
"psr-4": {
@@ -44,7 +46,9 @@
4446
}
4547
},
4648
"scripts": {
47-
"tests": "phpunit"
49+
"test": "vendor/bin/phpunit",
50+
"fix-cs": "vendor/bin/php-cs-fixer fix src/",
51+
"phpstan": "vendor/bin/phpstan analyse src tests"
4852
},
4953
"prefer-stable": true
5054
}

src/ArgumentResolver/InputArgumentResolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ public function resolve(Request $request, ArgumentMetadata $argument): iterable
3232
{
3333
yield $this->inputFactory->createFromRequest($request, $argument->getType(), $request->getContentType());
3434
}
35-
}
35+
}

src/DependencyInjection/RequestInputExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ public function load(array $configs, ContainerBuilder $container)
1616
$loader = new YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
1717
$loader->load('services.yaml');
1818
}
19-
}
19+
}

src/Exception/UnexpectedFormatException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88

99
class UnexpectedFormatException extends BadRequestHttpException
1010
{
11-
}
11+
}

src/Exception/ValidationException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ public function getViolationList(): ConstraintViolationListInterface
2222
{
2323
return $this->violationList;
2424
}
25-
}
25+
}

src/Factory/InputFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,4 @@ public function createFromRequest(Request $request, string $inputClass, string $
4848

4949
return $input;
5050
}
51-
}
51+
}

src/Factory/InputFactoryInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ interface InputFactoryInterface
1212
public const INPUT_FORMATS = ['json', 'xml', 'form'];
1313

1414
public function createFromRequest(Request $request, string $inputClass, string $format): InputInterface;
15-
}
15+
}

src/InputInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66

77
interface InputInterface
88
{
9-
}
9+
}

src/RequestInputBundle.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88

99
class RequestInputBundle extends Bundle
1010
{
11-
}
11+
}

0 commit comments

Comments
 (0)