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

use non-empty-string annoation #162

Merged
merged 3 commits into from
Mar 24, 2021
Merged
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
4 changes: 2 additions & 2 deletions docs/component/math.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@
#### `Functions`

- [abs](./../../src/Psl/Math/abs.php#L34)
- [base_convert](./../../src/Psl/Math/base_convert.php#L39)
- [base_convert](./../../src/Psl/Math/base_convert.php#L41)
- [ceil](./../../src/Psl/Math/ceil.php#L25)
- [clamp](./../../src/Psl/Math/clamp.php#L24)
- [cos](./../../src/Psl/Math/cos.php#L22)
- [div](./../../src/Psl/Math/div.php#L32)
- [exp](./../../src/Psl/Math/exp.php#L22)
- [floor](./../../src/Psl/Math/floor.php#L16)
- [from_base](./../../src/Psl/Math/from_base.php#L27)
- [from_base](./../../src/Psl/Math/from_base.php#L29)
- [log](./../../src/Psl/Math/log.php#L18)
- [max](./../../src/Psl/Math/max.php#L19)
- [max_by](./../../src/Psl/Math/max_by.php#L21)
Expand Down
4 changes: 2 additions & 2 deletions docs/component/str-byte.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
- [length](./../../src/Psl/Str/Byte/length.php#L14)
- [lowercase](./../../src/Psl/Str/Byte/lowercase.php#L14)
- [ord](./../../src/Psl/Str/Byte/ord.php#L12)
- [pad_left](./../../src/Psl/Str/Byte/pad_left.php#L25)
- [pad_right](./../../src/Psl/Str/Byte/pad_right.php#L25)
- [pad_left](./../../src/Psl/Str/Byte/pad_left.php#L27)
- [pad_right](./../../src/Psl/Str/Byte/pad_right.php#L27)
- [replace](./../../src/Psl/Str/Byte/replace.php#L15)
- [replace_ci](./../../src/Psl/Str/Byte/replace_ci.php#L15)
- [replace_every](./../../src/Psl/Str/Byte/replace_every.php#L17)
Expand Down
4 changes: 2 additions & 2 deletions docs/component/str.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
- [lowercase](./../../src/Psl/Str/lowercase.php#L35)
- [metaphone](./../../src/Psl/Str/metaphone.php#L23)
- [ord](./../../src/Psl/Str/ord.php#L27)
- [pad_left](./../../src/Psl/Str/pad_left.php#L36)
- [pad_right](./../../src/Psl/Str/pad_right.php#L36)
- [pad_left](./../../src/Psl/Str/pad_left.php#L38)
- [pad_right](./../../src/Psl/Str/pad_right.php#L38)
- [repeat](./../../src/Psl/Str/repeat.php#L28)
- [replace](./../../src/Psl/Str/replace.php#L19)
- [replace_ci](./../../src/Psl/Str/replace_ci.php#L20)
Expand Down
2 changes: 2 additions & 0 deletions src/Psl/Math/base_convert.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
* Math\base_convert('2014587925987', 10, 36)
* => Str('pphlmw9v')
*
* @param non-empty-string $value
*
* @pure
*
* @throws Psl\Exception\InvariantViolationException If $value is empty, $from_base and $to_base are
Expand Down
2 changes: 2 additions & 0 deletions src/Psl/Math/from_base.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
* Math\from_base('ff', 15)
* => Int(255)
*
* @param non-empty-string $number
*
* @pure
*
* @throws Psl\Exception\InvariantViolationException If $number is empty, $from_base is outside the [2, 36] range,
Expand Down
2 changes: 2 additions & 0 deletions src/Psl/Str/Byte/pad_left.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
* length, the pad string will be truncated. If the total length is less than or
* equal to the length of the input string, no padding will occur.
*
* @param non-empty-string $pad_string
*
* @pure
*
* @throws Psl\Exception\InvariantViolationException If $pad_string is empty, or $total_length is negative.
Expand Down
2 changes: 2 additions & 0 deletions src/Psl/Str/Byte/pad_right.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
* length, the pad string will be truncated. If the total length is less than or
* equal to the length of the input string, no padding will occur.
*
* @param non-empty-string $pad_string
*
* @pure
*
* @throws Psl\Exception\InvariantViolationException If $pad_string is empty, or $total_length is negative.
Expand Down
2 changes: 2 additions & 0 deletions src/Psl/Str/pad_left.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
* Str\pad_left('مرحبا', 8, 'م')
* => Str('ممممرحبا')
*
* @param non-empty-string $pad_string
*
* @pure
*
* @throws Psl\Exception\InvariantViolationException If the $pad_string is empty, a negative $total_length is given,
Expand Down
2 changes: 2 additions & 0 deletions src/Psl/Str/pad_right.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
* Str\pad_right('مرحبا', 8, 'ا')
* => Str('مرحباااا')
*
* @param non-empty-string $pad_string
*
* @pure
*
* @throws Psl\Exception\InvariantViolationException If the $pad_string is empty, a negative $total_length is given,
Expand Down
2 changes: 1 addition & 1 deletion src/Psl/Str/wrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/**
* Wraps a string to a given number of characters.
*
* @param string $break the line is broken using the optional break parameter
* @param non-empty-string $break the line is broken using the optional break parameter
* @param bool $cut If the cut is set to true, the string is always wrapped at or before the specified width.
* so if you have a word that is larger than the given width, it is broken apart.
*
Expand Down