Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos #41

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
- update vendor (UTF-8)

### 6.4.1 (2021-04-07)
- use Github Actions
- use GitHub Actions
- use optimized phpdocs for phpstan
- use phpdocs (generics) for collections

Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ EXAMPLE: <code>
</code>

**Parameters:**
- `array<array-key, (int|string)> $options [optional] <p>An array of bcrypt hasing options.</p>`
- `array<array-key, (int|string)> $options [optional] <p>An array of bcrypt hashing options.</p>`

**Return:**
- `static`
Expand Down Expand Up @@ -3995,19 +3995,19 @@ From the project directory, tests can be ran using `phpunit`

## Support

For support and donations please visit [Github](https://github.com/voku/Stringy/) | [Issues](https://github.com/voku/Stringy/issues) | [PayPal](https://paypal.me/moelleken) | [Patreon](https://www.patreon.com/voku).
For support and donations please visit [GitHub](https://github.com/voku/Stringy/) | [Issues](https://github.com/voku/Stringy/issues) | [PayPal](https://paypal.me/moelleken) | [Patreon](https://www.patreon.com/voku).

For status updates and release announcements please visit [Releases](https://github.com/voku/Stringy/releases) | [Twitter](https://twitter.com/suckup_de) | [Patreon](https://www.patreon.com/voku/posts).

For professional support please contact [me](https://about.me/voku).

## Thanks

- Thanks to [GitHub](https://github.com) (Microsoft) for hosting the code and a good infrastructure including Issues-Managment, etc.
- Thanks to [GitHub](https://github.com) (Microsoft) for hosting the code and a good infrastructure including Issues-Management, etc.
- Thanks to [IntelliJ](https://www.jetbrains.com) as they make the best IDEs for PHP and they gave me an open source license for PhpStorm!
- Thanks to [Travis CI](https://travis-ci.com/) for being the most awesome, easiest continous integration tool out there!
- Thanks to [StyleCI](https://styleci.io/) for the simple but powerfull code style check.
- Thanks to [PHPStan](https://github.com/phpstan/phpstan) && [Psalm](https://github.com/vimeo/psalm) for relly great Static analysis tools and for discover bugs in the code!
- Thanks to [Travis CI](https://travis-ci.com/) for being the most awesome, easiest continuous integration tool out there!
- Thanks to [StyleCI](https://styleci.io/) for the simple but powerful code style check.
- Thanks to [PHPStan](https://github.com/phpstan/phpstan) && [Psalm](https://github.com/vimeo/psalm) for really great Static analysis tools and for discover bugs in the code!

## License

Expand Down
10 changes: 5 additions & 5 deletions build/docs/base.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,19 +205,19 @@ From the project directory, tests can be ran using `phpunit`

## Support

For support and donations please visit [Github](https://github.com/voku/Stringy/) | [Issues](https://github.com/voku/Stringy/issues) | [PayPal](https://paypal.me/moelleken) | [Patreon](https://www.patreon.com/voku).
For support and donations please visit [GitHub](https://github.com/voku/Stringy/) | [Issues](https://github.com/voku/Stringy/issues) | [PayPal](https://paypal.me/moelleken) | [Patreon](https://www.patreon.com/voku).

For status updates and release announcements please visit [Releases](https://github.com/voku/Stringy/releases) | [Twitter](https://twitter.com/suckup_de) | [Patreon](https://www.patreon.com/voku/posts).

For professional support please contact [me](https://about.me/voku).

## Thanks

- Thanks to [GitHub](https://github.com) (Microsoft) for hosting the code and a good infrastructure including Issues-Managment, etc.
- Thanks to [GitHub](https://github.com) (Microsoft) for hosting the code and a good infrastructure including Issues-Management, etc.
- Thanks to [IntelliJ](https://www.jetbrains.com) as they make the best IDEs for PHP and they gave me an open source license for PhpStorm!
- Thanks to [Travis CI](https://travis-ci.com/) for being the most awesome, easiest continous integration tool out there!
- Thanks to [StyleCI](https://styleci.io/) for the simple but powerfull code style check.
- Thanks to [PHPStan](https://github.com/phpstan/phpstan) && [Psalm](https://github.com/vimeo/psalm) for relly great Static analysis tools and for discover bugs in the code!
- Thanks to [Travis CI](https://travis-ci.com/) for being the most awesome, easiest continuous integration tool out there!
- Thanks to [StyleCI](https://styleci.io/) for the simple but powerful code style check.
- Thanks to [PHPStan](https://github.com/phpstan/phpstan) && [Psalm](https://github.com/vimeo/psalm) for really great Static analysis tools and for discover bugs in the code!

## License

Expand Down
2 changes: 1 addition & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ parameters:
- %currentWorkingDirectory%/src/
reportUnmatchedIgnoredErrors: false
ignoreErrors:
# false-postive?
# false-positive?
- '#Arrayy\\Collection\\AbstractCollection<int, Stringy\\Stringy>#'
# not supported
- '#bound type \(int\|string\) is not supported#'
Expand Down
2 changes: 1 addition & 1 deletion src/Stringy.php
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@
*/
public function appendRandomString(int $length, string $possibleChars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'): self
{
$str = $this->utf8::get_random_string($length, $possibleChars);

Check failure on line 321 in src/Stringy.php

View workflow job for this annotation

GitHub Actions / tests (7.4, basic)

Parameter #1 $length of static method voku\helper\UTF8::get_random_string() expects int<1, max>, int given.

return $this->append($str);
}
Expand Down Expand Up @@ -388,7 +388,7 @@
*/
public function at(int $index): self
{
return static::create($this->utf8::char_at($this->str, $index), $this->encoding);

Check failure on line 391 in src/Stringy.php

View workflow job for this annotation

GitHub Actions / tests (7.4, basic)

Parameter #2 $index of static method voku\helper\UTF8::char_at() expects int<1, max>, int given.
}

/**
Expand Down Expand Up @@ -436,7 +436,7 @@
* EXAMPLE: <code>
* </code>
*
* @param array<array-key, int|string> $options [optional] <p>An array of bcrypt hasing options.</p>
* @param array<array-key, int|string> $options [optional] <p>An array of bcrypt hashing options.</p>
*
* @psalm-mutation-free
*
Expand Down Expand Up @@ -1352,7 +1352,7 @@
public function first(int $n): self
{
return static::create(
$this->utf8::first_char($this->str, $n, $this->encoding),

Check failure on line 1355 in src/Stringy.php

View workflow job for this annotation

GitHub Actions / tests (7.4, basic)

Parameter #2 $n of static method voku\helper\UTF8::first_char() expects int<1, max>, int given.
$this->encoding
);
}
Expand Down Expand Up @@ -2658,11 +2658,11 @@
return static::create(
$this->utf8::wordwrap_per_line(
$this->str,
$limit,

Check failure on line 2661 in src/Stringy.php

View workflow job for this annotation

GitHub Actions / tests (7.4, basic)

Parameter #2 $width of static method voku\helper\UTF8::wordwrap_per_line() expects int<1, max>, int given.
$break,
true,
$add_final_break,
$delimiter

Check failure on line 2665 in src/Stringy.php

View workflow job for this annotation

GitHub Actions / tests (7.4, basic)

Parameter #6 $delimiter of static method voku\helper\UTF8::wordwrap_per_line() expects non-empty-string|null, string|null given.
),
$this->encoding
);
Expand Down Expand Up @@ -2697,11 +2697,11 @@
return static::create(
$this->utf8::wordwrap_per_line(
$this->str,
$limit,

Check failure on line 2700 in src/Stringy.php

View workflow job for this annotation

GitHub Actions / tests (7.4, basic)

Parameter #2 $width of static method voku\helper\UTF8::wordwrap_per_line() expects int<1, max>, int given.
$break,
false,
$add_final_break,
$delimiter

Check failure on line 2704 in src/Stringy.php

View workflow job for this annotation

GitHub Actions / tests (7.4, basic)

Parameter #6 $delimiter of static method voku\helper\UTF8::wordwrap_per_line() expects non-empty-string|null, string|null given.
),
$this->encoding
);
Expand Down Expand Up @@ -3058,7 +3058,7 @@
*/
public function offsetGet($offset): string
{
return $this->utf8::str_offset_get($this->str, $offset, $this->encoding);

Check failure on line 3061 in src/Stringy.php

View workflow job for this annotation

GitHub Actions / tests (7.4, basic)

Parameter #2 $index of static method voku\helper\UTF8::str_offset_get() expects int<1, max>, int given.
}

/**
Expand Down Expand Up @@ -3764,7 +3764,7 @@
public function shortenAfterWord(int $length, string $strAddOn = '…'): self
{
return static::create(
$this->utf8::str_limit_after_word($this->str, $length, $strAddOn),

Check failure on line 3767 in src/Stringy.php

View workflow job for this annotation

GitHub Actions / tests (7.4, basic)

Parameter #2 $length of static method voku\helper\UTF8::str_limit_after_word() expects int<1, max>, int given.
$this->encoding
);
}
Expand Down
18 changes: 9 additions & 9 deletions tests/StringyStrictTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1876,20 +1876,20 @@ public function testAddRandomString()

public function testAddUniqueIdentifier()
{
$uniquIDs = [];
$uniqueIDs = [];
for ($i = 0; $i <= 100; ++$i) {
$stringy = S::create('');
$uniquIDs[] = (string) $stringy->appendUniqueIdentifier();
$uniqueIDs[] = (string) $stringy->appendUniqueIdentifier();
}

// detect duplicate values in the array
foreach (\array_count_values($uniquIDs) as $uniquID => $count) {
foreach (\array_count_values($uniqueIDs) as $uniqueID => $count) {
static::assertSame(1, $count);
}

// check the string length
foreach ($uniquIDs as $uniquID) {
static::assertSame(32, \strlen($uniquID));
foreach ($uniqueIDs as $uniqueID) {
static::assertSame(32, \strlen($uniqueID));
}
}

Expand Down Expand Up @@ -4063,8 +4063,8 @@ public function titleizeForHumansProvider()
'Notes and Observations Regarding Apple’s Announcements From ‘The Beat Goes On’ Special Event',
],
[
'Read markdown_rules.txt to find out how _underscores around words_ will be interpretted',
'Read markdown_rules.txt to Find Out How _Underscores Around Words_ Will Be Interpretted',
'Read markdown_rules.txt to find out how _underscores around words_ will be interpreted',
'Read markdown_rules.txt to Find Out How _Underscores Around Words_ Will Be Interpreted',
],
[
"Q&A with Steve Jobs: 'That's what happens in technology'",
Expand Down Expand Up @@ -4432,13 +4432,13 @@ public function testUtf8ify()
'κόσμε' => ['κόσμε' => 'κόσμε'],
'中' => ['中' => '中'],
'«foobar»' => ['«foobar»' => '«foobar»'],
// Valid UTF-8 + Invalied Chars
// Valid UTF-8 + Invalid Chars
"κόσμε\xa0\xa1-öäü" => ['κόσμε-öäü' => 'κόσμε-öäü'],
// Valid ASCII
'a' => ['a' => 'a'],
// Valid emoji (non-UTF-8)
'😃' => ['😃' => '😃'],
// Valid ASCII + Invalied Chars
// Valid ASCII + Invalid Chars
"a\xa0\xa1-öäü" => ['a-öäü' => 'a-öäü'],
// Valid 2 Octet Sequence
"\xc3\xb1" => ['ñ' => 'ñ'],
Expand Down
Loading