Skip to content

Commit d3983c4

Browse files
tikifezrodrigoprimo
authored andcommitted
Adds documentation for PregQuoteDelimiter
1 parent f48a181 commit d3983c4

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0"?>
2+
<documentation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="https://phpcsstandards.github.io/PHPCSDevTools/phpcsdocs.xsd"
4+
title="Preg Quote Delimiter"
5+
>
6+
<standard>
7+
<![CDATA[
8+
Passing the $delimiter parameter to preg_quote() is strongly recommended. If it is not passed, the default delimiters `/` are presumed, which is often wrong.
9+
]]>
10+
</standard>
11+
<code_comparison>
12+
<code title="Valid: The delimiter is included.">
13+
<![CDATA[
14+
preg_quote( $dir, '#' )
15+
]]>
16+
</code>
17+
<code title="Invalid: The delimiter is not included.">
18+
<![CDATA[
19+
preg_quote( $dir );
20+
]]>
21+
</code>
22+
</code_comparison>
23+
</documentation>

0 commit comments

Comments
 (0)