Code Duplication    Length = 8-8 lines in 2 locations

src/Eccube/Repository/MemberRepository.php 1 location

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

src/Eccube/Repository/CustomerRepository.php 1 location

@@ 124-131 (lines=8) @@
121
     *
122
     * @throws UnsupportedUserException if the account is not supported
123
     */
124
    public function refreshUser(UserInterface $user)
125
    {
126
        if (!$user instanceof Customer) {
127
            throw new UnsupportedUserException(sprintf('Instances of "%s" are not supported.', get_class($user)));
128
        }
129
130
        return $this->loadUserByUsername($user->getUsername());
131
    }
132
133
    /**
134
     * Whether this provider supports the given user class.