Skip to content

Commit 623f3ef

Browse files
author
Greg Bowler
committed
tweak: remove implicit nulls
1 parent 44cda8c commit 623f3ef

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Input.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public function add(string $key, InputDatum $datum, string $method):void {
109109
* POST variables, pass Input::METHOD_GET or Input::METHOD_POST as the
110110
* second parameter (defaults to Input::METHOD_BOTH).
111111
*/
112-
public function get(string $key, string $method = null):mixed {
112+
public function get(string $key, ?string $method = null):mixed {
113113
if(is_null($method)) {
114114
$method = self::DATA_COMBINED;
115115
}
@@ -128,7 +128,7 @@ public function get(string $key, string $method = null):mixed {
128128
/**
129129
* Does the input contain the specified key?
130130
*/
131-
public function contains(string $key, string $method = null):bool {
131+
public function contains(string $key, ?string $method = null):bool {
132132
if(is_null($method)) {
133133
$method = self::DATA_COMBINED;
134134
}
@@ -174,7 +174,7 @@ public function containsFile(string $key):bool {
174174
* only GET or POST variables, pass Input::METHOD_GET
175175
* or Input::METHOD_POST.
176176
*/
177-
public function getAll(string $method = null):InputData {
177+
public function getAll(?string $method = null):InputData {
178178
if(is_null($method)) {
179179
$method = self::DATA_COMBINED;
180180
}

src/InputValueGetter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public function getMultipleFile(string $key):array {
112112

113113
public function getDateTime(
114114
string $key,
115-
string $format = null
115+
?string $format = null
116116
):?DateTimeInterface {
117117
$value = $this->getString($key);
118118
if(is_null($value) || strlen($value) === 0) {

0 commit comments

Comments
 (0)