Skip to content

Commit c531ea8

Browse files
authored
Merge pull request #75 from janlam7/phpcs-tool-9
Update phpcs-tool to 9.1.0 with Hostnet-Level-1
2 parents 66b5047 + 5bd21b1 commit c531ea8

File tree

12 files changed

+24
-20
lines changed

12 files changed

+24
-20
lines changed

.github/workflows/main.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,5 @@ jobs:
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

composer.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
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",
@@ -41,6 +41,12 @@
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"

phpcs.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
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>

phpunit.xml.dist

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
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>

test/Functional/Fixtures/HandlerType/FullFormHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
class 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);

test/Functional/Fixtures/HandlerType/FullFormHandler27.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
class 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);

test/Functional/Fixtures/HandlerType/SimpleFormHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
class SimpleFormHandler implements HandlerTypeInterface
1414
{
15-
public function configure(HandlerConfigInterface $config)
15+
public function configure(HandlerConfigInterface $config): void
1616
{
1717
$config->setType(TestType::class);
1818
}

test/Functional/Fixtures/HandlerType/SimpleNotTaggedFormHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
class SimpleNotTaggedFormHandler implements HandlerTypeInterface
1414
{
15-
public function configure(HandlerConfigInterface $config)
15+
public function configure(HandlerConfigInterface $config): void
1616
{
1717
$config->setType(TestType::class);
1818
}

test/Functional/Fixtures/TestKernel.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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
}

test/Functional/Fixtures/TestType.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313

1414
class 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,

0 commit comments

Comments
 (0)