Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
A709197 committed Dec 13, 2024
1 parent 720b948 commit 77baa56
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 16 deletions.
5 changes: 3 additions & 2 deletions application/controllers/DossierController.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ public function init(): void
} else {
$this->view->inlineScript()->appendFile('/js/dossier/dossierGeneral-bs3.js', 'text/javascript');
}

$this->view->inlineScript()->appendFile('/js/dossier/platau.js', 'text/javascript');
$this->view->headLink()->appendStylesheet('/css/etiquetteAvisDerogations/greenCircle.css', 'all');

Expand Down Expand Up @@ -1518,7 +1519,7 @@ public function lieesAction(): void
}
}
} catch (Exception $e) {
$this->_helper->flashMessenger(['context' => getenv('PREVARISC_BOOTSTRAP_3') ? 'danger' : 'error', 'title' => 'Erreur lors de l\'enregistrement.', 'message' => 'Une erreur s\'est produite lors de l\enregistrement de la prescription ('.$e->getMessage().')']);
$this->_helper->flashMessenger(['context' => getenv('PREVARISC_BOOTSTRAP_3') ? 'danger' : 'error', 'title' => "Erreur lors de l'enregistrement.", 'message' => 'Une erreur s\'est produite lors de l\enregistrement de la prescription ('.$e->getMessage().')']);
}
}

Expand Down Expand Up @@ -2805,7 +2806,7 @@ public function prescriptionAction(): void
$this->_helper->flashMessenger(['context' => 'success', 'title' => 'Suppression effectué.', 'message' => 'La prescription a bien été supprimée']);
}
} catch (Exception $e) {
$this->_helper->flashMessenger(['context' => getenv('PREVARISC_BOOTSTRAP_3') ? 'danger' : 'error', 'title' => 'Erreur lors de l\'enregistrement.', 'message' => 'Une erreur s\'est produite lors de l\enregistrement de la prescription ('.$e->getMessage().')']);
$this->_helper->flashMessenger(['context' => getenv('PREVARISC_BOOTSTRAP_3') ? 'danger' : 'error', 'title' => "Erreur lors de l'enregistrement.", 'message' => 'Une erreur s\'est produite lors de l\enregistrement de la prescription ('.$e->getMessage().')']);
}
}

Expand Down
3 changes: 3 additions & 0 deletions application/controllers/FormulaireController.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ public function indexAction(): void
} else {
$viewInlineScript->inlineScript()->appendFile('/js/formulaire/capsule-rubrique-bs3.js', 'text/javascript');
}

$viewInlineScript->inlineScript()->appendFile('/js/formulaire/ordonnancement/ordonnancement.js', 'text/javascript');
$viewInlineScript->inlineScript()->appendFile('/js/formulaire/ordonnancement/Sortable.min.js', 'text/javascript');

Expand Down Expand Up @@ -118,6 +119,7 @@ public function editRubriqueAction(): void
} else {
$viewInlineScript->inlineScript()->appendFile('/js/formulaire/rubrique-bs3.js', 'text/javascript');
}

$viewInlineScript->inlineScript()->appendFile('/js/formulaire/ordonnancement/ordonnancement.js', 'text/javascript');
$viewInlineScript->inlineScript()->appendFile('/js/formulaire/ordonnancement/Sortable.min.js', 'text/javascript');

Expand Down Expand Up @@ -235,6 +237,7 @@ public function editChampAction(): void
} else {
$viewInlineScript->inlineScript()->appendFile('/js/formulaire/rubrique-bs3.js', 'text/javascript');
}

$viewInlineScript->inlineScript()->appendFile('/js/formulaire/champ.js', 'text/javascript');
$viewInlineScript->inlineScript()->appendFile('/js/formulaire/ordonnancement/ordonnancement.js', 'text/javascript');
$viewInlineScript->inlineScript()->appendFile('/js/formulaire/ordonnancement/Sortable.min.js', 'text/javascript');
Expand Down
2 changes: 1 addition & 1 deletion application/controllers/GestionPrescriptionsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ public function gestionTextesAction(): void
$this->_helper->flashMessenger(['context' => 'success', 'title' => 'Suppression effectuée.', 'message' => 'Le texte a bien été supprimé']);
}
} catch (Exception $e) {
$this->_helper->flashMessenger(['context' => getenv('PREVARISC_BOOTSTRAP_3') ? 'danger' : 'error', 'title' => 'Erreur lors de l\'enregistrement.', 'message' => 'Une erreur s\'est produite lors de l\enregistrement de la prescription ('.$e->getMessage().')']);
$this->_helper->flashMessenger(['context' => getenv('PREVARISC_BOOTSTRAP_3') ? 'danger' : 'error', 'title' => "Erreur lors de l'enregistrement.", 'message' => 'Une erreur s\'est produite lors de l\enregistrement de la prescription ('.$e->getMessage().')']);
}
}

Expand Down
1 change: 1 addition & 0 deletions application/plugins/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ public function preDispatch(Zend_Controller_Request_Abstract $request): void
$view->headLink()->appendStylesheet('/css/main-bs3.css', 'all');
$view->headLink()->appendStylesheet('/css/tom-select.default.min.css', 'all');
}

$view->headLink()->appendStylesheet('/css/login.css', 'all');
$view->headLink()->appendStylesheet('/css/utilities.css', 'all');
$view->headLink()->appendStylesheet('/css/chosen.min.css', 'all');
Expand Down
2 changes: 1 addition & 1 deletion application/views/helpers/AfficheDoc.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ public function afficheDoc($verrou, string $natureId, string $id, $libelle, $ref
<br class='clear'/>
");
}
}
}
6 changes: 3 additions & 3 deletions application/views/helpers/AfficheDocBs3.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

class View_Helper_AfficheDocBs3
{
public function afficheDoc($verrou, $natureId, $id, $libelle, $ref = null, $date = null, $type = null): string
public function afficheDoc($verrou, string $natureId, string $id, $libelle, $ref = null, $date = null, $type = null): string
{
if (!$date) {
// document n'ayant PAS d'enregistrement dans la BD
Expand Down Expand Up @@ -32,8 +32,8 @@ public function afficheDoc($verrou, $natureId, $id, $libelle, $ref = null, $date
<div class='col-md-5'>
<div class='checkbox'>
<label>
<input type='checkbox' ".$styleChecked.' '.$etatCheck." name='check_".$natureId.'_'.$id.$type."' id='check_".$natureId.'_'.$id.$type."' ".((1 == $verrou) ? "disabled='disabled'" : '')." />
";
<input type='checkbox' ".$styleChecked.' '.$etatCheck." name='check_".$natureId.'_'.$id.$type."' id='check_".$natureId.'_'.$id.$type."' ".((1 == $verrou) ? "disabled='disabled'" : '').' />
';
if ($type) {
$return .= "<textarea class='form-control' name='libelle_".$natureId.'_'.$id.$type."' id='libelle_".$natureId.'_'.$id.$type."' rows='3' style='display:none;'>".nl2br($libelle).'</textarea>';
}
Expand Down
42 changes: 33 additions & 9 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -243,13 +243,13 @@ parameters:
-
message: '#^Access to an undefined property Zend_Controller_Action_HelperBroker\:\:\$layout\.$#'
identifier: property.notFound
count: 4
count: 5
path: application/controllers/DossierController.php

-
message: '#^Access to an undefined property Zend_Controller_Action_HelperBroker\:\:\$viewRenderer\.$#'
identifier: property.notFound
count: 16
count: 17
path: application/controllers/DossierController.php

-
Expand Down Expand Up @@ -645,7 +645,7 @@ parameters:
-
message: '#^Call to an undefined method Zend_View_Interface\:\:headLink\(\)\.$#'
identifier: method.notFound
count: 11
count: 21
path: application/controllers/DossierController.php

-
Expand All @@ -657,7 +657,7 @@ parameters:
-
message: '#^Call to an undefined method Zend_View_Interface\:\:inlineScript\(\)\.$#'
identifier: method.notFound
count: 18
count: 27
path: application/controllers/DossierController.php

-
Expand Down Expand Up @@ -759,7 +759,7 @@ parameters:
-
message: '#^Call to an undefined method Zend_View_Interface\:\:headLink\(\)\.$#'
identifier: method.notFound
count: 12
count: 20
path: application/controllers/EtablissementController.php

-
Expand All @@ -771,7 +771,7 @@ parameters:
-
message: '#^Call to an undefined method Zend_View_Interface\:\:inlineScript\(\)\.$#'
identifier: method.notFound
count: 10
count: 12
path: application/controllers/EtablissementController.php

-
Expand All @@ -789,7 +789,7 @@ parameters:
-
message: '#^Access to an undefined property Zend_Controller_Action_HelperBroker\:\:\$viewRenderer\.$#'
identifier: property.notFound
count: 4
count: 5
path: application/controllers/FormulaireController.php

-
Expand Down Expand Up @@ -825,13 +825,13 @@ parameters:
-
message: '#^Call to an undefined method Zend_View_Interface\:\:headLink\(\)\.$#'
identifier: method.notFound
count: 6
count: 12
path: application/controllers/FormulaireController.php

-
message: '#^Call to an undefined method Zend_View_Interface\:\:inlineScript\(\)\.$#'
identifier: method.notFound
count: 10
count: 13
path: application/controllers/FormulaireController.php

-
Expand Down Expand Up @@ -2106,12 +2106,36 @@ parameters:
count: 1
path: application/plugins/Security.php

-
message: '#^Access to an undefined property Zend_View\:\:\$branch_prevarisc\.$#'
identifier: property.notFound
count: 2
path: application/plugins/View.php

-
message: '#^Access to an undefined property Zend_View\:\:\$revision_prevarisc\.$#'
identifier: property.notFound
count: 2
path: application/plugins/View.php

-
message: '#^Access to an undefined property Zend_View\:\:\$version_prevarisc\.$#'
identifier: property.notFound
count: 2
path: application/plugins/View.php

-
message: '#^Call to an undefined method Zend_Controller_Action_Helper_Abstract\:\:setView\(\)\.$#'
identifier: method.notFound
count: 1
path: application/plugins/View.php

-
message: '#^Call to an undefined method Zend_View_Helper_Navigation\:\:breadcrumbs\(\)\.$#'
identifier: method.notFound
count: 1
path: application/plugins/View.php

-
message: '#^Call to an undefined method Zend_Controller_Request_Abstract\:\:isXmlHttpRequest\(\)\.$#'
identifier: method.notFound
Expand Down

0 comments on commit 77baa56

Please sign in to comment.