Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit a1ef54d

Browse files
idk
1 parent 6b7bbdf commit a1ef54d

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

‎examples/php/php-divergent_change-01_base/src/Controller/CourseStepsGetController.php‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
namespace CodelyTv\DivergentChange\Controller;
66

77
use CodelyTv\DivergentChange\Platform;
8+
use CodelyTv\DivergentChange\Tests\Controller\CourseStepRepository;
89

910
final class CourseStepsGetController
1011
{
@@ -14,11 +15,13 @@ final class CourseStepsGetController
1415
private const STEP_TYPE_QUIZ = 'quiz';
1516
private const VIDEO_POINTS_PER_MINUTE = 100;
1617
private const QUIZ_POINTS_PER_MINUTE = 10;
17-
private Platform $platform;
18+
private Platform $platform;
19+
private CourseStepRepository $repository;
1820

19-
public function __construct(Platform $platform)
21+
public function __construct(Platform $platform, CourseStepRepository$repository)
2022
{
2123
$this->platform = $platform;
24+
$this->repository = $repository;
2225
}
2326

2427
public function get(string $courseId): string
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace CodelyTv\DivergentChange\Tests\Controller;
6+
7+
interface CourseStepRepository
8+
{
9+
public function search(CourseId $id): CourseSteps;
10+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /