Code Duplication    Length = 8-8 lines in 2 locations

src/Eccube/Repository/CustomerRepository.php 1 location

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

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.