Skip to content

Commit

Permalink
[HOTFIX] missing dependency illuminate str (#263)
Browse files Browse the repository at this point in the history
* Require illuminate/support as direct dependency

* Add travis task to test phpinsight against himself without dev-dependencies

* Revert "Require illuminate/support as direct dependency"

This reverts commit ee511bd.

* Remove Support\Str usage in SniffDecorator
  • Loading branch information
Jibbarth authored and nunomaduro committed Sep 9, 2019
1 parent 9c22f06 commit 1c441b6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ script:
composer run phpunit:test
composer run insights -- --disable-security-check
fi
- rm -rf vendor/
- composer install --no-dev
- composer run insights -- --disable-security-check
jobs:
include:
- stage: build docker image
Expand Down
9 changes: 4 additions & 5 deletions src/Domain/Insights/SniffDecorator.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace NunoMaduro\PhpInsights\Domain\Insights;

use Illuminate\Support\Str;
use NunoMaduro\PhpInsights\Domain\Contracts\HasDetails;
use NunoMaduro\PhpInsights\Domain\Contracts\Insight;
use NunoMaduro\PhpInsights\Domain\Details;
Expand Down Expand Up @@ -123,11 +122,11 @@ public function getTitle(): string
$path = explode('\\', $sniffClass);
$name = (string) array_pop($path);

$name = Str::before($name, 'Sniff');
$name = str_replace('Sniff', '', $name);

return Str::ucfirst(
trim(
Str::lower(
return ucfirst(
mb_strtolower(
trim(
(string) preg_replace(
'/(?<!\ )[A-Z]/',
' $0',
Expand Down

0 comments on commit 1c441b6

Please sign in to comment.