Total Complexity | 4 |
Total Lines | 37 |
Duplicated Lines | 0 % |
Coverage | 91.67% |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | final class BlogService |
||
12 | { |
||
13 | private const POSTS_PER_PAGE = 10; |
||
14 | private PostRepository $postRepository; |
||
15 | |||
16 | 5 | public function __construct(PostRepository $postRepository) |
|
17 | { |
||
18 | 5 | $this->postRepository = $postRepository; |
|
19 | } |
||
20 | |||
21 | 1 | public function getPosts(int $page): PaginatorInterface |
|
28 | } |
||
29 | |||
30 | /** |
||
31 | * @param int $id |
||
32 | * |
||
33 | * @throws NotFoundException |
||
34 | * |
||
35 | * @return Post |
||
36 | */ |
||
37 | 2 | public function getPost(int $id): Post |
|
48 | } |
||
49 | } |
||
50 |