From 4191464d5d4725335333d7b9666c94a20312b223 Mon Sep 17 00:00:00 2001 From: Ivan Enderlin Date: Fri, 10 Nov 2017 10:27:16 +0100 Subject: [PATCH] chore(php) Update to PHP 7. --- Source/Link/Read.php | 18 +++++++++--------- Source/Link/ReadWrite.php | 18 +++++++++--------- Source/Read.php | 18 +++++++++--------- Source/ReadWrite.php | 18 +++++++++--------- Source/Temporary/Read.php | 18 +++++++++--------- Source/Temporary/ReadWrite.php | 18 +++++++++--------- 6 files changed, 54 insertions(+), 54 deletions(-) diff --git a/Source/Link/Read.php b/Source/Link/Read.php index b408587..5532fa0 100644 --- a/Source/Link/Read.php +++ b/Source/Link/Read.php @@ -126,7 +126,7 @@ public function eof(): bool * @return string * @throws \Hoa\File\Exception */ - public function read(int $length): string + public function read(int $length) { if (0 > $length) { throw new File\Exception( @@ -145,7 +145,7 @@ public function read(int $length): string * @param int $length Length. * @return string */ - public function readString(int $length): string + public function readString(int $length) { return $this->read($length); } @@ -155,7 +155,7 @@ public function readString(int $length): string * * @return string */ - public function readCharacter(): string + public function readCharacter() { return fgetc($this->getStream()); } @@ -165,7 +165,7 @@ public function readCharacter(): string * * @return bool */ - public function readBoolean(): bool + public function readBoolean() { return (bool) $this->read(1); } @@ -176,7 +176,7 @@ public function readBoolean(): bool * @param int $length Length. * @return int */ - public function readInteger(int $length = 1): int + public function readInteger(int $length = 1) { return (int) $this->read($length); } @@ -187,7 +187,7 @@ public function readInteger(int $length = 1): int * @param int $length Length. * @return float */ - public function readFloat(int $length = 1): float + public function readFloat(int $length = 1) { return (float) $this->read($length); } @@ -199,7 +199,7 @@ public function readFloat(int $length = 1): float * @param string $format Format (see printf's formats). * @return array */ - public function readArray(string $format = null): array + public function readArray(string $format = null) { return $this->scanf($format); } @@ -209,7 +209,7 @@ public function readArray(string $format = null): array * * @return string */ - public function readLine(): string + public function readLine() { return fgets($this->getStream()); } @@ -220,7 +220,7 @@ public function readLine(): string * @param int $offset Offset. * @return string */ - public function readAll(int $offset = 0): string + public function readAll(int $offset = 0) { return stream_get_contents($this->getStream(), -1, $offset); } diff --git a/Source/Link/ReadWrite.php b/Source/Link/ReadWrite.php index b4879bf..71b886e 100644 --- a/Source/Link/ReadWrite.php +++ b/Source/Link/ReadWrite.php @@ -110,7 +110,7 @@ public function eof(): bool /** * Read n characters. */ - public function read(int $length): string + public function read(int $length) { if (0 > $length) { throw new File\Exception( @@ -126,7 +126,7 @@ public function read(int $length): string /** * Alias of $this->read(). */ - public function readString(int $length): string + public function readString(int $length) { return $this->read($length); } @@ -134,7 +134,7 @@ public function readString(int $length): string /** * Read a character. */ - public function readCharacter(): string + public function readCharacter() { return fgetc($this->getStream()); } @@ -142,7 +142,7 @@ public function readCharacter(): string /** * Read a boolean. */ - public function readBoolean(): bool + public function readBoolean() { return (bool) $this->read(1); } @@ -150,7 +150,7 @@ public function readBoolean(): bool /** * Read an integer. */ - public function readInteger(int $length = 1): int + public function readInteger(int $length = 1) { return (int) $this->read($length); } @@ -158,7 +158,7 @@ public function readInteger(int $length = 1): int /** * Read a float. */ - public function readFloat(int $length = 1): float + public function readFloat(int $length = 1) { return (float) $this->read($length); } @@ -167,7 +167,7 @@ public function readFloat(int $length = 1): float * Read an array. * Alias of the $this->scanf() method. */ - public function readArray(string $format = null): array + public function readArray(string $format = null) { return $this->scanf($format); } @@ -175,7 +175,7 @@ public function readArray(string $format = null): array /** * Read a line. */ - public function readLine(): string + public function readLine() { return fgets($this->getStream()); } @@ -183,7 +183,7 @@ public function readLine(): string /** * Read all, i.e. read as much as possible. */ - public function readAll(int $offset = 0): string + public function readAll(int $offset = 0) { return stream_get_contents($this->getStream(), -1, $offset); } diff --git a/Source/Read.php b/Source/Read.php index dee2e88..e0e74a9 100644 --- a/Source/Read.php +++ b/Source/Read.php @@ -105,7 +105,7 @@ public function eof(): bool /** * Read n characters. */ - public function read(int $length): string + public function read(int $length) { if (0 > $length) { throw new Exception( @@ -121,7 +121,7 @@ public function read(int $length): string /** * Alias of $this->read(). */ - public function readString(int $length): string + public function readString(int $length) { return $this->read($length); } @@ -129,7 +129,7 @@ public function readString(int $length): string /** * Read a character. */ - public function readCharacter(): string + public function readCharacter() { return fgetc($this->getStream()); } @@ -137,7 +137,7 @@ public function readCharacter(): string /** * Read a boolean. */ - public function readBoolean(): bool + public function readBoolean() { return (bool) $this->read(1); } @@ -145,7 +145,7 @@ public function readBoolean(): bool /** * Read an integer. */ - public function readInteger(int $length = 1): int + public function readInteger(int $length = 1) { return (int) $this->read($length); } @@ -153,7 +153,7 @@ public function readInteger(int $length = 1): int /** * Read a float. */ - public function readFloat(int $length = 1): float + public function readFloat(int $length = 1) { return (float) $this->read($length); } @@ -162,7 +162,7 @@ public function readFloat(int $length = 1): float * Read an array. * Alias of the $this->scanf() method. */ - public function readArray(string $format = null): array + public function readArray(string $format = null) { return $this->scanf($format); } @@ -170,7 +170,7 @@ public function readArray(string $format = null): array /** * Read a line. */ - public function readLine(): string + public function readLine() { return fgets($this->getStream()); } @@ -178,7 +178,7 @@ public function readLine(): string /** * Read all, i.e. read as much as possible. */ - public function readAll(int $offset = 0): string + public function readAll(int $offset = 0) { return stream_get_contents($this->getStream(), -1, $offset); } diff --git a/Source/ReadWrite.php b/Source/ReadWrite.php index 2959c06..48860f5 100644 --- a/Source/ReadWrite.php +++ b/Source/ReadWrite.php @@ -109,7 +109,7 @@ public function eof(): bool /** * Read n characters. */ - public function read(int $length): string + public function read(int $length) { if (0 > $length) { throw new Exception( @@ -125,7 +125,7 @@ public function read(int $length): string /** * Alias of $this->read(). */ - public function readString(int $length): string + public function readString(int $length) { return $this->read($length); } @@ -133,7 +133,7 @@ public function readString(int $length): string /** * Read a character. */ - public function readCharacter(): string + public function readCharacter() { return fgetc($this->getStream()); } @@ -141,7 +141,7 @@ public function readCharacter(): string /** * Read a boolean. */ - public function readBoolean(): bool + public function readBoolean() { return (bool) $this->read(1); } @@ -149,7 +149,7 @@ public function readBoolean(): bool /** * Read an integer. */ - public function readInteger(int $length = 1): int + public function readInteger(int $length = 1) { return (int) $this->read($length); } @@ -157,7 +157,7 @@ public function readInteger(int $length = 1): int /** * Read a float. */ - public function readFloat(int $length = 1): float + public function readFloat(int $length = 1) { return (float) $this->read($length); } @@ -166,7 +166,7 @@ public function readFloat(int $length = 1): float * Read an array. * Alias of the $this->scanf() method. */ - public function readArray(string $format = null): array + public function readArray(string $format = null) { return $this->scanf($format); } @@ -174,7 +174,7 @@ public function readArray(string $format = null): array /** * Read a line. */ - public function readLine(): string + public function readLine() { return fgets($this->getStream()); } @@ -182,7 +182,7 @@ public function readLine(): string /** * Read all, i.e. read as much as possible. */ - public function readAll(int $offset = 0): string + public function readAll(int $offset = 0) { return stream_get_contents($this->getStream(), -1, $offset); } diff --git a/Source/Temporary/Read.php b/Source/Temporary/Read.php index 7223800..8b5f3fd 100644 --- a/Source/Temporary/Read.php +++ b/Source/Temporary/Read.php @@ -106,7 +106,7 @@ public function eof(): bool /** * Read n characters. */ - public function read(int $length): string + public function read(int $length) { if (0 > $length) { throw new File\Exception( @@ -122,7 +122,7 @@ public function read(int $length): string /** * Alias of $this->read(). */ - public function readString(int $length): string + public function readString(int $length) { return $this->read($length); } @@ -130,7 +130,7 @@ public function readString(int $length): string /** * Read a character. */ - public function readCharacter(): string + public function readCharacter() { return fgetc($this->getStream()); } @@ -138,7 +138,7 @@ public function readCharacter(): string /** * Read a boolean. */ - public function readBoolean(): bool + public function readBoolean() { return (bool) $this->read(1); } @@ -146,7 +146,7 @@ public function readBoolean(): bool /** * Read an integer. */ - public function readInteger(int $length = 1): int + public function readInteger(int $length = 1) { return (int) $this->read($length); } @@ -154,7 +154,7 @@ public function readInteger(int $length = 1): int /** * Read a float. */ - public function readFloat(int $length = 1): float + public function readFloat(int $length = 1) { return (float) $this->read($length); } @@ -163,7 +163,7 @@ public function readFloat(int $length = 1): float * Read an array. * Alias of the $this->scanf() method. */ - public function readArray(string $format = null): array + public function readArray(string $format = null) { return $this->scanf($format); } @@ -171,7 +171,7 @@ public function readArray(string $format = null): array /** * Read a line. */ - public function readLine(): string + public function readLine() { return fgets($this->getStream()); } @@ -179,7 +179,7 @@ public function readLine(): string /** * Read all, i.e. read as much as possible. */ - public function readAll(int $offset = 0): string + public function readAll(int $offset = 0) { return stream_get_contents($this->getStream(), -1, $offset); } diff --git a/Source/Temporary/ReadWrite.php b/Source/Temporary/ReadWrite.php index 26abb9f..96584b9 100644 --- a/Source/Temporary/ReadWrite.php +++ b/Source/Temporary/ReadWrite.php @@ -110,7 +110,7 @@ public function eof(): bool /** * Read n characters. */ - public function read(int $length): string + public function read(int $length) { if (0 > $length) { throw new File\Exception( @@ -126,7 +126,7 @@ public function read(int $length): string /** * Alias of $this->read(). */ - public function readString(int $length): string + public function readString(int $length) { return $this->read($length); } @@ -134,7 +134,7 @@ public function readString(int $length): string /** * Read a character. */ - public function readCharacter(): string + public function readCharacter() { return fgetc($this->getStream()); } @@ -142,7 +142,7 @@ public function readCharacter(): string /** * Read a boolean. */ - public function readBoolean(): bool + public function readBoolean() { return (bool) $this->read(1); } @@ -150,7 +150,7 @@ public function readBoolean(): bool /** * Read an integer. */ - public function readInteger(int $length = 1): int + public function readInteger(int $length = 1) { return (int) $this->read($length); } @@ -158,7 +158,7 @@ public function readInteger(int $length = 1): int /** * Read a float. */ - public function readFloat(int $length = 1): float + public function readFloat(int $length = 1) { return (float) $this->read($length); } @@ -167,7 +167,7 @@ public function readFloat(int $length = 1): float * Read an array. * Alias of the $this->scanf() method. */ - public function readArray(string $format = null): array + public function readArray(string $format = null) { return $this->scanf($format); } @@ -175,7 +175,7 @@ public function readArray(string $format = null): array /** * Read a line. */ - public function readLine(): string + public function readLine() { return fgets($this->getStream()); } @@ -183,7 +183,7 @@ public function readLine(): string /** * Read all, i.e. read as much as possible. */ - public function readAll(int $offset = 0): string + public function readAll(int $offset = 0) { return stream_get_contents($this->getStream(), -1, $offset); }