Skip to content
Merged
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
11 changes: 3 additions & 8 deletions src/Stringy.php
Original file line number Diff line number Diff line change
Expand Up @@ -2509,14 +2509,11 @@ public function isWhitespace(): bool
* EXAMPLE: <code>
* </code>
*
* @noinspection ReturnTypeCanBeDeclaredInspection
*
* @psalm-mutation-free
*
* @return string The current value of the $str property
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
public function jsonSerialize(): mixed
{
return (string) $this;
}
Expand Down Expand Up @@ -3113,8 +3110,7 @@ public function offsetGet($offset): string
*
* @return void
*/
#[\ReturnTypeWillChange]
public function offsetSet($offset, $value)
public function offsetSet($offset, $value): void
{
// Stringy is immutable, cannot directly set char
throw new \Exception('Stringy object is immutable, cannot modify char');
Expand All @@ -3134,8 +3130,7 @@ public function offsetSet($offset, $value)
*
* @return void
*/
#[\ReturnTypeWillChange]
public function offsetUnset($offset)
public function offsetUnset($offset): void
{
// Don't allow directly modifying the string
throw new \Exception('Stringy object is immutable, cannot unset char');
Expand Down
Loading