Skip to content

Commit 7b0c8dc

Browse files
authored
Merge pull request #32 from janlam7/phpcs-tool-9
Update phpcs-tool to 9.1.0 with Hostnet-Level-2
2 parents 69050a5 + fe99a43 commit 7b0c8dc

5 files changed

Lines changed: 36 additions & 40 deletions

File tree

.github/workflows/main.yaml

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,29 @@ name: CI
33
on: [push, pull_request]
44

55
jobs:
6-
test:
7-
runs-on: ubuntu-latest
8-
9-
strategy:
10-
matrix:
11-
php-versions: ['7.3', '7.4', '8.0']
12-
name: PHP ${{ matrix.php-versions }}
13-
steps:
14-
- uses: actions/checkout@v2
15-
- uses: shivammathur/setup-php@v2
16-
with:
17-
php-version: ${{ matrix.php-versions }}
18-
- name: Get composer cache directory
19-
id: composer-cache
20-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
21-
- uses: actions/cache@v2
22-
with:
23-
path: ${{ steps.composer-cache.outputs.dir }}
24-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
25-
restore-keys: ${{ runner.os }}-composer-
26-
- name: composer install
27-
run: composer install --no-progress --prefer-dist --optimize-autoloader
28-
- name: phpunit
29-
run: php vendor/bin/phpunit
6+
test:
7+
runs-on: ubuntu-latest
308

9+
strategy:
10+
matrix:
11+
php-versions: ['7.3', '7.4', '8.0']
12+
name: PHP ${{ matrix.php-versions }}
13+
steps:
14+
- uses: actions/checkout@v2
15+
- uses: shivammathur/setup-php@v2
16+
with:
17+
php-version: ${{ matrix.php-versions }}
18+
- name: Get composer cache directory
19+
id: composer-cache
20+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
21+
- uses: actions/cache@v2
22+
with:
23+
path: ${{ steps.composer-cache.outputs.dir }}
24+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
25+
restore-keys: ${{ runner.os }}-composer-
26+
- name: composer install
27+
run: composer install --no-progress --prefer-dist --optimize-autoloader
28+
- name: phpunit
29+
run: php vendor/bin/phpunit
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
@@ -14,7 +14,7 @@
1414
},
1515
"require-dev": {
1616
"hostnet/entity-blamable-component": "^1.0.4",
17-
"hostnet/phpcs-tool": "^8.3.15",
17+
"hostnet/phpcs-tool": "^9.1.0",
1818
"phpunit/phpunit": "^9.5.6",
1919
"symfony/framework-bundle": "^4.4||^5.0",
2020
"symfony/security-bundle": "^4.4||^5.0"
@@ -34,6 +34,12 @@
3434
"Hostnet\\Bundle\\EntityTrackerBundle\\": "tests/"
3535
}
3636
},
37+
"config": {
38+
"allow-plugins": {
39+
"hostnet/*": true,
40+
"dealerdirect/phpcodesniffer-composer-installer": false
41+
}
42+
},
3743
"archive": {
3844
"exclude": [
3945
"/tests"

phpcs.xml.dist

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0"?>
2+
<ruleset name="entity-tracker-bundle PHPCS">
3+
<rule ref="Hostnet-Level-2"/>
4+
</ruleset>

src/Services/Blamable/DefaultBlamableProvider.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@ public function __construct(TokenStorageInterface $token_storage, string $userna
3131
$this->username = $username;
3232
}
3333

34-
/**
35-
* {@inheritdoc}
36-
*/
3734
public function getUpdatedBy(): string
3835
{
3936
if (($token = $this->token_storage->getToken()) instanceof TokenInterface) {
@@ -43,9 +40,6 @@ public function getUpdatedBy(): string
4340
return $this->username;
4441
}
4542

46-
/**
47-
* {@inheritdoc}
48-
*/
4943
public function getChangedAt(): \DateTime
5044
{
5145
return new \DateTime();

tests/Functional/Fixtures/TestKernel.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,25 +22,16 @@ public function registerBundles(): array
2222
];
2323
}
2424

25-
/**
26-
* {@inheritdoc}
27-
*/
2825
public function registerContainerConfiguration(LoaderInterface $loader): void
2926
{
3027
$loader->load(__DIR__ . '/config/config.yaml');
3128
}
3229

33-
/**
34-
* {@inheritdoc}
35-
*/
3630
public function getCacheDir(): string
3731
{
3832
return __DIR__ . '/../../../var/cache/' . $this->getEnvironment();
3933
}
4034

41-
/**
42-
* {@inheritdoc}
43-
*/
4435
public function getLogDir(): string
4536
{
4637
return __DIR__ . '/../../../var/logs';

0 commit comments

Comments
 (0)