File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed
src/Standards/Generic/Docs/PHP Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ <documentation title =" Require Strict Types" >
2+ <standard >
3+ <![CDATA[
4+ PHP files should declare strict types.
5+ ]]>
6+ </standard >
7+ <code_comparison >
8+ <code title =" Valid: Strict types declaration is present and enabled." >
9+ <![CDATA[
10+ <?php
11+
12+ declare(strict_types=1);
13+ ]]>
14+ </code >
15+ <code title =" Invalid: Missing required strict_types declaration." >
16+ <![CDATA[
17+ <?php
18+
19+ $a = 'foo';
20+ ]]>
21+ </code >
22+ </code_comparison >
23+ <standard >
24+ <![CDATA[
25+ Strict types should be enabled.
26+ ]]>
27+ </standard >
28+ <code_comparison >
29+ <code title =" Valid: Strict types declaration is present and enabled." >
30+ <![CDATA[
31+ <?php declare(ticks=1, strict_types=1);
32+ ]]>
33+ </code >
34+ <code title =" Invalid: Required strict_types declaration found, but it is disabled." >
35+ <![CDATA[
36+ <?php declare(ticks=1, strict_types=0);
37+ ]]>
38+ </code >
39+ </code_comparison >
40+ </documentation >
You can’t perform that action at this time.
0 commit comments