Skip to content
This repository was archived by the owner on Dec 29, 2020. It is now read-only.

Commit f5712a8

Browse files
committed
Enhance README.md
1 parent 2ea0578 commit f5712a8

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

README.md

+34
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,40 @@ Please [report](https://github.com/dunglas/phpdoc-to-typehint/issues) any bug yo
1818

1919
You're project should have scalar type hints and return type declarations.
2020

21+
Before:
22+
23+
```php
24+
<?php
25+
26+
/*
27+
* @param int|null $a
28+
* @param string $b
29+
*
30+
* @return float
31+
*/
32+
function bar($a, $b, bool $c, callable $d = null)
33+
{
34+
return 0.0;
35+
}
36+
```
37+
38+
After:
39+
40+
```php
41+
<?php
42+
43+
/*
44+
* @param int|null $a
45+
* @param string $b
46+
*
47+
* @return float
48+
*/
49+
function bar(int $a = null, string $b, bool $c, callable $d = null) : float
50+
{
51+
return 0.0;
52+
}
53+
```
54+
2155
## Credits
2256

2357
Created by [Kévin Dunglas](https://dunglas.fr). Sponsored by [Les-Tilleuls.coop](https://les-tilleuls.coop).

0 commit comments

Comments
 (0)