File tree Expand file tree Collapse file tree 12 files changed +24
-20
lines changed
Expand file tree Collapse file tree 12 files changed +24
-20
lines changed Original file line number Diff line number Diff line change 2727 run : composer install --no-progress --prefer-dist --optimize-autoloader
2828 - name : phpunit
2929 run : php vendor/bin/phpunit
30-
30+ - name : phpcs
31+ run : php vendor/bin/phpcs
Original file line number Diff line number Diff line change 1212 },
1313 "require-dev" : {
1414 "doctrine/annotations" : " ^1.0" ,
15- "hostnet/phpcs-tool" : " ^8.3 " ,
15+ "hostnet/phpcs-tool" : " ^9.1.0 " ,
1616 "phpunit/phpunit" : " ^9.5.5" ,
1717 "sensio/framework-extra-bundle" : " 3.*|^5.0" ,
1818 "symfony/browser-kit" : " ^4.0|^5.0" ,
4141 " test/Functional/Fixtures/TestKernel.php"
4242 ]
4343 },
44+ "config" : {
45+ "allow-plugins" : {
46+ "hostnet/*" : true ,
47+ "dealerdirect/phpcodesniffer-composer-installer" : false
48+ }
49+ },
4450 "archive" : {
4551 "exclude" : [
4652 " /test"
Original file line number Diff line number Diff line change 44 <exclude-pattern >test/Functional/Fixtures/TestKernel.php</exclude-pattern >
55
66 <!-- Use the Hostnet code conventions -->
7- <rule ref =" Hostnet" />
7+ <rule ref =" Hostnet-Level-1 " />
88</ruleset >
Original file line number Diff line number Diff line change 55 <directory >src</directory >
66 </include >
77 </coverage >
8- <listeners >
9- <listener class =" Symfony\Bridge\PhpUnit\SymfonyTestsListener" />
10- </listeners >
118 <testsuites >
129 <testsuite name =" hostnet/form-handler-bundle test suite" >
1310 <directory >./test</directory >
Original file line number Diff line number Diff line change 1818
1919class FullFormHandler implements HandlerTypeInterface, ActionSubscriberInterface
2020{
21- public function configure (HandlerConfigInterface $ config )
21+ public function configure (HandlerConfigInterface $ config ): void
2222 {
2323 $ config ->setType (TestType::class);
2424 $ config ->registerActionSubscriber ($ this );
Original file line number Diff line number Diff line change 1717
1818class FullFormHandler27 implements HandlerTypeInterface, ActionSubscriberInterface
1919{
20- public function configure (HandlerConfigInterface $ config )
20+ public function configure (HandlerConfigInterface $ config ): void
2121 {
2222 $ config ->setType ('test ' );
2323 $ config ->registerActionSubscriber ($ this );
Original file line number Diff line number Diff line change 1212
1313class SimpleFormHandler implements HandlerTypeInterface
1414{
15- public function configure (HandlerConfigInterface $ config )
15+ public function configure (HandlerConfigInterface $ config ): void
1616 {
1717 $ config ->setType (TestType::class);
1818 }
Original file line number Diff line number Diff line change 1212
1313class SimpleNotTaggedFormHandler implements HandlerTypeInterface
1414{
15- public function configure (HandlerConfigInterface $ config )
15+ public function configure (HandlerConfigInterface $ config ): void
1616 {
1717 $ config ->setType (TestType::class);
1818 }
Original file line number Diff line number Diff line change @@ -40,15 +40,15 @@ public static function getLegacyConfigFilename()
4040 return 'config_27.yml ' ;
4141 }
4242
43- public function getProjectDir ()
43+ public function getProjectDir (): string
4444 {
4545 return __DIR__ ;
4646 }
4747
4848 /**
4949 * {@inheritdoc}
5050 */
51- public function registerBundles ()
51+ public function registerBundles (): iterable
5252 {
5353 return array (
5454 new \Symfony \Bundle \FrameworkBundle \FrameworkBundle (),
@@ -75,15 +75,15 @@ protected function prepareContainer(ContainerBuilder $container)
7575 /**
7676 * {@inheritdoc}
7777 */
78- public function getCacheDir ()
78+ public function getCacheDir (): string
7979 {
8080 return __DIR__ .'/../../../var/cache/ ' .md5 ($ this ->getEnvironment ().$ this ->config_file );
8181 }
8282
8383 /**
8484 * {@inheritdoc}
8585 */
86- public function getLogDir ()
86+ public function getLogDir (): string
8787 {
8888 return __DIR__ .'/../../../var/logs ' ;
8989 }
Original file line number Diff line number Diff line change 1313
1414class TestType extends AbstractType
1515{
16- public function buildForm (FormBuilderInterface $ builder , array $ options )
16+ public function buildForm (FormBuilderInterface $ builder , array $ options ): void
1717 {
1818 $ builder ->add ('test ' , TextType::class);
1919 }
2020
21- public function configureOptions (OptionsResolver $ resolver )
21+ public function configureOptions (OptionsResolver $ resolver ): void
2222 {
2323 $ resolver ->setDefaults ([
2424 'data_class ' => TestData::class,
You can’t perform that action at this time.
0 commit comments