public static function check($password) { $pci = new self(app()); $pci->setSettings(); $score = $pci->generatePasswordStrength($password); if ($score) { return new Password(['score' => $score, 'strength' => $pci->getPasswordStrength($score), 'text' => $pci->getScoreText($score)]); } }
/** * {@inheritdoc} */ public static function fromArray(array $values) { $message = new self(); $values = array_merge(['error' => null, 'hash' => null, 'settings' => null], $values); $message->setError($values['error']); $message->setHash($values['hash']); $message->setSettings($values['settings']); return $message; }