Slide 3
Slide 3 text
class PeasCounter
{
public function count(Bucket $bucket) {
$peasCount = 0;
foreach ($bucket->getPeaShells() as $peaShell) {
$openedPeaShell = $this->peaShellOpener->open($peaShell);
foreach ($openedPeaShell->getPeas() as $pea) {
$peasCount++;
}
}
return $peasCount;
}
}
01
02
03
04
05
06
07
08
09
10
11
12
13