Skip to content

Commit b23d543

Browse files
committed
Fix classname and intial code location
1 parent fad3e9b commit b23d543

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

app/bootstrap.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
use PhpSchool\PHP8Appreciate\Exercise\CautionWithCatches;
2626
use PhpSchool\PHP8Appreciate\Exercise\HaveTheLastSay;
2727
use PhpSchool\PHP8Appreciate\Exercise\InfiniteDivisions;
28-
use PhpSchool\PHP8Appreciate\Exercise\PhpPromotion;
28+
use PhpSchool\PHP8Appreciate\Exercise\PhpGetsAPromotion;
2929
use PhpSchool\PHP8Appreciate\Exercise\LordOfTheStrings;
3030
use PhpSchool\PHP8Appreciate\Exercise\TheAttributesOfSuccess;
3131
use PhpSchool\PHP8Appreciate\Exercise\TheReturnOfStatic;
@@ -38,7 +38,7 @@
3838

3939
$app->addExercise(AMatchMadeInHeaven::class);
4040
$app->addExercise(HaveTheLastSay::class);
41-
$app->addExercise(PhpPromotion::class);
41+
$app->addExercise(PhpGetsAPromotion::class);
4242
$app->addExercise(CautionWithCatches::class);
4343
$app->addExercise(LordOfTheStrings::class);
4444
$app->addExercise(UniteTheTypes::class);

app/config.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use PhpSchool\PHP8Appreciate\Exercise\CautionWithCatches;
77
use PhpSchool\PHP8Appreciate\Exercise\HaveTheLastSay;
88
use PhpSchool\PHP8Appreciate\Exercise\InfiniteDivisions;
9-
use PhpSchool\PHP8Appreciate\Exercise\PhpPromotion;
9+
use PhpSchool\PHP8Appreciate\Exercise\PhpGetsAPromotion;
1010
use PhpSchool\PHP8Appreciate\Exercise\LordOfTheStrings;
1111
use PhpSchool\PHP8Appreciate\Exercise\TheAttributesOfSuccess;
1212
use PhpSchool\PHP8Appreciate\Exercise\TheReturnOfStatic;
@@ -28,8 +28,8 @@
2828
HaveTheLastSay::class => function (ContainerInterface $c) {
2929
return new HaveTheLastSay($c->get(PhpParser\Parser::class));
3030
},
31-
PhpPromotion::class => function (ContainerInterface $c) {
32-
return new PhpPromotion($c->get(PhpParser\Parser::class));
31+
PhpGetsAPromotion::class => function (ContainerInterface $c) {
32+
return new PhpGetsAPromotion($c->get(PhpParser\Parser::class));
3333
},
3434
CautionWithCatches::class => function (ContainerInterface $c) {
3535
return new CautionWithCatches($c->get(PhpParser\Parser::class), $c->get(\Faker\Generator::class));

src/Exercise/PhpPromotion.php renamed to src/Exercise/PhpGetsAPromotion.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
use PhpSchool\PhpWorkshop\Solution\SolutionInterface;
2323
use ReflectionClass;
2424

25-
class PhpPromotion extends AbstractExercise implements ExerciseInterface, ProvidesInitialCode, CliExercise, SelfCheck
25+
class PhpGetsAPromotion extends AbstractExercise implements ExerciseInterface, ProvidesInitialCode, CliExercise, SelfCheck
2626
{
2727
public function __construct(private Parser $parser)
2828
{
@@ -40,7 +40,7 @@ public function getDescription(): string
4040

4141
public function getInitialCode(): SolutionInterface
4242
{
43-
return SingleFileSolution::fromFile(__DIR__ . '/../../exercises/php-promotion/initial/php-7-class.php');
43+
return SingleFileSolution::fromFile(__DIR__ . '/../../exercises/php-gets-a-promotion/initial/php-gets-a-promotion.php');
4444
}
4545

4646
public function getType(): ExerciseType

test/Exercise/PhpPromotionTest.php

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

55
namespace PhpSchool\PHP8AppreciateTest\Exercise;
66

7-
use PhpSchool\PHP8Appreciate\Exercise\PhpPromotion;
7+
use PhpSchool\PHP8Appreciate\Exercise\PhpGetsAPromotion;
88
use PhpSchool\PhpWorkshop\Application;
99
use PhpSchool\PhpWorkshop\Result\Failure;
1010
use PhpSchool\PhpWorkshop\TestUtils\WorkshopExerciseTest;
@@ -13,7 +13,7 @@ class PhpPromotionTest extends WorkshopExerciseTest
1313
{
1414
public function getExerciseClass(): string
1515
{
16-
return PhpPromotion::class;
16+
return PhpGetsAPromotion::class;
1717
}
1818

1919
public function getApplication(): Application

0 commit comments

Comments
 (0)