fix faille twig, coding standard
Some checks failed
Cadoles/hydra-sql/pipeline/pr-develop There was a failure building this commit

This commit is contained in:
2022-12-16 15:39:42 +01:00
parent bd1b035f1e
commit 906d8edf82
5 changed files with 398 additions and 350 deletions

View File

@ -100,7 +100,7 @@ class PasswordEncoder implements LegacyPasswordHasherInterface
/**
* @param mixed $algo
*
* @return InvalidSQLLoginAlgoException|string
* @return string
*/
public function getValidAlgo($algo)
{
@ -151,11 +151,10 @@ class PasswordEncoder implements LegacyPasswordHasherInterface
throw new InvalidSQLLoginConfigurationException();
}
}
$completedArray = [];
$completedPlainPassword = '';
foreach ($this->securityPattern as $term) {
$completedArray[] = $arrayRef[$term];
$completedPlainPassword .= $arrayRef[$term];
}
$completedPlainPassword = implode($completedArray);
return $completedPlainPassword;
}

View File

@ -7,16 +7,13 @@ use App\SQLLogin\SQLLoginRequest;
use PDO;
use PDOException;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
class SQLLoginService extends AbstractController
{
private $params;
public SQLLoginRequest $sqlLoginRequest;
public function __construct(ParameterBagInterface $params, SQLLoginRequest $sqlLoginRequest)
public function __construct(SQLLoginRequest $sqlLoginRequest)
{
$this->params = $params;
$this->sqlLoginRequest = $sqlLoginRequest;
}
@ -24,10 +21,8 @@ class SQLLoginService extends AbstractController
{
try {
$dbh = $this->getConnection();
// forge de la requête
$request = $this->sqlLoginRequest->getRequestScope();
// Préparation de la requête
$query = $dbh->prepare($request);
$query->execute([$this->sqlLoginRequest->getLoginColumnName() => $login]);