Re-add syntax highlighting to daily emails and
...ATDC lessons
This commit is contained in:
parent
0d9bb37503
commit
5fbf48d9ac
48 changed files with 186 additions and 165 deletions
|
|
@ -10,7 +10,7 @@ tags:
|
|||
|
||||
When writing object-orientated code, particularly in PHP, you usually write method names using camel-case letters - such as:
|
||||
|
||||
```php
|
||||
```language-php
|
||||
public function doSomething(): void {
|
||||
// ...
|
||||
}
|
||||
|
|
@ -18,7 +18,7 @@ public function doSomething(): void {
|
|||
|
||||
This is also true when writing methods within a test class - only that the method name is prefixed with the word `test`:
|
||||
|
||||
```php
|
||||
```language-php
|
||||
public function testSomething(): void {
|
||||
}
|
||||
```
|
||||
|
|
@ -27,7 +27,7 @@ This is probably expected and complies with the PSR code style standards like PS
|
|||
|
||||
Something that I've seen some PHP developers and some frameworks prefer is to write their test methods using snake-case letters and commonly removing the `test` prefix in favour of using an annotation:
|
||||
|
||||
```php
|
||||
```language-php
|
||||
/** @test */
|
||||
public function the_api_should_return_a_200_response_code_if_everything_is_ok(): void {
|
||||
// ...
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue