1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-21 13:21:22 +01:00

Merge pull request #6438 from SCIF/serializable-interface

Changed signature of Serializable::unserialize stub
This commit is contained in:
orklah 2021-09-20 16:49:00 +02:00 committed by GitHub
commit 7328456a33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 11 deletions

View File

@ -426,15 +426,15 @@ class ArrayObject implements IteratorAggregate, ArrayAccess, Serializable, Count
interface Serializable {
/**
* @return string the string representation of the object or null
* @return null|string
*/
public function serialize();
/**
* @param string $serialized <p>
* @param string $data
* @return void
*/
public function unserialize($serialized);
public function unserialize($data);
}
/**

View File

@ -1376,14 +1376,6 @@ class MethodSignatureTest extends TestCase
}',
'error_message' => 'MoreSpecificImplementedParamType',
],
'preventImplementingSerializableWithType' => [
'<?php
class Foo implements \Serializable {
public function unserialize(string $serialized) {}
public function serialize() {}
}',
'error_message' => 'InvalidReturnType',
],
'preventImplementingSerializableWithWrongDocblockType' => [
'<?php
class Foo implements \Serializable {