1 | <?php |
||
11 | abstract class AbstractOperation |
||
12 | { |
||
13 | /** |
||
14 | * @var string |
||
15 | */ |
||
16 | const DEFAULT_TYPE = 'string'; |
||
17 | /** |
||
18 | * @var string |
||
19 | */ |
||
20 | const SOAP_CALL_NAME = '__call'; |
||
21 | /** |
||
22 | * @var MethodModel |
||
23 | */ |
||
24 | protected $method; |
||
25 | /** |
||
26 | * @var Generator |
||
27 | */ |
||
28 | protected $generator; |
||
29 | /** |
||
30 | * @param MethodModel $method |
||
31 | * @param Generator $generator |
||
32 | */ |
||
33 | 84 | public function __construct(MethodModel $method, Generator $generator) |
|
37 | /** |
||
38 | * @return StructModel|null |
||
39 | */ |
||
40 | 84 | protected function getParameterTypeModel() |
|
44 | /** |
||
45 | * @return bool |
||
46 | */ |
||
47 | 8 | protected function isParameterTypeEmpty() |
|
52 | /** |
||
53 | * @return bool |
||
54 | */ |
||
55 | 84 | protected function isParameterTypeAnArray() |
|
59 | /** |
||
60 | * @param bool $methodUsage |
||
61 | * @return string[] |
||
62 | */ |
||
63 | 76 | protected function getParameterTypeArrayTypes($methodUsage = false) |
|
78 | /** |
||
79 | * @return bool |
||
80 | */ |
||
81 | 84 | protected function isParameterTypeAString() |
|
85 | /** |
||
86 | * @return bool |
||
87 | */ |
||
88 | 84 | protected function isParameterTypeAModel() |
|
92 | /** |
||
93 | * @param string $name |
||
94 | * @return string |
||
95 | */ |
||
96 | 84 | protected function getParameterName($name) |
|
100 | /** |
||
101 | * @param string $name |
||
102 | * @param string $type |
||
103 | * @return PhpFunctionParameter |
||
104 | */ |
||
105 | 84 | protected function getMethodParameter($name, $type = null) |
|
113 | /** |
||
114 | * @param Generator $generator |
||
115 | * @return AbstractOperation |
||
116 | */ |
||
117 | 84 | public function setGenerator(Generator $generator) |
|
122 | /** |
||
123 | * @return Generator |
||
124 | */ |
||
125 | 84 | public function getGenerator() |
|
129 | /** |
||
130 | * @param MethodModel $method |
||
131 | * @return AbstractOperation |
||
132 | */ |
||
133 | 84 | public function setMethod(MethodModel $method) |
|
138 | /** |
||
139 | * @return MethodModel |
||
140 | */ |
||
141 | 84 | public function getMethod() |
|
145 | /** |
||
146 | * @param string $name |
||
147 | * @return StructModel|null |
||
148 | */ |
||
149 | 20 | protected function getModelByName($name) |
|
153 | } |
||
154 |
This check looks at variables that are passed out again to other methods.
If the outgoing method call has stricter type requirements than the method itself, an issue is raised.
An additional type check may prevent trouble.