Skip to content

Commit 3a46eb6

Browse files
committed
Fixup typos etc in PHP Promotion problem file
1 parent 8ffd1b6 commit 3a46eb6

File tree

1 file changed

+7
-13
lines changed

1 file changed

+7
-13
lines changed
Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
You have been given a piece of code (look for `php-gets-a-promotionn.php` in your working directory) which provides a class written for PHP 7.
2-
The code itself works well assigning constructor arguments to the class properties. Your job is to write the code in a more terse format, by using the newly introduced
1+
You have been given a piece of code (look for `php-gets-a-promotion.php` in your working directory) which provides a class written for PHP 7.
2+
The code itself works well, assigning constructor arguments to the class properties. Your job is to write the code in a more terse format, by using the newly introduced
33
constructor property promotion in PHP 8.
44

5-
The code is a class is one that would hypothetically be used to call a provided `\Closure` when reading a row of a CSV, passing in the appropriate cell value, but the implementation logic is not important and thus left out.
5+
The code is a class that would hypothetically be used to call a provided `\Closure` when reading a row of a CSV, passing in the appropriate cell value, but the implementation logic is not important and thus left out.
66

7-
Focus on converting the constructor to a terse format using constructor propery promotion.
7+
Focus on converting the constructor to a terse format using constructor property promotion.
88

99
### The advantages of constructor property promotion
1010

1111
* Less boilerplate code is required when writing a class
12-
* Still provides the required information for static analysis / runtime type parsing
13-
* Is compatible in conjuction with properties that cannot be promoted
12+
* It still provides the required information for static analysis / runtime type parsing
13+
* Is compatible in conjunction with properties that cannot be promoted
1414

1515

1616
----------------------------------------------------------------------
@@ -21,13 +21,7 @@ Documentation on the constructor property promotion feature can be found by poin
2121

2222
Remember to keep the same visibility for the properties
2323

24-
You will be expected to make use of the constructor propery promotion feature
24+
You will be expected to make use of the constructor property promotion feature
2525

2626
You should have less code than the provided initial code
2727

28-
----------------------------------------------------------------------
29-
30-
----------------------------------------------------------------------
31-
## EXTRA
32-
33-
?? ALways fun to have something, but what...

0 commit comments

Comments
 (0)