Skip to content

Commit

Permalink
Fix return type hint for all named constructors
Browse files Browse the repository at this point in the history
Fix 9.x issue on return type hint for all named constructors.
  • Loading branch information
Jalle19 authored and nyamsprod committed Mar 5, 2018
1 parent 26a3d86 commit 2e412a3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -3,4 +3,5 @@ build
composer.lock
docs/_site
vendor
/nbproject/private/
/nbproject/private/
.php_cs.cache
8 changes: 4 additions & 4 deletions src/AbstractCsv.php
Expand Up @@ -117,7 +117,7 @@ public function __clone()
*
* @return static
*/
public static function createFromFileObject(SplFileObject $file): self
public static function createFromFileObject(SplFileObject $file)
{
return new static($file);
}
Expand All @@ -129,7 +129,7 @@ public static function createFromFileObject(SplFileObject $file): self
*
* @return static
*/
public static function createFromStream($stream): self
public static function createFromStream($stream)
{
return new static(new Stream($stream));
}
Expand All @@ -141,7 +141,7 @@ public static function createFromStream($stream): self
*
* @return static
*/
public static function createFromString(string $content): self
public static function createFromString(string $content)
{
return new static(Stream::createFromString($content));
}
Expand All @@ -155,7 +155,7 @@ public static function createFromString(string $content): self
*
* @return static
*/
public static function createFromPath(string $path, string $open_mode = 'r+', $context = null): self
public static function createFromPath(string $path, string $open_mode = 'r+', $context = null)
{
return new static(Stream::createFromPath($path, $open_mode, $context));
}
Expand Down
2 changes: 1 addition & 1 deletion src/Reader.php
Expand Up @@ -64,7 +64,7 @@ class Reader extends AbstractCsv implements Countable, IteratorAggregate, JsonSe
/**
* {@inheritdoc}
*/
public static function createFromPath(string $path, string $open_mode = 'r', $context = null): AbstractCsv
public static function createFromPath(string $path, string $open_mode = 'r', $context = null)
{
return new static(Stream::createFromPath($path, $open_mode, $context));
}
Expand Down
4 changes: 2 additions & 2 deletions src/Stream.php
Expand Up @@ -167,7 +167,7 @@ public function __debugInfo()
*
* @return static
*/
public static function createFromPath(string $path, string $open_mode = 'r', $context = null): self
public static function createFromPath(string $path, string $open_mode = 'r', $context = null)
{
$args = [$path, $open_mode];
if (null !== $context) {
Expand All @@ -192,7 +192,7 @@ public static function createFromPath(string $path, string $open_mode = 'r', $co
*
* @return static
*/
public static function createFromString(string $content): self
public static function createFromString(string $content)
{
$resource = fopen('php://temp', 'r+');
fwrite($resource, $content);
Expand Down

0 comments on commit 2e412a3

Please sign in to comment.