mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-17 00:37:52 +00:00
Bugfixes
- Fixed `Url` not outputting correct class when used in json_encode. - Fixed `IInputItem` being too strict about strings which may be nullable.
This commit is contained in:
@@ -9,14 +9,14 @@ interface IInputItem
|
||||
|
||||
public function setIndex(string $index): self;
|
||||
|
||||
public function getName(): string;
|
||||
public function getName(): ?string;
|
||||
|
||||
public function setName(string $name): self;
|
||||
|
||||
public function getValue(): string;
|
||||
public function getValue(): ?string;
|
||||
|
||||
public function setValue(string $value): self;
|
||||
|
||||
public function __toString();
|
||||
public function __toString(): string;
|
||||
|
||||
}
|
||||
@@ -140,7 +140,7 @@ class InputFile implements IInputItem
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName(): string
|
||||
public function getName(): ?string
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
@@ -177,7 +177,7 @@ class InputFile implements IInputItem
|
||||
*
|
||||
* @return string mixed
|
||||
*/
|
||||
public function getFilename(): string
|
||||
public function getFilename(): ?string
|
||||
{
|
||||
return $this->filename;
|
||||
}
|
||||
@@ -256,12 +256,12 @@ class InputFile implements IInputItem
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function __toString()
|
||||
public function __toString(): string
|
||||
{
|
||||
return $this->getTmpName();
|
||||
}
|
||||
|
||||
public function getValue(): string
|
||||
public function getValue(): ?string
|
||||
{
|
||||
return $this->getFilename();
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ class InputItem implements IInputItem
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getName(): string
|
||||
public function getName(): ?string
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
@@ -55,7 +55,7 @@ class InputItem implements IInputItem
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getValue(): string
|
||||
public function getValue(): ?string
|
||||
{
|
||||
return $this->value;
|
||||
}
|
||||
@@ -72,7 +72,7 @@ class InputItem implements IInputItem
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function __toString()
|
||||
public function __toString(): string
|
||||
{
|
||||
return (string)$this->value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user