Skip to content

Commit f16409f

Browse files
committed
README syntax highlighting
use syntax highlighting, would you?
1 parent 286586d commit f16409f

File tree

1 file changed

+29
-23
lines changed

1 file changed

+29
-23
lines changed

README.md

Lines changed: 29 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,13 @@ examples and [phpdebugbar.com](http://phpdebugbar.com) for a live example.
3838
The best way to install DebugBar is using [Composer](http://getcomposer.org)
3939
with the following requirement:
4040

41-
{
42-
"require": {
43-
"maximebf/debugbar": ">=1.0.0"
44-
}
41+
```JSON
42+
{
43+
"require": {
44+
"maximebf/debugbar": ">=1.0.0"
4545
}
46+
}
47+
```
4648

4749
If you are cloning the repository, you'll need to run `composer install`.
4850

@@ -52,30 +54,34 @@ If you are cloning the repository, you'll need to run `composer install`.
5254
DebugBar is very easy to use and you can add it to any of your projects in no time.
5355
The easiest way is using the `render()` functions
5456

55-
<?php
56-
use DebugBar\StandardDebugBar;
57-
use DebugBar\JavascriptRenderer;
58-
59-
$debugbar = new StandardDebugBar();
60-
$debugbarRenderer = $debugbar->getJavascriptRenderer();
61-
62-
$debugbar["messages"]->addMessage("hello world!");
63-
?>
64-
<html>
65-
<head>
66-
<?php echo $debugbarRenderer->renderHead() ?>
67-
</head>
68-
<body>
69-
...
70-
<?php echo $debugbarRenderer->render() ?>
71-
</body>
72-
</html>
57+
```PHP
58+
<?php
59+
use DebugBar\StandardDebugBar;
60+
use DebugBar\JavascriptRenderer;
61+
62+
$debugbar = new StandardDebugBar();
63+
$debugbarRenderer = $debugbar->getJavascriptRenderer();
64+
65+
$debugbar["messages"]->addMessage("hello world!");
66+
?>
67+
<html>
68+
<head>
69+
<?php echo $debugbarRenderer->renderHead() ?>
70+
</head>
71+
<body>
72+
...
73+
<?php echo $debugbarRenderer->render() ?>
74+
</body>
75+
</html>+6
76+
```
7377

7478
The DebugBar uses DataCollectors to collect data from your PHP code. Some of them are
7579
automated but others are manual. Use the `DebugBar` like an array where keys are the
7680
collector names. In our previous example, we add a message to the `MessagesCollector`:
7781

78-
$debugbar["messages"]->addMessage("hello world!");
82+
```PHP
83+
$debugbar["messages"]->addMessage("hello world!");
84+
```
7985

8086
`StandardDebugBar` activates the following collectors:
8187

0 commit comments

Comments
 (0)