Code Duplication    Length = 8-8 lines in 2 locations

src/Eccube/Repository/CustomerRepository.php 1 location

@@ 134-141 (lines=8) @@
131
     *
132
     * @throws UnsupportedUserException if the account is not supported
133
     */
134
    public function refreshUser(UserInterface $user)
135
    {
136
        if (!$user instanceof Customer) {
137
            throw new UnsupportedUserException(sprintf('Instances of "%s" are not supported.', get_class($user)));
138
        }
139
140
        return $this->loadUserByUsername($user->getUsername());
141
    }
142
143
    /**
144
     * Whether this provider supports the given user class.

src/Eccube/Repository/MemberRepository.php 1 location

@@ 86-93 (lines=8) @@
83
     *
84
     * @throws UnsupportedUserException if the account is not supported
85
     */
86
    public function refreshUser(UserInterface $user)
87
    {
88
        if (!$user instanceof Member) {
89
            throw new UnsupportedUserException(sprintf('Instances of "%s" are not supported.', get_class($user)));
90
        }
91
92
        return $this->loadUserByUsername($user->getUsername());
93
    }
94
95
    /**
96
     * Whether this provider supports the given user class.