Skip to content

Commit cc98962

Browse files
authored
Duplicated fixes.
Duplicate variables removed. Variable names updated.
1 parent 1db3e53 commit cc98962

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

‎README.md‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -528,8 +528,6 @@ var_dump($name); // ['Ryan', 'McDermott'];
528528

529529
**Good**:
530530
```php
531-
$name = 'Ryan McDermott';
532-
533531
function splitIntoFirstAndLastName($name) {
534532
return preg_split('/ /', $name);
535533
}
@@ -970,8 +968,9 @@ your codebase.
970968
```php
971969
class UserSettings {
972970
private $user;
971+
973972
public function __construct($user) {
974-
$this->user = user;
973+
$this->user = $user;
975974
}
976975

977976
public function changeSettings($settings) {
@@ -990,8 +989,9 @@ class UserSettings {
990989
```php
991990
class UserAuth {
992991
private $user;
992+
993993
public function __construct($user) {
994-
$this->user = user;
994+
$this->user = $user;
995995
}
996996

997997
public function verifyCredentials() {
@@ -1002,6 +1002,7 @@ class UserAuth {
10021002

10031003
class UserSettings {
10041004
private $user;
1005+
10051006
public function __construct($user) {
10061007
$this->user = $user;
10071008
$this->auth = new UserAuth($user);

0 commit comments

Comments
 (0)