mirror of
https://github.com/danog/psalm.git
synced 2025-01-21 21:31:13 +01:00
Merge pull request #6438 from SCIF/serializable-interface
Changed signature of Serializable::unserialize stub
This commit is contained in:
commit
7328456a33
@ -426,15 +426,15 @@ class ArrayObject implements IteratorAggregate, ArrayAccess, Serializable, Count
|
|||||||
|
|
||||||
interface Serializable {
|
interface Serializable {
|
||||||
/**
|
/**
|
||||||
* @return string the string representation of the object or null
|
* @return null|string
|
||||||
*/
|
*/
|
||||||
public function serialize();
|
public function serialize();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $serialized <p>
|
* @param string $data
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function unserialize($serialized);
|
public function unserialize($data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1376,14 +1376,6 @@ class MethodSignatureTest extends TestCase
|
|||||||
}',
|
}',
|
||||||
'error_message' => 'MoreSpecificImplementedParamType',
|
'error_message' => 'MoreSpecificImplementedParamType',
|
||||||
],
|
],
|
||||||
'preventImplementingSerializableWithType' => [
|
|
||||||
'<?php
|
|
||||||
class Foo implements \Serializable {
|
|
||||||
public function unserialize(string $serialized) {}
|
|
||||||
public function serialize() {}
|
|
||||||
}',
|
|
||||||
'error_message' => 'InvalidReturnType',
|
|
||||||
],
|
|
||||||
'preventImplementingSerializableWithWrongDocblockType' => [
|
'preventImplementingSerializableWithWrongDocblockType' => [
|
||||||
'<?php
|
'<?php
|
||||||
class Foo implements \Serializable {
|
class Foo implements \Serializable {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user