Skip to content

Commit e9e7b1d

Browse files
committed
Fix language typos
1 parent a9d736f commit e9e7b1d

File tree

1 file changed

+76
-16
lines changed

1 file changed

+76
-16
lines changed

Writerside/topics/language.md

Lines changed: 76 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,55 @@ static code analysis tools: [PHPStan](https://phpstan.org/) and [Psalm](https://
1414
> The logical component (the physical existence of the type) is **NOT**
1515
> taken into account.
1616
17+
General table across all type parsing capabilities
18+
19+
<table style="header-row">
20+
<tr>
21+
<td>
22+
<icon src="typelang.svg" height="16"/>&nbsp;<a href="https://github.com/php-type-language">TypeLang</a>
23+
</td>
24+
<td>
25+
<icon src="psalm.png" height="16"/>&nbsp;<a href="https://github.com/vimeo/psalm">Psalm</a>
26+
</td>
27+
<td>
28+
<icon src="phpstan.png" height="16"/>&nbsp;<a href="https://github.com/phpstan">PHPStan</a>
29+
</td>
30+
<td>
31+
<icon src="phan.png" height="16"/>&nbsp;<a href="https://github.com/phan">PHAN</a>
32+
</td>
33+
<td>
34+
<icon src="phpdocumentor.png" height="16"/>&nbsp;<a href="https://github.com/phpDocumentor">phpDocumentor</a>
35+
</td>
36+
</tr>
37+
<tr>
38+
<td>
39+
<note>
40+
<format style="bold" color="DarkSeaGreen">32/32</format>
41+
</note>
42+
</td>
43+
<td>
44+
<warning>
45+
<format style="bold" color="RosyBrown">19/32</format>
46+
</warning>
47+
</td>
48+
<td>
49+
<warning>
50+
<format style="bold" color="RosyBrown">25/32</format>
51+
</warning>
52+
</td>
53+
<td>
54+
<tip>
55+
<format style="bold" color="DarkGray">?/32</format>
56+
</tip>
57+
</td>
58+
<td>
59+
<tip>
60+
<format style="bold" color="DarkGray">?/32</format>
61+
</tip>
62+
</td>
63+
</tr>
64+
</table>
65+
1766
## Basic Types
1867

1968
Below is a list of simple, logical and other common types.
@@ -1039,7 +1088,7 @@ Below is a list of grammar of shaped types.
10391088
<td></td>
10401089
<td colspan="5">
10411090
<deflist collapsible="true">
1042-
<def title="1. Psalm supports only array and object types" id="ref-4-1">
1091+
<def title="1. Psalm does not support custom (class instances) objects" id="ref-4-1">
10431092
<code-block lang="typescript">
10441093
// OK
10451094
object {
@@ -1081,7 +1130,7 @@ Below is a list of grammar of shaped types.
10811130
<td></td>
10821131
<td colspan="5">
10831132
<deflist collapsible="true">
1084-
<def title="1. Psalm supports only array and object types" id="ref-5-1">
1133+
<def title="1. Psalm does not support custom (class instances) objects" id="ref-5-1">
10851134
<code-block lang="typescript">
10861135
// OK
10871136
object {
@@ -1123,7 +1172,7 @@ Below is a list of grammar of shaped types.
11231172
<td></td>
11241173
<td colspan="5">
11251174
<deflist collapsible="true">
1126-
<def title="1. Psalm supports only array and object types" id="ref-6-1">
1175+
<def title="1. Psalm does not support custom (class instances) objects" id="ref-6-1">
11271176
<code-block lang="typescript">
11281177
// OK
11291178
object {
@@ -1190,7 +1239,7 @@ Below is a list of grammar of shaped types.
11901239
<td></td>
11911240
<td colspan="5">
11921241
<deflist collapsible="true">
1193-
<def title="1. Psalm supports only array and object types" id="ref-7-1">
1242+
<def title="1. Psalm does not support custom (class instances) objects" id="ref-7-1">
11941243
<code-block lang="typescript">
11951244
// OK
11961245
object {
@@ -1230,7 +1279,7 @@ Below is a list of grammar of shaped types.
12301279
<td></td>
12311280
<td colspan="5">
12321281
<deflist collapsible="true">
1233-
<def title="1. Psalm supports only array and object types" id="ref-8-1">
1282+
<def title="1. Psalm does not support custom (class instances) objects" id="ref-8-1">
12341283
<code-block lang="typescript">
12351284
// OK
12361285
object {}
@@ -1266,7 +1315,7 @@ Below is a list of grammar of shaped types.
12661315
<td></td>
12671316
<td colspan="5">
12681317
<deflist collapsible="true">
1269-
<def title="1. Psalm supports only array and object types" id="ref-9-1">
1318+
<def title="1. Psalm does not support custom (class instances) objects" id="ref-9-1">
12701319
<code-block lang="typescript">
12711320
// OK
12721321
object { ... }
@@ -1305,7 +1354,7 @@ Below is a list of grammar of shaped types.
13051354
<td></td>
13061355
<td colspan="5">
13071356
<deflist collapsible="true">
1308-
<def title="1. Psalm supports only array and object types" id="ref-10-1">
1357+
<def title="1. Psalm does not support custom (class instances) objects" id="ref-10-1">
13091358
<code-block lang="typescript">
13101359
// OK
13111360
object {
@@ -1350,7 +1399,7 @@ Below is a list of grammar of shaped types.
13501399
<td></td>
13511400
<td colspan="5">
13521401
<deflist collapsible="true">
1353-
<def title="1. Psalm supports only array and object types" id="ref-11-1">
1402+
<def title="1. Psalm does not support custom (class instances) objects" id="ref-11-1">
13541403
<code-block lang="typescript">
13551404
// OK
13561405
object {
@@ -1386,20 +1435,15 @@ Below is a list of grammar of shaped types.
13861435
<td></td>
13871436
<td><icon src="ok.svg"/></td>
13881437
<td><icon src="warning.svg"/> <a anchor="ref-12-1">Works with restrictions <sup>1</sup></a></td>
1389-
<td>
1390-
<icon src="ko.svg"/>
1391-
<a href="https://phpstan.org/r/401619e4-36a2-4c30-94eb-16c40a62c7ad">
1392-
Not Supported
1393-
</a>
1394-
</td>
1438+
<td><icon src="warning.svg"/> <a anchor="ref-12-2">Works with restrictions <sup>1</sup></a></td>
13951439
<td><icon src="unknown.svg"/></td>
13961440
<td><icon src="unknown.svg"/></td>
13971441
</tr>
13981442
<tr>
13991443
<td></td>
14001444
<td colspan="5">
14011445
<deflist collapsible="true">
1402-
<def title="1. Psalm supports only array and object types" id="ref-12-1">
1446+
<def title="1. Psalm does not support custom (class instances) objects" id="ref-12-1">
14031447
<code-block lang="typescript">
14041448
// OK
14051449
object {
@@ -1414,6 +1458,22 @@ Below is a list of grammar of shaped types.
14141458
</code-block>
14151459
<a href="https://psalm.dev/r/487c82502c">Open in psalm.dev</a>
14161460
</def>
1461+
<def title="2. PHPStan does not support some built-in types such as list (hardcoded in the parser)" id="ref-12-2">
1462+
<code-block lang="typescript">
1463+
// OK
1464+
array {
1465+
...&lt;array-key, Type>
1466+
}
1467+
</code-block>
1468+
<code-block lang="typescript">
1469+
// Syntax Error
1470+
list {
1471+
array-key,
1472+
...&lt;Type>
1473+
}
1474+
</code-block>
1475+
<a href="https://phpstan.org/r/d89fdfaf-cee8-4737-b5fd-c9145458da6a">Open in phpstan.org</a>
1476+
</def>
14171477
</deflist>
14181478
</td>
14191479
</tr>
@@ -1431,7 +1491,7 @@ Below is a list of grammar of shaped types.
14311491
</td>
14321492
<td>
14331493
<warning>
1434-
<format style="bold" color="RosyBrown">9/10</format>
1494+
<format style="bold" color="RosyBrown">10/10</format>
14351495
</warning>
14361496
</td>
14371497
<td>

0 commit comments

Comments
 (0)