concrete/src/User/Password/PasswordUsageTracker.php
private function pruneUses($subject)
    {
        $repository = $this->entityManager->getRepository(UsedString::class);
        $usedStrings = $repository->findBy(['subject' => $subject], ['id' => 'desc']);

        // IF there are extra used strings, prune the extras
        if (count($usedStrings) > $this->maxReuse) {
            array_map([$this->entityManager, 'remove'], array_slice($usedStrings, $this->maxReuse));
            $this->entityManager->flush();
        }
    }
private function pruneUses($subject)
    {
        $repository = $this->entityManager->getRepository(UsedString::class);
        $usedStrings = $repository->findBy(['subject' => $subject], ['id' => 'desc']);

        // IF there are extra used strings, prune the extras
        if (count($usedStrings) > $this->maxReuse) {
            array_map([$this->entityManager, 'remove'], array_slice($usedStrings, $this->maxReuse));
            $this->entityManager->flush();
        }
    }
private function pruneUses ( $ subject ) { $ repository = $ this -> entityManager -> getRepository ( UsedString :: class ) ; $ usedStrings = $ repository -> findBy ( [ 'subject' => $ subject ] , [ 'id' => 'desc' ] ) ; // IF there are extra used strings, prune the extras if ( count ( $ usedStrings ) > $ this -> maxReuse ) { array_map ( [ $ this -> entityManager , 'remove' ] , array_slice ( $ usedStrings , $ this -> maxReuse ) ) ; $ this -> entityManager -> flush ( ) ; } }
Prune uses for a specific subject

@param int $subject
Prune uses for a specific subject