Skip to content

Commit 9bdd3e9

Browse files
authored
Merge pull request #79 from object-calisthenics/bump
Bump composer versions
2 parents 2a0c1c4 + 18ff6cb commit 9bdd3e9

File tree

8 files changed

+24
-13
lines changed

8 files changed

+24
-13
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ script:
2525
after_script:
2626
# upload coverage.xml file to Coveralls to analyze it
2727
- |
28-
wget https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar
29-
php coveralls.phar --verbose
28+
wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.1.0/php-coveralls.phar
29+
php php-coveralls.phar --verbose
3030
3131
# do not send success notifications, they have no value
3232
notifications:

composer.json

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
"type": "phpcodesniffer-standard",
66
"require": {
77
"php": "^7.1",
8-
"squizlabs/php_codesniffer": "^3.2",
8+
"squizlabs/php_codesniffer": "^3.3",
99
"nette/utils": "^2.4"
1010
},
1111
"require-dev": {
1212
"phpunit/phpunit": "^7.0",
13-
"phpstan/phpstan": "^0.9",
14-
"symplify/easy-coding-standard-tester": "^4.0",
15-
"symplify/coding-standard": "^4.0",
16-
"slevomat/coding-standard": "^4.5"
13+
"phpstan/phpstan": "^0.10.1",
14+
"symplify/easy-coding-standard-tester": "^4.5",
15+
"symplify/coding-standard": "^4.5",
16+
"slevomat/coding-standard": "^4.6"
1717
},
1818
"autoload": {
1919
"psr-4": {
@@ -27,8 +27,13 @@
2727
},
2828
"scripts": {
2929
"complete-check": ["@phpstan", "@check-cs", "phpunit"],
30-
"phpstan": "phpstan analyze src --level max --configuration phpstan.neon",
30+
"phpstan": "phpstan analyze src --level max",
3131
"check-cs": "ecs check src tests",
3232
"fix-cs": "ecs check src tests --fix"
33+
},
34+
"extra": {
35+
"branch-alias": {
36+
"dev-master": "3.3-dev"
37+
}
3338
}
3439
}

easy-coding-standard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ parameters:
3030
SlevomatCodingStandard\Sniffs\TypeHints\TypeHintDeclarationSniff:
3131
- '*src/ObjectCalisthenics/Sniffs/*/*Sniff.php'
3232

33-
PHP_CodeSniffer\Standards\Generic\Sniffs\CodeAnalysis\AssignmentInConditionSniff.Found: ~
33+
PHP_CodeSniffer\Standards\Generic\Sniffs\CodeAnalysis\AssignmentInConditionSniff.FoundInWhileCondition: ~
3434

3535
exclude_checkers:
3636
- 'Symplify\CodingStandard\Sniffs\CleanCode\ForbiddenStaticFunctionSniff'

phpstan.neon

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,8 @@ parameters:
44
- %currentWorkingDirectory%/vendor/squizlabs/php_codesniffer/autoload.php
55
excludes_analyse:
66
- **/ObjectCalisthenics/Helper/Slevomat/**
7+
8+
ignoreErrors:
9+
# false float positive
10+
- '#Parameter \#1 \$start of method ObjectCalisthenics\\Sniffs\\CodeAnalysis\\OneObjectOperatorPerLineSniff::ignoreWhitespace\(\) expects int, float\|int given#'
11+
- '#Method ObjectCalisthenics\\Sniffs\\Metrics\\MaxNestingLevelSniff::subtractFunctionNestingLevel\(\) should return int but returns float\|int#'

phpunit.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
colors="true"
55
verbose="true"
66
>
7-
<testsuite>
7+
<testsuite name="main">
88
<directory>tests</directory>
99
</testsuite>
1010
<filter>

src/ObjectCalisthenics/Sniffs/CodeAnalysis/OneObjectOperatorPerLineSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ private function computeLastCallOfAnyFrom(array $methods): int
146146
return in_array($token['token']['content'], $methods, true);
147147
});
148148
if (count($calls) > 0) {
149-
return array_search(end($calls), $this->callerTokens, true);
149+
return (int) array_search(end($calls), $this->callerTokens, true);
150150
}
151151

152152
return -2;

src/ObjectCalisthenics/Sniffs/NamingConventions/ElementNameMinimalLengthSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function register(): array
3737
public function process(File $file, $position): void
3838
{
3939
$elementName = Naming::getElementName($file, $position);
40-
$elementNameLength = mb_strlen($elementName);
40+
$elementNameLength = (int) mb_strlen($elementName);
4141

4242
if ($this->shouldBeSkipped($elementNameLength, $elementName)) {
4343
return;

tests/bootstrap.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
require_once __DIR__ . '/../vendor/autoload.php';
66
require_once __DIR__ . '/../vendor/squizlabs/php_codesniffer/autoload.php';
77

8-
if (! defined(T_CLOSURE)) {
8+
// required for src/ObjectCalisthenics/Sniffs/Metrics/MaxNestingLevelSniff.php
9+
if (! defined('T_CLOSURE')) {
910
new Tokens();
1011
}

0 commit comments

Comments
 (0)