Skip to content

Commit b9a53a8

Browse files
Minor fix - Iterator pattern example
1 parent b75365b commit b9a53a8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -1414,16 +1414,16 @@ And then it can be used as
14141414
```php
14151415
$stationList = new StationList();
14161416

1417-
$stationList->addStation(new Station(89));
1418-
$stationList->addStation(new Station(101));
1419-
$stationList->addStation(new Station(102));
1420-
$stationList->addStation(new Station(103.2));
1417+
$stationList->addStation(new RadioStation(89));
1418+
$stationList->addStation(new RadioStation(101));
1419+
$stationList->addStation(new RadioStation(102));
1420+
$stationList->addStation(new RadioStation(103.2));
14211421

14221422
foreach($stationList as $station) {
14231423
echo $station->getFrequency() . PHP_EOL;
14241424
}
14251425

1426-
$stationList->removeStation(new Station(89)); // Will remove station 89
1426+
$stationList->removeStation(new RadioStation(89)); // Will remove station 89
14271427
```
14281428

14291429
👽 Mediator

0 commit comments

Comments
 (0)