1 | <?php |
||||||
2 | |||||||
3 | declare(strict_types=1); |
||||||
4 | |||||||
5 | namespace Metadata; |
||||||
6 | |||||||
7 | trait SerializationHelper |
||||||
8 | { |
||||||
9 | /** |
||||||
10 | * @deprecated Use serializeToArray |
||||||
11 | * |
||||||
12 | * @return string |
||||||
13 | */ |
||||||
14 | public function serialize() |
||||||
15 | { |
||||||
16 | return serialize($this->serializeToArray()); |
||||||
0 ignored issues
–
show
|
|||||||
17 | } |
||||||
18 | |||||||
19 | /** |
||||||
20 | * @deprecated Use unserializeFromArray |
||||||
21 | * |
||||||
22 | * @param string $str |
||||||
23 | * |
||||||
24 | * @return void |
||||||
25 | */ |
||||||
26 | public function unserialize($str) |
||||||
27 | { |
||||||
28 | $this->unserializeFromArray(unserialize($str)); |
||||||
0 ignored issues
–
show
The method
unserializeFromArray() does not exist on Metadata\SerializationHelper . Did you maybe mean serialize() ?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. ![]() |
|||||||
29 | } |
||||||
30 | |||||||
31 | public function __serialize(): array |
||||||
32 | { |
||||||
33 | return [$this->serialize()]; |
||||||
0 ignored issues
–
show
The function
Metadata\SerializationHelper::serialize() has been deprecated: Use serializeToArray
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This function has been deprecated. The supplier of the function has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead. ![]() |
|||||||
34 | } |
||||||
35 | |||||||
36 | public function __unserialize(array $data): void |
||||||
37 | { |
||||||
38 | $this->unserialize($data[0]); |
||||||
0 ignored issues
–
show
The function
Metadata\SerializationHelper::unserialize() has been deprecated: Use unserializeFromArray
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This function has been deprecated. The supplier of the function has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead. ![]() |
|||||||
39 | } |
||||||
40 | } |
||||||
41 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.