Code Duplication    Length = 4-4 lines in 2 locations

Lib/DsManager/Models/Match.php 2 locations

@@ 86-89 (lines=4) @@
83
        $homeModule = new Module($this->homeTeam->coach->favouriteModule);
84
        $awayModule = new Module($this->awayTeam->coach->favouriteModule);
85
86
        if ($homeModule->isOffensive()) {
87
            $goalHome += Randomizer::boolOnPercentage(50) ? rand(1, 2) : 0;
88
            $goalAway += Randomizer::boolOnPercentage(20) ? 1 : 0;
89
        }
90
        if ($awayModule->isOffensive()) {
91
            $goalAway += Randomizer::boolOnPercentage(50) ? rand(1, 2) : 0;
92
            $goalHome += Randomizer::boolOnPercentage(20) ? 1 : 0;
@@ 90-93 (lines=4) @@
87
            $goalHome += Randomizer::boolOnPercentage(50) ? rand(1, 2) : 0;
88
            $goalAway += Randomizer::boolOnPercentage(20) ? 1 : 0;
89
        }
90
        if ($awayModule->isOffensive()) {
91
            $goalAway += Randomizer::boolOnPercentage(50) ? rand(1, 2) : 0;
92
            $goalHome += Randomizer::boolOnPercentage(20) ? 1 : 0;
93
        }
94
95
        if ($awayModule->isDefensive()) {
96
            $goalHome -= Randomizer::boolOnPercentage(50) ? 1 : 0;