Skip to content

Commit 36ed0aa

Browse files
committed
Improve tag formatting and fix some typos
1 parent f51c32b commit 36ed0aa

287 files changed

Lines changed: 8658 additions & 695 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Writerside/cfg/glossary.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
<!DOCTYPE terms SYSTEM "https://resources.jetbrains.com/writerside/1.0/glossary.dtd">
33
<terms>
44
<term name="FQN">Fully Qualified Name</term>
5+
<term name="AST">Abstract Syntax Tree: a tree representation of the
6+
structure of parsed source code, where each node describes a
7+
construct occurring in it</term>
58
<term name="Identifier">A sequence that begins with a letter and contains
69
letters, numbers, underscores, and dashes</term>
710
<term name="publicity-or-privacy">The use of a work free of known copyright

Writerside/labels.list

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,6 @@
2222
The implementation of the functionality available for installation
2323
of "type-lang/phpdoc" component.
2424
</primary-label>
25-
<primary-label href="https://packagist.org/packages/type-lang/phpdoc-standard-tags"
26-
id="phpdoc-standard-component" name="type-lang/phpdoc-standard-tags" short-name="e" color="strawberry">
27-
The implementation of the functionality available for installation
28-
of "type-lang/phpdoc-standard-tags" component.
29-
30-
This is an extension to the core "type-lang/phpdoc" component.
31-
</primary-label>
32-
<primary-label href="https://packagist.org/packages/type-lang/phpdoc-template-tags"
33-
id="phpdoc-template-component" name="type-lang/phpdoc-template-tags" short-name="e" color="strawberry">
34-
The implementation of the functionality available for installation
35-
of "type-lang/phpdoc-template-tags" component.
36-
37-
This is an extension to the core "type-lang/phpdoc" component.
38-
</primary-label>
3925
<primary-label href="https://packagist.org/packages/type-lang/reader"
4026
id="reader-component" name="type-lang/reader" short-name="c" color="purple">
4127
The implementation of the functionality available for installation
@@ -46,11 +32,16 @@
4632
third-party tools (e.g. PHPStan or Psalm) and has no alternatives.
4733
</primary-label>
4834

49-
<secondary-label id="wip" name="WIP" color="red">Work in progress</secondary-label>
35+
<secondary-label id="wip" name="WIP" color="red">Work in progress. Documentation may be outdated or incomplete</secondary-label>
5036
<secondary-label id="beta" name="β" color="tangerine">Beta</secondary-label>
5137
<secondary-label id="tl1.1" name="TypeLang >= 1.1" color="strawberry">Available since type-lang/parser 1.1+</secondary-label>
5238
<secondary-label id="tl1.2" name="TypeLang >= 1.2" color="strawberry">Available since type-lang/parser 1.2+</secondary-label>
5339
<secondary-label id="tl1.4" name="TypeLang >= 1.4" color="strawberry">Available since type-lang/parser 1.4+</secondary-label>
5440
<secondary-label id="tl1.6" name="TypeLang >= 1.6" color="strawberry">Available since type-lang/parser 1.6+</secondary-label>
5541
<secondary-label id="r1.1" name="TypeLang >= 1.1" color="strawberry">Available since type-lang/reader 1.1+</secondary-label>
42+
<secondary-label id="inline-tag" name="inline" color="tangerine">May also be used inline, as a "{@tag}" sequence inside a description</secondary-label>
43+
<secondary-label id="alias-tag" name="alias" color="gray">A different spelling recognized for an already documented tag</secondary-label>
44+
<secondary-label id="psalm-tag" name="Psalm" color="blue">Originates from Psalm's own annotation vocabulary</secondary-label>
45+
<secondary-label id="phpstan-tag" name="PHPStan" color="green">Originates from PHPStan's own annotation vocabulary</secondary-label>
46+
<secondary-label id="not-implemented" name="Not implemented" color="red">Not currently recognized by this parser; listed here for reference only</secondary-label>
5647
</labels>

Writerside/tl.tree

Lines changed: 276 additions & 49 deletions
Large diffs are not rendered by default.

Writerside/topics/contribution.md

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,6 @@ the <a href="contribution.md#security-issues">special procedure instead</a>.
3939
</warning>
4040

