Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrectly overriden static type-hint in Reader and AbstractCsv #285

Merged
merged 3 commits into from Mar 5, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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