Code Duplication    Length = 9-9 lines in 2 locations

src/Common/EventSubscriber/HashUserPasswordSubscriber.php 2 locations

@@ 64-72 (lines=9) @@
61
			});
62
		};
63
64
		foreach ($filter($uow->getScheduledEntityInsertions()) as $user) {
65
			$password = $classMetadata->getFieldValue($user, $this->userMapping[UserMapping::FIELD_PASSWORD]);
66
67
			if (!$this->passwordHashStrategy->needRehash($password)) {
68
				continue;
69
			}
70
71
			$classMetadata->setFieldValue($user, $this->userMapping[UserMapping::FIELD_PASSWORD], $this->passwordHashStrategy->hash($password));
72
		}
73
74
		foreach ($filter($uow->getScheduledEntityUpdates()) as $user) {
75
			$password = $classMetadata->getFieldValue($user, $this->userMapping[UserMapping::FIELD_PASSWORD]);
@@ 74-82 (lines=9) @@
71
			$classMetadata->setFieldValue($user, $this->userMapping[UserMapping::FIELD_PASSWORD], $this->passwordHashStrategy->hash($password));
72
		}
73
74
		foreach ($filter($uow->getScheduledEntityUpdates()) as $user) {
75
			$password = $classMetadata->getFieldValue($user, $this->userMapping[UserMapping::FIELD_PASSWORD]);
76
77
			if (!$this->passwordHashStrategy->needRehash($password)) {
78
				continue;
79
			}
80
81
			$classMetadata->setFieldValue($user, $this->userMapping[UserMapping::FIELD_PASSWORD], $this->passwordHashStrategy->hash($password));
82
		}
83
	}
84
}
85