diff --git a/README.md b/README.md index 028c4bf..0bcac46 100644 --- a/README.md +++ b/README.md @@ -106,7 +106,9 @@ The following methods are available: ## Inflector usage ```php -echo (new \Yiisoft\Strings\Inflector())->withoutIntl()->toSlug('Strings are cool!'); // strings-are-cool +echo (new \Yiisoft\Strings\Inflector()) + ->withoutIntl() + ->toSlug('Strings are cool!'); // strings-are-cool ``` Overall the inflector has the following method groups. @@ -171,7 +173,9 @@ The following characters are special in the pattern: use \Yiisoft\Strings\WildcardPattern; $startsWithTest = new WildcardPattern('test*'); -if ($startsWithTest->ignoreCase()->match('tEStIfThisIsTrue')) { +if ($startsWithTest + ->ignoreCase() + ->match('tEStIfThisIsTrue')) { echo 'It starts with "test"!'; } ``` diff --git a/tests/InflectorTest.php b/tests/InflectorTest.php index d57892c..7e24d1e 100644 --- a/tests/InflectorTest.php +++ b/tests/InflectorTest.php @@ -212,7 +212,9 @@ public function testToSlugCommons(string $input, string $expected, string $repla if (\extension_loaded('intl')) { $this->assertEquals($expected, $inflector->toSlug($input, $replacement)); } - $this->assertEquals($expected, $inflector->withoutIntl()->toSlug($input, $replacement)); + $this->assertEquals($expected, $inflector + ->withoutIntl() + ->toSlug($input, $replacement)); } public function testToSlugWithIntl(): void @@ -403,13 +405,15 @@ public function testToTransliteratedWithTransliterationMap(): void $this->markTestSkipped('intl extension is required.'); } - $inflector = (new Inflector())->withoutIntl()->withTransliterationMap( - [ - 'O' => 'E', - 'N' => 'N', - 'E' => 'O', - ] - ); + $inflector = (new Inflector()) + ->withoutIntl() + ->withTransliterationMap( + [ + 'O' => 'E', + 'N' => 'N', + 'E' => 'O', + ] + ); $this->assertEquals('ENO', $inflector->toTransliterated('ONE')); }