Re-add syntax highlighting to daily emails and

...ATDC lessons
This commit is contained in:
Oliver Davies 2024-02-18 01:35:59 +00:00
parent 0d9bb37503
commit 5fbf48d9ac
48 changed files with 186 additions and 165 deletions

View file

@ -12,7 +12,7 @@ Following yesterday's email about input validation, guard clauses and assertion
For example:
```php
```language-php
function createJourney(string $from, string $to, int $duration): void {
var_dump($from, $to, $duration);
}
@ -22,13 +22,13 @@ In this code, each parameter has a type, but there's no validation on the values
If I run this:
```plain
```language-plain
createJourney('', '', -10);
```
I would get this output:
```plain
```language-plain
string(0) ""
string(0) ""
int(-10)
@ -44,7 +44,7 @@ I can use an assertion library or throw my own Exceptions if the values pass the
For example:
```php
```language-php
function createJourney(string $from, string $to, int $duration): void {
Assert::stringNotEmpty($from);
Assert::stringNotEmpty($to);