Skip to content

Commit 03cbede

Browse files
committed
Add docs
Builder classes don't apply filters
1 parent b9935c8 commit 03cbede

32 files changed

+241
-80
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
uses: shivammathur/setup-php@v2
2626
with:
2727
php-version: ${{ matrix.php }}
28-
extensions: mbstring, json
28+
extensions: mbstring
2929
coverage: ${{ matrix.coverage && 'xdebug' || 'none' }}
3030

3131
- name: Install dependencies

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
"wol-soft/php-micro-template": "^1.10.0",
1717

1818
"php": ">=8.0",
19-
"ext-json": "*",
2019
"ext-mbstring": "*"
2120
},
2221
"require-dev": {

docs/source/combinedSchemas/allOf.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Generated interface:
3030

3131
.. code-block:: php
3232
33-
public function setExample(float $example): self;
33+
public function setExample(float $example): static;
3434
public function getExample(): float;
3535
3636

docs/source/combinedSchemas/anyOf.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Generated interface:
3030

3131
.. code-block:: php
3232
33-
public function setExample(float $example): self;
33+
public function setExample(float $example): static;
3434
public function getExample(): float;
3535
3636

docs/source/combinedSchemas/if.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Generated interface:
3030

3131
.. code-block:: php
3232
33-
public function setExample(float $example): self;
33+
public function setExample(float $example): static;
3434
public function getExample(): ?float;
3535
3636
Possible exception (in this case 50 was provided so the if condition succeeds but the then branch failed):
@@ -112,8 +112,8 @@ Generated interface:
112112

113113
.. code-block:: php
114114
115-
public function setCountry(string $country): self;
115+
public function setCountry(string $country): static;
116116
public function getCountry(): ?string;
117117
118-
public function setPostalCode(string $country): self;
118+
public function setPostalCode(string $country): static;
119119
public function getPostalCode(): ?string;

docs/source/combinedSchemas/mergedProperty.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,14 @@ Generated interface:
5353
.. code-block:: php
5454
5555
# class Company
56-
public function setCeo(?Company_Merged_CEO $example): self;
56+
public function setCeo(Company_Merged_CEO $example): static;
5757
public function getCeo(): ?Company_Merged_CEO;
5858
5959
# class Company_Merged_CEO
6060
public function getName(): ?string
61-
public function setName(?string $name): self
61+
public function setName(string $name): static
6262
public function getAge(): ?int
63-
public function setAge(?int $name): self
63+
public function setAge(int $name): static
6464
6565
If your composition is defined on object level the object will gain access to all properties of the combined schemas:
6666

@@ -99,6 +99,6 @@ This schema will generate three classes as no merged property is created. The ma
9999
100100
# class CEO
101101
public function getName(): ?string
102-
public function setName(?string $name): self
102+
public function setName(string $name): static
103103
public function getAge(): ?int
104-
public function setAge(?int $name): self
104+
public function setAge(int $name): static

docs/source/combinedSchemas/not.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Generated interface:
2121

2222
.. code-block:: php
2323
24-
public function setExample($example): self;
24+
public function setExample($example): static;
2525
public function getExample();
2626
2727

docs/source/combinedSchemas/oneOf.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Generated interface:
3030

3131
.. code-block:: php
3232
33-
public function setExample(float $example): self;
33+
public function setExample(float $example): static;
3434
public function getExample(): float;
3535
3636

docs/source/complexTypes/array.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Generated interface:
2424

2525
.. code-block:: php
2626
27-
public function setExample(array $example): self;
27+
public function setExample(array $example): static;
2828
// As the property is not required it may be initialized with null. Consequently the return value is nullable
2929
public function getExample(): ?array;
3030
@@ -118,14 +118,14 @@ In this case the model generator will generate two classes: **Family** and **Mem
118118
.. code-block:: php
119119
120120
// class Family
121-
public function setMembers(array $members): self;
121+
public function setMembers(array $members): static;
122122
public function getMembers(): ?array;
123123
124124
// class Member
125-
public function setName(string $name): self;
125+
public function setName(string $name): static;
126126
public function getName(): string;
127127
128-
public function setAge(int $age): self;
128+
public function setAge(int $age): static;
129129
public function getAge(): ?int;
130130
131131
The *getMembers* function of the class *Family* is type hinted with *@returns Member[]*. Consequently auto completion is available when developing something like:

docs/source/complexTypes/enum.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Generated interface:
2424

2525
.. code-block:: php
2626
27-
public function setExample(?string $example): self;
27+
public function setExample(string $example): static;
2828
public function getExample(): ?string;
2929
3030
Possible exceptions:
@@ -53,7 +53,7 @@ Generated interface (no typehints are generated as it's a mixed untyped enum. If
5353

5454
.. code-block:: php
5555
56-
public function setExample($example): self;
56+
public function setExample($example): static;
5757
public function getExample();
5858
5959
Possible exceptions:

0 commit comments

Comments
 (0)