Skip to content
This repository was archived by the owner on Jun 11, 2020. It is now read-only.

Commit 743c941

Browse files
committed
strict declare return type. update some info
1 parent b45df85 commit 743c941

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/StrBuffer.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,31 +27,31 @@ public function __construct(string $content = '')
2727
/**
2828
* @param string $content
2929
*/
30-
public function write(string $content)
30+
public function write(string $content): void
3131
{
3232
$this->body .= $content;
3333
}
3434

3535
/**
3636
* @param string $content
3737
*/
38-
public function append(string $content)
38+
public function append(string $content): void
3939
{
4040
$this->write($content);
4141
}
4242

4343
/**
4444
* @param string $content
4545
*/
46-
public function prepend(string $content)
46+
public function prepend(string $content): void
4747
{
4848
$this->body = $content . $this->body;
4949
}
5050

5151
/**
5252
* clear
5353
*/
54-
public function clear()
54+
public function clear(): void
5555
{
5656
$this->body = '';
5757
}
@@ -67,7 +67,7 @@ public function getBody(): string
6767
/**
6868
* @param string $body
6969
*/
70-
public function setBody(string $body)
70+
public function setBody(string $body): void
7171
{
7272
$this->body = $body;
7373
}

src/StringHelper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -881,12 +881,12 @@ public static function format($str, array $replaceParams = [], array $pregParams
881881
}
882882

883883
if ($replaceParams && \count($replaceParams) === 2) {
884-
list($search, $replace) = $replaceParams;
884+
[$search, $replace] = $replaceParams;
885885
$str = str_replace($search, $replace, $str);
886886
}
887887

888888
if ($pregParams && \count($pregParams) === 2) {
889-
list($pattern, $replace) = $pregParams;
889+
[$pattern, $replace] = $pregParams;
890890
$str = preg_replace($pattern, $replace, $str);
891891
}
892892

src/UUID.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ public static function randomBytes($bytes): string
231231
* @param integer $len
232232
* @return string|null
233233
*/
234-
protected static function makeBin($str, $len)
234+
protected static function makeBin($str, $len): ?string
235235
{
236236
if ($str instanceof self) {
237237
return $str->bytes;

0 commit comments

Comments
 (0)