Skip to content

Commit

Permalink
cr fixes (infection#658)
Browse files Browse the repository at this point in the history
  • Loading branch information
majkel89 committed Apr 1, 2019
1 parent 77e318c commit 21cddd8
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 17 deletions.
3 changes: 1 addition & 2 deletions composer.json
Expand Up @@ -60,8 +60,7 @@
"symfony/process": "3.4.2"
},
"require-dev": {
"phpunit/phpunit": "^7.5",
"ext-bcmath": "*"
"phpunit/phpunit": "^7.5"
},
"config": {
"platform": {
Expand Down
6 changes: 2 additions & 4 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions devTools/Dockerfile-php71-xdebug
@@ -1,7 +1,6 @@
FROM php:7.1-cli

RUN pecl install xdebug && docker-php-ext-enable xdebug && \
docker-php-ext-install -j$(nproc) bcmath
RUN pecl install xdebug && docker-php-ext-enable xdebug
RUN apt-get update && apt-get install -y --no-install-recommends \
expect git zip \
&& rm -rf /var/lib/apt/lists/*
Expand Down
3 changes: 1 addition & 2 deletions devTools/Dockerfile-php72-xdebug
@@ -1,7 +1,6 @@
FROM php:7.2-cli

RUN pecl install xdebug && docker-php-ext-enable xdebug && \
docker-php-ext-install -j$(nproc) bcmath
RUN pecl install xdebug && docker-php-ext-enable xdebug
RUN apt-get update && apt-get install -y --no-install-recommends \
expect git zip \
&& rm -rf /var/lib/apt/lists/*
Expand Down
3 changes: 1 addition & 2 deletions devTools/Dockerfile-php73-xdebug
@@ -1,7 +1,6 @@
FROM php:7.3-rc-cli

RUN pecl install xdebug-beta && docker-php-ext-enable xdebug && \
docker-php-ext-install -j$(nproc) bcmath
RUN pecl install xdebug-beta && docker-php-ext-enable xdebug
RUN apt-get update && apt-get install -y --no-install-recommends \
expect git zip \
&& rm -rf /var/lib/apt/lists/*
Expand Down
6 changes: 2 additions & 4 deletions src/Mutator/Extensions/BCMath.php
Expand Up @@ -72,9 +72,7 @@ protected function mutatesNode(Node $node): bool
return false;
}

$functionName = $node->name->toLowerString();

return isset($this->converters[$functionName]) && \function_exists($functionName);
return isset($this->converters[$node->name->toLowerString()]);
}

private function setupConverters(array $functionsMap): void
Expand Down Expand Up @@ -109,7 +107,7 @@ private function setupConverters(array $functionsMap): void
),
];

$functionsToRemove = \array_filter($functionsMap, static function ($isOn) {
$functionsToRemove = \array_filter($functionsMap, static function (bool $isOn): bool {
return !$isOn;
});

Expand Down
2 changes: 1 addition & 1 deletion src/Mutator/Extensions/MBString.php
Expand Up @@ -98,7 +98,7 @@ private function setupConverters(array $functionsMap): void
'mb_convert_case' => $this->mapConvertCase(),
];

$functionsToRemove = \array_filter($functionsMap, static function ($isOn) {
$functionsToRemove = \array_filter($functionsMap, static function (bool $isOn): bool {
return !$isOn;
});

Expand Down

0 comments on commit 21cddd8

Please sign in to comment.