Skip to content

Commit 2146d16

Browse files
committed
Cleanup problem fiels
1 parent 8f5a587 commit 2146d16

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

exercises/have-the-last-say/problem/problem.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ Note: only the values changed from the defaults are specified!
3737

3838
### Advantages of named arguments
3939

40-
* Possible to skip defaults in between the arguments you want to change
41-
* The code is better documented since the argument label is specified with the value, very useful for booleans
40+
* Possible to skip defaults in between the arguments you want to change.
41+
* The code is better documented since the argument label is specified with the value, very useful for booleans.
4242

4343
----------------------------------------------------------------------
4444
## HINTS

exercises/php-gets-a-promotion/problem/problem.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
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
3-
constructor property promotion in PHP 8.
42

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.
3+
The code itself works well, assigning constructor arguments to the class properties.
4+
5+
Your job is to write the code in a more terse format, by using the newly introduced constructor property promotion feature in PHP 8.
6+
7+
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 row values, but the implementation logic is not important and thus left out.
68

79
Focus on converting the constructor to a terse format using constructor property promotion.
810

911
### The advantages of constructor property promotion
1012

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

1517

1618
----------------------------------------------------------------------

0 commit comments

Comments
 (0)