1 | <?php |
||
25 | class BalloonFactory |
||
26 | { |
||
27 | /** |
||
28 | * @var IFileReaderFactory |
||
29 | */ |
||
30 | private $fileReaderBridgeFactory; |
||
31 | |||
32 | /** |
||
33 | * @var Serializer |
||
34 | */ |
||
35 | private $serializer; |
||
36 | |||
37 | /** |
||
38 | * @param IFileReaderFactory $fileReaderBridgeFactory |
||
|
|||
39 | * @param Serializer $serializer |
||
40 | */ |
||
41 | public function __construct(IFileReaderFactory $fileReaderBridgeFactory = null, Serializer $serializer = null) |
||
46 | |||
47 | /** |
||
48 | * @param string $filePath |
||
49 | * @param string $className |
||
50 | * @param string $primaryKey |
||
51 | * @return Balloon |
||
52 | */ |
||
53 | public function create($filePath, $className = '', $primaryKey = '') |
||
62 | |||
63 | /** |
||
64 | * @param string $filePath |
||
65 | * @param string $className |
||
66 | * @param string $primaryKey |
||
67 | * @param int $flags |
||
68 | * @return Balloon |
||
69 | */ |
||
70 | public function json($filePath, $className = '', $primaryKey = '', $flags = null) |
||
78 | |||
79 | /** |
||
80 | * @param string $filePath |
||
81 | * @param string $className |
||
82 | * @param string $primaryKey |
||
83 | * @param int $dumpLevel |
||
84 | * @return Balloon |
||
85 | */ |
||
86 | public function yml($filePath, $className = '', $primaryKey = '', $dumpLevel = 0) |
||
99 | |||
100 | protected function getClassName() |
||
104 | |||
105 | /** |
||
106 | * @param IFileReader $formatDecorator |
||
107 | * @param string $className |
||
108 | * @param string $primaryKey |
||
109 | * @return Balloon |
||
110 | */ |
||
111 | private function instantiate(IFileReader $formatDecorator, $className, $primaryKey) |
||
129 | } |
||
130 |
This check looks for
@param
annotations where the type inferred by our type inference engine differs from the declared type.It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.