Code Duplication    Length = 8-8 lines in 2 locations

src/Eccube/Repository/MemberRepository.php 1 location

@@ 113-120 (lines=8) @@
110
     *
111
     * @throws UnsupportedUserException if the account is not supported
112
     */
113
    public function refreshUser(UserInterface $user)
114
    {
115
        if (!$user instanceof Member) {
116
            throw new UnsupportedUserException(sprintf('Instances of "%s" are not supported.', get_class($user)));
117
        }
118
119
        return $this->loadUserByUsername($user->getUsername());
120
    }
121
122
    /**
123
     * Whether this provider supports the given user class.

src/Eccube/Repository/CustomerRepository.php 1 location

@@ 143-150 (lines=8) @@
140
     *
141
     * @throws UnsupportedUserException if the account is not supported
142
     */
143
    public function refreshUser(UserInterface $user)
144
    {
145
        if (!$user instanceof Customer) {
146
            throw new UnsupportedUserException(sprintf('Instances of "%s" are not supported.', get_class($user)));
147
        }
148
149
        return $this->loadUserByUsername($user->getUsername());
150
    }
151
152
    /**
153
     * Whether this provider supports the given user class.