<?php

namespace App\Traits;

trait DeterminesIfUserPasswordMatchesRequirements {
    /**
     * @param string $password
     *
     * @return bool
     */
    private function doesPasswordMeetRequirements(string $password): bool {
        $matches = [];

//        preg_match('/^.*(?=.{3,})(?=.*[a-z])(?=.*[A-Z])(?=.*[\d]).*$/', $password, $matches);

//        return count($matches) > 0;
        return true;
    }

    /**
     * @param string $password
     *
     * @return bool
     */
    private function checkPasswordAndThrowIfInvalid(string $password): bool {
        return $this->doesPasswordMeetRequirements($password) === true;
    }
}
