Skip to content

Commit

Permalink
Provided 'sql_injection_subst' stub & description; updated the 'map' …
Browse files Browse the repository at this point in the history
…description
  • Loading branch information
zeitgen authored and MaXal committed Mar 3, 2021
1 parent d3b74b5 commit ec9e109
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion meta/.phpstorm.meta.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* @see map()
* @see type()
* @see elementType()
* @see sql_injection_subst()
* @return mixed override pair object
*/
function override($callable, $override) {
Expand All @@ -18,7 +19,12 @@ function override($callable, $override) {
* map argument with #$argNum Literal value to one of expressions
* @param mixed $argNum ignored, for now its always 0
* @param mixed $map Key-value pairs: string_literal|const|class_const => class_name::class|pattern_literal
* where pattern literal can contain @ char to be replaced with argument literal value
* where pattern literal can contain @ char to be replaced with argument literal value.
*
* When used with sql_injection_subst(), string literal key-value pairs act as replacement rules: pattern => replacement.
* These rules are applied in SQL injections in an IDE and enable support for dynamically-prefixed database table names.
*
* @see sql_injection_subst()
* @return mixed overrides map object
*/
function map($map) {
Expand All @@ -43,6 +49,17 @@ function elementType($argNum) {
return "elementType $argNum";
}

/**
* Provides an IDE with a set of replacement rules that are applied in SQL injections.
* Replacement rules are specified as string literal key-value pairs in the map() call.
* @param mixed $argNum ignored, for now its always 0
* @see map()
* @return mixed
*/
function sql_injection_subst($argNum) {
return "sql_injection_subst $argNum";
}

override(\array_shift(0), elementType(0));
override(\array_filter(0), type(0));
override(\array_reverse(0), type(0));
Expand Down

0 comments on commit ec9e109

Please sign in to comment.