Skip to content

Commit b5ba674

Browse files
TomasVotrubaondrejmirtes
authored andcommitted
README: add code colors
1 parent 5fab376 commit b5ba674

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ This extension provides following features:
2323

2424
To use this extension, require it in [Composer](https://getcomposer.org/):
2525

26-
```
26+
```bash
2727
composer require --dev phpstan/phpstan-doctrine
2828
```
2929

@@ -34,14 +34,14 @@ If you also install [phpstan/extension-installer](https://github.com/phpstan/ext
3434

3535
If you don't want to use `phpstan/extension-installer`, include extension.neon in your project's PHPStan config:
3636

37-
```
37+
```neon
3838
includes:
3939
- vendor/phpstan/phpstan-doctrine/extension.neon
4040
```
4141

4242
If you're interested in DQL/QueryBuilder validation, include also `rules.neon` (you will also need to provide the `objectManagerLoader`, see below):
4343

44-
```
44+
```neon
4545
includes:
4646
- vendor/phpstan/phpstan-doctrine/rules.neon
4747
```
@@ -69,6 +69,8 @@ parameters:
6969
For example, in a Symfony project, `object-manager.php` would look something like this:
7070

7171
```php
72+
<?php
73+
7274
require dirname(__DIR__).'/../config/bootstrap.php';
7375
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
7476
$kernel->boot();
@@ -81,6 +83,8 @@ If your application uses custom Doctrine types, you can write your own type desc
8183
Type descriptors implement the interface `PHPStan\Type\Doctrine\Descriptors\DoctrineTypeDescriptor` which looks like this:
8284

8385
```php
86+
<?php
87+
8488
public function getType(): string;
8589

8690
public function getWritableToPropertyType(): Type;

0 commit comments

Comments
 (0)