Skip to content

Commit

Permalink
add single/double quote recommendations
Browse files Browse the repository at this point in the history
  • Loading branch information
mjauvin committed Jul 6, 2024
1 parent ac51d64 commit af134d1
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions architecture/developer-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,26 @@ $items = [
];
```

#### Use of single / double quotes

Winter CMS highly recommends the use of single quotes around strings instead of double quotes. If such a string contains itself a single quote, we recommend escaping that single quote within the string.

**Recommended:**

```php
$translations = [
'key1' => 'key1\'s value',
];
```

**Not recommended**:

```php
$translations = [
'key1' => "key1's value",
];
```

## Developer standards and patterns

### Vendor naming
Expand Down

0 comments on commit af134d1

Please sign in to comment.