Code Duplication    Length = 12-12 lines in 2 locations

src/Surfnet/StepupMiddleware/ApiBundle/Configuration/EventListener/WhitelistEventListener.php 2 locations

@@ 67-78 (lines=12) @@
64
        $this->$method($event, $domainMessage);
65
    }
66
67
    public function applyWhitelistCreatedEvent(WhitelistCreatedEvent $event)
68
    {
69
        foreach ($event->whitelistedInstitutions as $whitelistedInstitution) {
70
            $institution = new Institution($whitelistedInstitution->getInstitution());
71
72
            if ($this->configuredInstitutionRepository->hasConfigurationFor($institution)) {
73
                continue;
74
            }
75
76
            $this->createInstitutionConfigurationFor($institution);
77
        }
78
    }
79
80
    public function applyWhitelistReplacedEvent(WhitelistReplacedEvent $event)
81
    {
@@ 80-91 (lines=12) @@
77
        }
78
    }
79
80
    public function applyWhitelistReplacedEvent(WhitelistReplacedEvent $event)
81
    {
82
        foreach ($event->whitelistedInstitutions as $whitelistedInstitution) {
83
            $institution = new Institution($whitelistedInstitution->getInstitution());
84
85
            if ($this->configuredInstitutionRepository->hasConfigurationFor($institution)) {
86
                continue;
87
            }
88
89
            $this->createInstitutionConfigurationFor($institution);
90
        }
91
    }
92
93
    public function applyInstitutionsAddedToWhitelistEvent(InstitutionsAddedToWhitelistEvent $event)
94
    {