Skip to content

Commit

Permalink
Do not require mbstring extension
Browse files Browse the repository at this point in the history
  • Loading branch information
kubawerlos committed Mar 20, 2020
1 parent 7cfd886 commit f628dd8
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ jobs:
with:
php-version: ${{ matrix.php-version }}
coverage: pcov
extensions: mbstring

- name: Get composer cache directory
id: composer-cache
Expand Down
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
],
"require": {
"php": "^7.2",
"ext-mbstring": "*",
"ext-tokenizer": "*",
"symfony/console": "^3.4 || ^4.0 || ^5.0",
"symfony/finder": "^3.4 || ^4.0 || ^5.0"
Expand Down
4 changes: 2 additions & 2 deletions src/Command/CheckCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$output->writeln('');

$whatWasChecked = $this->getWhatWasChecked($report);
if (\mb_strpos($whatWasChecked, 'item') !== false) {
if (\strpos($whatWasChecked, 'item') !== false) {
$output->writeln(\sprintf('Types checker - %s checked:', $whatWasChecked));
if ($report->getNumberOfClasses() > 0) {
$output->writeln(\sprintf(' - %s', $this->pluralize($report->getNumberOfClasses(), 'class')));
Expand Down Expand Up @@ -121,7 +121,7 @@ private function getWhatWasChecked(Report $report): string
private function pluralize(int $count, string $name): string
{
if ($count !== 1) {
$name .= \mb_substr($name, -1) === 's' ? 'es' : 's';
$name .= \substr($name, -1) === 's' ? 'es' : 's';
}

return \sprintf('%d %s', $count, $name);
Expand Down

0 comments on commit f628dd8

Please sign in to comment.