Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jun 11, 2020. It is now read-only.

Commit 8356605

Browse files
committed
strict declare return type. update some info
1 parent 50753dd commit 8356605

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

‎composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
}
2626
},
2727
"suggest": {
28-
"inhere/simple-print-tool": "Very lightweight data printing tools",
2928
"inhere/php-validate": "Very lightweight data validate tool",
3029
"inhere/console": "a lightweight php console application library."
3130
}

‎src/ArrBuffer.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,31 +34,31 @@ public function __construct(string $content = '')
3434
/**
3535
* @param string $content
3636
*/
37-
public function write(string $content)
37+
public function write(string $content): void
3838
{
3939
$this->body[] = $content;
4040
}
4141

4242
/**
4343
* @param string $content
4444
*/
45-
public function append(string $content)
45+
public function append(string $content): void
4646
{
4747
$this->write($content);
4848
}
4949

5050
/**
5151
* @param string $content
5252
*/
53-
public function prepend(string $content)
53+
public function prepend(string $content): void
5454
{
5555
array_unshift($this->body, $content);
5656
}
5757

5858
/**
5959
* clear
6060
*/
61-
public function clear()
61+
public function clear(): void
6262
{
6363
$this->body = [];
6464
}
@@ -74,7 +74,7 @@ public function getBody(): array
7474
/**
7575
* @param string[] $body
7676
*/
77-
public function setBody(array $body)
77+
public function setBody(array $body): void
7878
{
7979
$this->body = $body;
8080
}
@@ -106,7 +106,7 @@ public function getDelimiter(): string
106106
/**
107107
* @param string $delimiter
108108
*/
109-
public function setDelimiter(string $delimiter)
109+
public function setDelimiter(string $delimiter): void
110110
{
111111
$this->delimiter = $delimiter;
112112
}

‎src/ArrayHelper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ public static function getValueByNodes(array $data, array $nodes, $default = nul
456456
* @param mixed $value
457457
* @param string $separator
458458
*/
459-
public static function setByPath(&$data, string $path, $value, string $separator = '.')
459+
public static function setByPath(&$data, string $path, $value, string $separator = '.'): void
460460
{
461461
if (false === \strpos($path, $separator)) {
462462
$data[$path] = $value;
@@ -699,7 +699,7 @@ public static function flatten($array, $depth = INF): array
699699
* @param array|string $keys
700700
* @return void
701701
*/
702-
public static function forget(&$array, $keys)
702+
public static function forget(&$array, $keys): void
703703
{
704704
$original = &$array;
705705
$keys = (array)$keys;

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /