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