4141
You may submit a bug report using GitHub Issues.
42-
- [Documentation](https://github.com/php-type-language/docs/issues)
43-
- [Language Parser Component (type-lang/parser)](https://github.com/php-type-language/parser/issues)
44-
- [Mapper Component (type-lang/mapper)](https://github.com/php-type-language/mapper/issues)
45-
- [Printer Component (type-lang/printer)](https://github.com/php-type-language/printer/issues)
46-
- [Reader Component (type-lang/reader)](https://github.com/php-type-language/reader/issues)
47-
- [PHPDoc Parser Component (type-lang/phpdoc)](https://github.com/php-type-language/phpdoc/issues)
48-
- [PHPDoc Standard Tags (type-lang/phpdoc-standard-tags)](https://github.com/php-type-language/phpdoc-standard-tags/issues)
49-
- [PHPDoc Template Tags (type-lang/phpdoc-template-tags)](https://github.com/php-type-language/phpdoc-template-tags/issues)
5042

5143
Please follow some basic rules:
5244

@@ -148,7 +140,7 @@ provide a bug fix or to propose enhancements to TypeLang Components.
148140
</code-block>
149141
</step>
150142
<step>
151-
Checking and correcting coding style (we follow <a href="https://www.php-fig.org/per/coding-style/">PER Coding Style 2.0</a>).
143+
Checking and correcting coding style (we follow <a href="https://www.php-fig.org/per/coding-style/">PER Coding Style 3.0</a>).
152144
<code-block lang="Bash">
153145
composer phpcs:fix
154146
</code-block>
@@ -174,4 +166,4 @@ provide a bug fix or to propose enhancements to TypeLang Components.
174166
<step>
175167
You can now make a pull request on GitHub repository.
176168
</step>
177-
</procedure>
169+
</procedure>

Writerside/topics/data-mapper.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
# Data Mapper
1+
# Type Mapper
22

33
<primary-label ref="mapper-component" xmlns=""/>
4+
<secondary-label ref="wip"/>
45
<show-structure for="chapter" depth="2"/>
56

67
A mapper is a system that transforms internal data into external data
@@ -116,4 +117,4 @@ $mapper = new TypeLang\Mapper\Mapper(
116117
<a href="type-extractors.md">"type extractors" documentation</a></tip>
117118
- `typeParserFactory` - Allows to specify custom type parsing rules
118119
- `typeRepositoryFactory` - Allows to specify a custom implementation of
119-
the type registry (repository)
120+
the type registry (repository)

Writerside/topics/language/callable-types.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,12 +231,12 @@ An attribute is additional metadata for a parameter.
231231
232232
> Simple attribute with one argument for each callable parameter.
233233
> ```typescript
234-
> Example\Functor(#[type<int8>] int $a): void
234+
> Example\Functor(#[type(int8)] int $a): void
235235
> ```
236236
237237
> Multiple attributes in one group.
238238
> ```typescript
239-
> Example\Functor(#[type<int8>, const] int&): void
239+
> Example\Functor(#[type(int8), const] int&): void
240240
> ```
241241
242242
> Multiple attribute groups.
@@ -263,4 +263,4 @@ An attribute is additional metadata for a parameter.
263263
> {style="warning"}
264264
265265
</tab>
266-
</tabs>
266+
</tabs>

Writerside/topics/license.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
TypeLang code is released under the [MIT license](https://opensource.org/license/mit):
88

9-
Copyright (c) 2004-present Nesmeyanov Kirill
9+
Copyright (c) Nesmeyanov Kirill
1010

1111
Permission is hereby granted, free of charge, to any person obtaining a copy of
1212
this software and associated documentation files (the "Software"), to deal in
@@ -25,10 +25,10 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
2525
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
2626
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2727

28-
## Language (Grammar/Syntax) License
28+
## Specification License
2929

30-
Information about the TypeLang`s syntax and/or grammar is distributed
31-
under the [CC0 license](https://creativecommons.org/publicdomain/zero/1.0/deed.en).
30+
[TypeLang specification](https://typelang.dev/static/spec.html) is released under
31+
the [CC0 license](https://creativecommons.org/publicdomain/zero/1.0/deed.en).
3232

3333
### No Copyright
3434

@@ -56,4 +56,4 @@ of the work, to the fullest extent permitted by applicable law.
5656
When using or citing the work, you should not imply
5757
<a href="https://creativecommons.org/faq/#do-i-need-to-be-aware-of-anything-else-when-providing-attribution">
5858
<tooltip term="endorsement">endorsement</tooltip>
59-
</a> by the author or the affirmer.
59+
</a> by the author or the affirmer.

Writerside/topics/mapper/builders/custom-type-builder.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Custom Type Builder
22

3+
<secondary-label ref="wip"/>
4+
35
To create a custom type, it may make sense to create a factory (i.e., a type
46
builder). This ensures that the [type object](types.md) is created correctly
57
and with the required constructor arguments.
@@ -68,13 +70,9 @@ public function isSupported(TypeStatement $statement): bool
6870
}
6971
```
7072

71-
Each named type is implemented using
72-
[the `NamedTypeNode` instance](ast-type-statements.md#named-types).
73-
74-
<tip>
75-
A more detailed description of some of the available nodes in
76-
<a href="ast-type-statements.md">the <code>TypeStatement</code> documentation pages</a>
77-
</tip>
73+
Each named type is implemented using a `NamedTypeNode` instance — a plain
74+
DTO from the `type-lang/types` package, exposing `$name`, `$arguments`, and
75+
`$fields`.
7876

7977

8078
### Building

Writerside/topics/mapper/coercers/array-key-type-coercer.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Array Key Coercion
22

3+
<secondary-label ref="wip"/>
4+
35
<link-summary>
46
Cast passed value into a PHP "array key" type.
57
</link-summary>

Writerside/topics/mapper/coercers/bool-type-coercer.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Bool Coercion
22

3+
<secondary-label ref="wip"/>
4+
35
<link-summary>
46
Cast passed value into a PHP boolean type.
57
</link-summary>
@@ -55,4 +57,4 @@ filter_var($value, FILTER_VALIDATE_BOOLEAN);
5557
$coercer->coerce($value);
5658
// bool(true)
5759
</code-block>
58-
</warning>
60+
</warning>

0 commit comments

Comments
 (0)