Skip to content

Commit ec9e109

Browse files
zeitgenMaXal
authored andcommitted
Provided 'sql_injection_subst' stub & description; updated the 'map' description
1 parent d3b74b5 commit ec9e109

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

meta/.phpstorm.meta.php

+18-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* @see map()
99
* @see type()
1010
* @see elementType()
11+
* @see sql_injection_subst()
1112
* @return mixed override pair object
1213
*/
1314
function override($callable, $override) {
@@ -18,7 +19,12 @@ function override($callable, $override) {
1819
* map argument with #$argNum Literal value to one of expressions
1920
* @param mixed $argNum ignored, for now its always 0
2021
* @param mixed $map Key-value pairs: string_literal|const|class_const => class_name::class|pattern_literal
21-
* where pattern literal can contain @ char to be replaced with argument literal value
22+
* where pattern literal can contain @ char to be replaced with argument literal value.
23+
*
24+
* When used with sql_injection_subst(), string literal key-value pairs act as replacement rules: pattern => replacement.
25+
* These rules are applied in SQL injections in an IDE and enable support for dynamically-prefixed database table names.
26+
*
27+
* @see sql_injection_subst()
2228
* @return mixed overrides map object
2329
*/
2430
function map($map) {
@@ -43,6 +49,17 @@ function elementType($argNum) {
4349
return "elementType $argNum";
4450
}
4551

52+
/**
53+
* Provides an IDE with a set of replacement rules that are applied in SQL injections.
54+
* Replacement rules are specified as string literal key-value pairs in the map() call.
55+
* @param mixed $argNum ignored, for now its always 0
56+
* @see map()
57+
* @return mixed
58+
*/
59+
function sql_injection_subst($argNum) {
60+
return "sql_injection_subst $argNum";
61+
}
62+
4663
override(\array_shift(0), elementType(0));
4764
override(\array_filter(0), type(0));
4865
override(\array_reverse(0), type(0));

0 commit comments

Comments
 (0)