Skip to content

Commit 2579ab2

Browse files
petrparolekf3l1x
authored andcommitted
unify syntax in readmes
- use 4 spaces in CSS, in JS, in HTML and in Latte - use tab in NEON and in PHP - neon highlighting syntax - normalized filename of Readmes - typos
1 parent 2b4ac2b commit 2579ab2

File tree

1 file changed

+69
-69
lines changed

1 file changed

+69
-69
lines changed

.docs/README.md

Lines changed: 69 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@
44

55
- [Setup](#setup)
66
- [UI](#ui)
7-
- [Presenter](#presenter)
8-
- [StructuredTemplates](#structured-templates)
9-
- [Control](#control)
10-
- [Component](#component)
7+
- [Presenter](#presenter)
8+
- [StructuredTemplates](#structured-templates)
9+
- [Control](#control)
10+
- [Component](#component)
1111
- [Responses](#responses)
12-
- [CSVResponse](#csvresponse)
13-
- [ImageResponse](#imageresponse)
14-
- [JsonPrettyResponse](#psr7streamresponse)
15-
- [PSR7StreamResponse](#flyresponse)
16-
- [FlyResponse - send file/buffer on-the-fly](#flyresponse)
17-
- [XmlResponse](#xmlresponse)
18-
- [StringResponse](#stringresponse)
12+
- [CSVResponse](#csvresponse)
13+
- [ImageResponse](#imageresponse)
14+
- [JsonPrettyResponse](#psr7streamresponse)
15+
- [PSR7StreamResponse](#flyresponse)
16+
- [FlyResponse - send file/buffer on-the-fly](#flyresponse)
17+
- [XmlResponse](#xmlresponse)
18+
- [StringResponse](#stringresponse)
1919

2020
## Setup
2121

@@ -39,18 +39,18 @@ By extending the `BasePresenter` you can use these methods:
3939
A trait which modifies where the presenter templates are loaded from.
4040

4141
- Views
42-
- `%presenterDir%/templates/%view%.latte`
42+
- `%presenterDir%/templates/%view%.latte`
4343
- Layouts
44-
- `%presenterDir%/templates/@layout.latte`
45-
- layouts of parent presenters are also looked for
44+
- `%presenterDir%/templates/@layout.latte`
45+
- layouts of parent presenters are also looked for
4646

4747
```php
4848
use Contributte\Application\UI\Presenter\StructuredTemplates;
4949
use Nette\Application\UI\Presenter;
5050

5151
class YourPresenter extends Presenter
5252
{
53-
use StructuredTemplates;
53+
use StructuredTemplates;
5454
}
5555
```
5656

@@ -155,11 +155,11 @@ use Nette\Http\IResponse;
155155

156156
// Write to stdout over buffer class
157157
$adapter = new StdoutAdapter(function(Buffer $buffer, IRequest $request, IResponse $response) {
158-
// Modify headers
159-
$response->setHeader(..);
160-
161-
// Write data
162-
$buffer->write('Some data..');
158+
// Modify headers
159+
$response->setHeader(..);
160+
161+
// Write data
162+
$buffer->write('Some data..');
163163
});
164164
$response = new FlyFileResponse($adapter, 'my.data');
165165

@@ -175,14 +175,14 @@ use Nette\Http\IRequest;
175175
use Nette\Http\IResponse;
176176

177177
$adapter = new CallbackAdapter(function(IRequest $request, IResponse $response) use ($model) {
178-
// Modify headers
179-
$response->setHeader(..);
180-
181-
// Fetch topsecret data
182-
$data = $this->facade->getData();
183-
foreach ($data as $d) {
184-
// Write or print data..
185-
}
178+
// Modify headers
179+
$response->setHeader(..);
180+
181+
// Fetch topsecret data
182+
$data = $this->facade->getData();
183+
foreach ($data as $d) {
184+
// Write or print data..
185+
}
186186
});
187187
$response = new FlyFileResponse($adapter, 'my.data');
188188

@@ -195,58 +195,58 @@ $this->sendResponse($response);
195195
final class BigOperationHandler
196196
{
197197

198-
/** @var Facade */
199-
private $facade;
200-
201-
/**
202-
* @param Facade $facade
203-
*/
204-
public function __construct(Facade $facade)
205-
{
206-
$this->facade = $facade;
207-
}
208-
209-
public function toFlyResponse()
210-
{
211-
$adapter = new CallbackAdapter(function (IRequest $request, IResponse $response) {
212-
// Modify headers
213-
$response->setHeader(..);
214-
215-
// Fetch topsecret data
216-
$data = $this->facade->getData();
217-
foreach ($data as $d) {
218-
// Write or print data..
219-
}
220-
});
221-
222-
return new FlyFileResponse($adapter, 'file.ext');
223-
224-
// or
225-
return new FlyResponse($adapter);
226-
}
198+
/** @var Facade */
199+
private $facade;
200+
201+
/**
202+
* @param Facade $facade
203+
*/
204+
public function __construct(Facade $facade)
205+
{
206+
$this->facade = $facade;
207+
}
208+
209+
public function toFlyResponse()
210+
{
211+
$adapter = new CallbackAdapter(function (IRequest $request, IResponse $response) {
212+
// Modify headers
213+
$response->setHeader(..);
214+
215+
// Fetch topsecret data
216+
$data = $this->facade->getData();
217+
foreach ($data as $d) {
218+
// Write or print data..
219+
}
220+
});
221+
222+
return new FlyFileResponse($adapter, 'file.ext');
223+
224+
// or
225+
return new FlyResponse($adapter);
226+
}
227227
}
228228

229229
interface IBigOperationHandlerFactory
230230
{
231231

232-
/**
233-
* @return BigOperationHandler
234-
*/
235-
public function create();
232+
/**
233+
* @return BigOperationHandler
234+
*/
235+
public function create();
236236

237237
}
238238

239239
final class MyPresenter extends Nette\Application\UI\Presenter
240240
{
241241

242-
/** @var IBigOperationHandlerFactory @inject */
243-
public $bigOperationHandlerFactory;
242+
/** @var IBigOperationHandlerFactory @inject */
243+
public $bigOperationHandlerFactory;
244244

245-
public function handleMagic()
246-
{
247-
$this->sendResponse(
248-
$this->bigOperationHandlerFactory->create()->toFlyResponse()
249-
);
250-
}
245+
public function handleMagic()
246+
{
247+
$this->sendResponse(
248+
$this->bigOperationHandlerFactory->create()->toFlyResponse()
249+
);
250+
}
251251
}
252252
```

0 commit comments

Comments
 (0)