Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-Authored-By: David Négrier <[email protected]>
  • Loading branch information
Kharhamel and moufmouf authored Sep 23, 2019
1 parent 35c9cc2 commit 9084748
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ $ php ./safe.php generate

## Special cases

In some cases, automatic generation is to difficult to execute and the function has to be written manually.
In some cases, automatic generation is too difficult to execute and the function has to be written manually.
This should however only be done exceptionally in order to keep the project easy to maintain.
The most important example are all the functions of the classes DateTime and DateTimeImmutable, since the entire classes have to be overloaded.
The most important examples are all the functions of the classes `DateTime` and `DateTimeImmutable`, since the entire classes have to be overloaded manually.
All custom objects must be located in lib/ and custom functions must be in lib/special_cases.php.

### Submitting a PR
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ $content = file_get_contents('foobar.json');
$foobar = json_decode($content);
```

All PHP functions that can return 'false' on error are part of Safe.
In addition, Safe also provide 2 'Safe' classes: Safe\DateTime and Safe\DateTimeImmutable whose methods will throw exceptions instead of returning false.
All PHP functions that can return `false` on error are part of Safe.
In addition, Safe also provide 2 'Safe' classes: `Safe\DateTime` and `Safe\DateTimeImmutable` whose methods will throw exceptions instead of returning false.

## PHPStan integration

Expand Down
2 changes: 1 addition & 1 deletion lib/DateTime.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use DateTimeZone;
use Safe\Exceptions\DatetimeException;

//this class is used to implement a safe version of the Datetime
/** this class implements a safe version of the Datetime class */
class DateTime extends \DateTime
{
//switch from regular datetime to safe version
Expand Down

0 comments on commit 9084748

Please sign in to comment.