Skip to content

Commit 6aa2d87

Browse files
committed
- chore: naming
- badge updated
1 parent bebad10 commit 6aa2d87

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ class PostService {
7373
}
7474
```
7575

76-
Then somewhere we might have a handler/controller that asks for it's own dependencies:
76+
Then somewhere we might have a handler/controller that asks for its own dependencies:
7777
```php
78-
class HttpPostHandler {
78+
class BlogHandler {
7979
public function get(ServerRequestInterface $request, PostService $service): ResponseInterface {
8080
$slug = slugify($request->getUri()->getPath());
8181
$post = $service->findBlogPostBySlug($slug);
@@ -111,13 +111,13 @@ And finally in the dispatcher file, we process the request
111111
// index.php
112112

113113
// (resolved through an HTTP router or other means)
114-
$resolvedDispatcher = HttpPostHandler::class;
115-
$resolvedMethod = 'get';
114+
$handler = BlogHandler::class;
115+
$method = 'get';
116116

117117
// by invoking the container
118-
$response = (new DIContainer(new BlogModule))([$resolvedDispatcher, $resolvedMethod]);
118+
$response = (new DIContainer(new BlogModule))([$handler, $method]);
119119

120-
// we have a `$response` object to output the blog content
120+
// we have a `$response` object to output the content
121121
// ex. `echo $response->getBody()->getContents();`
122122
```
123123

@@ -134,7 +134,7 @@ Code quality
134134

135135
[![Code Coverage](https://scrutinizer-ci.com/g/kodedphp/container/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/kodedphp/container/?branch=master)
136136
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/kodedphp/container/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/kodedphp/container/?branch=master)
137-
[![Infection MSI](https://badge.stryker-mutator.io/github.com/kodedphp/container/master)](https://github.com/kodedphp/container)
137+
[![Infection MSI](https://img.shields.io/endpoint?style=flat&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fkodedphp%2Fcontainer%2Fmaster)](https://dashboard.stryker-mutator.io/reports/github.com/kodedphp/container/master)
138138

139139
```shell script
140140
vendor/bin/infection --threads=4

0 commit comments

Comments
 (0)