Issues (210)

src/GraphNavigatorInterface.php (1 issue)

Labels
Severity
1
<?php
2
3
declare(strict_types=1);
4
5
namespace JMS\Serializer;
6
7
use JMS\Serializer\Exception\NotAcceptableException;
8
use JMS\Serializer\Type\Type;
9
10
/**
11
 * @phpstan-import-type TypeArray from Type
12
 */
13
interface GraphNavigatorInterface
14
{
15
    public const DIRECTION_SERIALIZATION = 1;
16
    public const DIRECTION_DESERIALIZATION = 2;
17
18
    /**
19
     * Called at the beginning of the serialization process. The navigator should use the traverse the object graph
20
     * and pass to the $visitor the value of found nodes (following the rules obtained from $context).
21
     */
22
    public function initialize(VisitorInterface $visitor, Context $context): void;
23
24
    /**
25
     * Called for each node of the graph that is being traversed.
26
     *
27
     * @param mixed $data the data depends on the direction, and type of visitor
28
     * @param TypeArray|null $type array has the format ["name" => string, "params" => array]
0 ignored issues
show
The type JMS\Serializer\TypeArray was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
29
     *
30
     * @return mixed the return value depends on the direction, and type of visitor
31
     *
32
     * @throws NotAcceptableException
33
     */
34
    public function accept($data, ?array $type = null);
35
}
36