fix(continuous-integration): correction point phpstan de level 1
Cadoles/nineskeletor/pipeline/pr-master This commit looks good
Details
Cadoles/nineskeletor/pipeline/pr-master This commit looks good
Details
This commit is contained in:
parent
86b11372e7
commit
5f3cc51f5c
2
Makefile
2
Makefile
|
@ -9,7 +9,7 @@ deps:
|
|||
npm ci
|
||||
|
||||
phpstan:
|
||||
symfony php tools/phpstan/vendor/bin/phpstan analyze ./src
|
||||
symfony php tools/phpstan/vendor/bin/phpstan analyze ./src -l 1
|
||||
|
||||
php-cs-fixer:
|
||||
tools/php-cs-fixer/symfony-php-cs-fixer.sh fix --verbose --show-progress=dots
|
||||
|
|
|
@ -43,6 +43,9 @@ class CropController extends AbstractController
|
|||
// Récupérer les tailles de l'image
|
||||
$width = $this->getWidth($large_image_location);
|
||||
$height = $this->getHeight($large_image_location);
|
||||
$max_height=null;
|
||||
$max_width=null;
|
||||
$ratio=null;
|
||||
|
||||
// Définir le pourcentage de réduction de l'image
|
||||
switch ($type) {
|
||||
|
@ -146,6 +149,8 @@ class CropController extends AbstractController
|
|||
$newImageWidth = ceil($width * $scale);
|
||||
$newImageHeight = ceil($height * $scale);
|
||||
$newImage = imagecreatetruecolor($newImageWidth,$newImageHeight);
|
||||
$source=null;
|
||||
|
||||
switch($imageType) {
|
||||
case "image/gif":
|
||||
$source=imagecreatefromgif($image);
|
||||
|
@ -192,7 +197,7 @@ class CropController extends AbstractController
|
|||
$newImageWidth=900;
|
||||
$newImageHeight=900;
|
||||
$newImage = imagecreatetruecolor($newImageWidth,$newImageHeight);
|
||||
|
||||
$source=null;
|
||||
|
||||
switch($imageType) {
|
||||
case "image/gif":
|
||||
|
|
|
@ -347,7 +347,10 @@ class GroupController extends AbstractController
|
|||
$draw= $query['draw'];
|
||||
$ordercolumn=$query['order'][0]['column'];
|
||||
$orderdir=$query['order'][0]['dir'];
|
||||
|
||||
$usermodo=null;
|
||||
$niveau01=null;
|
||||
$niveau02=null;
|
||||
|
||||
// Nombre total d'enregistrement
|
||||
$qb = $em->getManager()->createQueryBuilder();
|
||||
switch($access) {
|
||||
|
@ -391,6 +394,7 @@ class GroupController extends AbstractController
|
|||
break;
|
||||
}
|
||||
$total=$qb->getQuery()->getSingleScalarResult();
|
||||
$totalf=null;
|
||||
|
||||
// Nombre d'enregistrement filtré
|
||||
if($search["value"]=="")
|
||||
|
@ -545,7 +549,8 @@ class GroupController extends AbstractController
|
|||
$draw= $query['draw'];
|
||||
$ordercolumn=$query['order'][0]['column'];
|
||||
$orderdir=$query['order'][0]['dir'];
|
||||
|
||||
$usermodo=null;
|
||||
|
||||
// Nombre total d'enregistrement
|
||||
$qb = $em->getManager()->createQueryBuilder();
|
||||
if($access=="admin"||$access=="user")
|
||||
|
@ -785,6 +790,7 @@ class GroupController extends AbstractController
|
|||
}
|
||||
|
||||
private function canseemember($access,$entity,$em,$fgblock=true) {
|
||||
$toreturn=false;
|
||||
switch($access) {
|
||||
case "admin" : $toreturn=($entity->getId()>0); break;
|
||||
case "modo" : $toreturn=($entity->getId()>0); break;
|
||||
|
|
|
@ -38,7 +38,9 @@ class Niveau02Controller extends AbstractController
|
|||
$draw= $query['draw'];
|
||||
$ordercolumn=$query['order'][0]['column'];
|
||||
$orderdir=$query['order'][0]['dir'];
|
||||
|
||||
$total=null;
|
||||
$totalf=null;
|
||||
|
||||
// Nombre total d'enregistrement
|
||||
switch($access) {
|
||||
case "admin":
|
||||
|
|
|
@ -56,7 +56,8 @@ class RegistrationController extends AbstractController
|
|||
$draw= $query['draw'];
|
||||
$ordercolumn=$query['order'][0]['column'];
|
||||
$orderdir=$query['order'][0]['dir'];
|
||||
|
||||
$usermodo=null;
|
||||
|
||||
// Nombre total d'enregistrement
|
||||
if($access=="admin")
|
||||
$total = $em->getManager()->createQueryBuilder()->select('COUNT(entity)')->from($this->entity,'entity')->getQuery()->getSingleScalarResult();
|
||||
|
|
|
@ -65,7 +65,7 @@ class SecurityController extends AbstractController
|
|||
}
|
||||
}
|
||||
|
||||
public function loginSQL(Request $request, AuthenticationUtils $authenticationUtils)
|
||||
public function loginSQL(Request $request, AuthenticationUtils $authenticationUtils,ManagerRegistry $em)
|
||||
{
|
||||
return $this->render('Home/loginSQL.html.twig', array(
|
||||
'last_username' => $authenticationUtils->getLastUsername(),
|
||||
|
@ -143,7 +143,7 @@ class SecurityController extends AbstractController
|
|||
return $this->autoconnexion($user,$redirect,$request);
|
||||
}
|
||||
|
||||
public function loginLDAP(Request $request)
|
||||
public function loginLDAP(Request $request, AuthenticationUtils $authenticationUtils,ManagerRegistry $em)
|
||||
{
|
||||
// Création du formulaire
|
||||
$form = $this->createForm(LoginType::class);
|
||||
|
@ -212,7 +212,7 @@ class SecurityController extends AbstractController
|
|||
}
|
||||
|
||||
|
||||
public function loginOPENID(Request $request, AuthenticationUtils $authenticationUtils)
|
||||
public function loginOPENID(Request $request, AuthenticationUtils $authenticationUtils,ManagerRegistry $em)
|
||||
{
|
||||
$state=Uuid::uuid4();
|
||||
$request->getSession()->set("oauthState",$state);
|
||||
|
@ -256,6 +256,7 @@ class SecurityController extends AbstractController
|
|||
$attributes=json_decode(json_encode($response->body), true);
|
||||
|
||||
// Username
|
||||
$username="";
|
||||
if(isset($attributes[$this->getParameter('oauthUsername')]))
|
||||
$username = $attributes[$this->getParameter('oauthUsername')];
|
||||
|
||||
|
|
|
@ -44,7 +44,8 @@ class UserController extends AbstractController
|
|||
$draw= $query['draw'];
|
||||
$ordercolumn=$query['order'][0]['column'];
|
||||
$orderdir=$query['order'][0]['dir'];
|
||||
|
||||
$niveau01=null;
|
||||
$niveau02=null;
|
||||
|
||||
// Nombre total d'enregistrement
|
||||
switch($access) {
|
||||
|
|
|
@ -20,7 +20,9 @@ class ApiService
|
|||
}
|
||||
|
||||
public function run($method,$url,$query,$header=null,$content="json") {
|
||||
|
||||
// Entete
|
||||
$headerini=null;
|
||||
switch($content) {
|
||||
case "json":
|
||||
$headerini = [
|
||||
|
|
|
@ -367,7 +367,8 @@ class LdapService
|
|||
public function updateNiveauUser(User $user,$todel=false) {
|
||||
$dn = $this->basedn;
|
||||
$connection = $this->connect();
|
||||
|
||||
$result=null;
|
||||
|
||||
// NIVEAU01
|
||||
// On recherche le Niveau01 actuellement asscocié à l'utilisateur
|
||||
$criteria = '(&(cn=*)(memberUid='.$user->getUsername().'))';
|
||||
|
|
|
@ -35,6 +35,8 @@ class UploadListener
|
|||
$newImageWidth = ceil($width * $scale);
|
||||
$newImageHeight = ceil($height * $scale);
|
||||
$newImage = imagecreatetruecolor($newImageWidth,$newImageHeight);
|
||||
$source=null;
|
||||
|
||||
switch($imageType) {
|
||||
case "image/gif":
|
||||
$source=imagecreatefromgif($image);
|
||||
|
|
Loading…
Reference in New Issue