Skip to content

Commit faf4c4e

Browse files
committed
Fix CS; update PHPStan; put commands in composer.json
1 parent 16519d2 commit faf4c4e

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ jobs:
2828
env: COMPOSER_OPTIONS="--prefer-lowest"
2929
- stage: Code style and static analysis
3030
script:
31-
- vendor/bin/phpstan analyse src test --level 7
31+
- composer phpstan
3232
env: PHPSTAN=true
3333
- script:
34-
- vendor/bin/php-cs-fixer fix --verbose --diff --dry-run
34+
- composer cs-check
3535
env: CS-FIXER=true
3636
- stage: coverage
3737
script:

composer.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
},
3333
"require-dev": {
3434
"friendsofphp/php-cs-fixer": "^2.5",
35-
"phpstan/phpstan": "^0.8.5",
35+
"phpstan/phpstan": "^0.9.1",
3636
"phpunit/phpunit": "^6.0",
3737
"scrutinizer/ocular": "^1.4",
3838
"symfony/expression-language": "^3.0||^4.0"
@@ -47,6 +47,11 @@
4747
"Sentry\\SentryBundle\\Test\\": "test"
4848
}
4949
},
50+
"scripts": {
51+
"phpstan": "vendor/bin/phpstan analyse src test --level 7 -c phpstan.neon",
52+
"cs-check": "vendor/bin/php-cs-fixer fix --verbose --diff --dry-run",
53+
"cs-fix": "vendor/bin/php-cs-fixer fix --verbose --diff"
54+
},
5055
"extra": {
5156
"branch-alias": {
5257
"master": "2.0.x-dev",

test/DependencyInjection/SentryExtensionTest.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,8 +350,11 @@ public function test_that_it_sets_all_sentry_options()
350350
$this->assertCount(self::SUPPORTED_SENTRY_OPTIONS_COUNT, $options);
351351
$defaultOptions = $this->getContainer()->getParameter('sentry.options');
352352
foreach ($options as $name => $value) {
353-
$this->assertNotEquals($defaultOptions[$name], $value,
354-
'Test precondition failed: using default value for ' . $name);
353+
$this->assertNotEquals(
354+
$defaultOptions[$name],
355+
$value,
356+
'Test precondition failed: using default value for ' . $name
357+
);
355358
}
356359

357360
$container = $this->getContainer(['options' => $options]);

0 commit comments

Comments
 (0)