Skip to content

Commit 2d62ad0

Browse files
smartbooster#22 Migrate from travis to github actions
1 parent 9730eb4 commit 2d62ad0

6 files changed

Lines changed: 15 additions & 14 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
- name: PHPStan
5454
run: phpstan analyse --no-progress
5555

56-
phpunit-lowest:
56+
phpunit:
5757
runs-on: ubuntu-latest
5858
name: PHP 7.4 Test on ubuntu-latest
5959
steps:
@@ -78,7 +78,7 @@ jobs:
7878
restore-keys: ${{ runner.os }}-composer-
7979

8080
- name: Install dependencies
81-
run: composer update --prefer-dist --prefer-lowest
81+
run: composer install --prefer-dist
8282

8383
- name: "Run tests with phpunit/phpunit"
8484
env:

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ metrics:
3131
vendor/bin/phpmetrics --report-html=build/phpmetrics.html src
3232

3333
phpstan:
34-
vendor/bin/phpstan analyse src --level=6 -c phpstan.neon
34+
vendor/bin/phpstan analyse -c phpstan.neon
3535

3636
#================================
3737
# TEST

phpstan.neon

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ includes:
33
- vendor/phpstan/phpstan-symfony/rules.neon
44

55
parameters:
6-
level: 5
7-
paths:
8-
- src
9-
- tests
6+
checkMissingIterableValueType: false
7+
level: 6
8+
paths:
9+
- src
10+
- tests

src/Entity/User/UserTrait.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,15 +105,15 @@ public function getId()
105105
/**
106106
* {@inheritdoc}
107107
*/
108-
public function getUsername()
108+
public function getUsername(): string
109109
{
110110
return $this->email;
111111
}
112112

113113
/**
114114
* {@inheritdoc}
115115
*/
116-
public function getEmail()
116+
public function getEmail(): string
117117
{
118118
return $this->email;
119119
}
@@ -133,7 +133,7 @@ public function setEmail($email)
133133
/**
134134
* {@inheritdoc}
135135
*/
136-
public function getPassword()
136+
public function getPassword(): string
137137
{
138138
return $this->password;
139139
}
@@ -181,7 +181,7 @@ public function setPlainPassword($plainPassword)
181181
/**
182182
* {@inheritdoc}
183183
*/
184-
public function eraseCredentials()
184+
public function eraseCredentials(): void
185185
{
186186
$this->plainPassword = null;
187187
}

tests/Entity/User/UserTraitTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*/
1212
class UserTraitTest extends TestCase
1313
{
14-
public function testFullname()
14+
public function testFullname(): void
1515
{
1616
$user = new User();
1717
$user->setLastName('Doe')

tests/Validator/Constraints/IsPasswordSafeValidatorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ protected function getValidatorInstance()
2525
* @param string $expectedMessage
2626
* @dataProvider failPasswordProvider
2727
*/
28-
public function testValidationFail($value, $expectedMessage)
28+
public function testValidationFail($value, $expectedMessage): void
2929
{
3030
$constraint = new IsPasswordSafe();
3131
$validator = $this->initValidator($expectedMessage);
@@ -52,7 +52,7 @@ public function failPasswordProvider()
5252
* @param string $value
5353
* @dataProvider validPasswordProvider
5454
*/
55-
public function testValidationOk($value)
55+
public function testValidationOk($value): void
5656
{
5757
$constraint = new IsPasswordSafe();
5858
$validator = $this->initValidator();

0 commit comments

Comments
 (0)