File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
src/Psalm/Internal/PhpVisitor/Reflector Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -238,6 +238,13 @@ public static function parse(
238238
239239 if (count ($ param_parts ) >= 2 ) {
240240 $ info ->taint_sink_params [] = ['name ' => $ param_parts [1 ], 'taint ' => $ param_parts [0 ]];
241+ } else {
242+ IssueBuffer::maybeAdd (
243+ new InvalidDocblock (
244+ '@psalm-taint-sink expects 2 arguments ' ,
245+ $ code_location ,
246+ ),
247+ );
241248 }
242249 }
243250 }
@@ -279,6 +286,13 @@ public static function parse(
279286
280287 if ($ param_parts [0 ]) {
281288 $ info ->taint_source_types [] = $ param_parts [0 ];
289+ } else {
290+ IssueBuffer::maybeAdd (
291+ new InvalidDocblock (
292+ '@psalm-taint-source expects 1 argument ' ,
293+ $ code_location ,
294+ ),
295+ );
282296 }
283297 }
284298 } elseif (isset ($ parsed_docblock ->tags ['return-taint ' ])) {
Original file line number Diff line number Diff line change @@ -759,7 +759,7 @@ private function getBody() : string {
759759 * @template TSource as self::SOURCE_*
760760 * @param TSource $source
761761 * @return (TSource is "BODY" ? object|list : array)
762- * @psalm-taint-source
762+ * @psalm-taint-source input
763763 */
764764 public function getParams(
765765 string $source = self::SOURCE_GET
You can’t perform that action at this time.
0 commit comments