Commit bb1e77d9 authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Adaptations UnicaenCode PHP8

parent 1a848502
Loading
Loading
Loading
Loading
−3
Changes for code/template/FormAwareTrait.php: 0 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -30,9 +30,6 @@ trait <classname>
<if useGetter notrim>


    /**
     * @return <targetClassname>
     */
    public function get<method>(): ?<targetClassname>
    {
        if (!$this-><variable>){
−3
Changes for code/template/ServiceAwareTrait.php: 0 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -30,9 +30,6 @@ trait <classname>
<if useGetter notrim>


    /**
     * @return <targetClassname>
     */
    public function get<method>(): ?<targetClassname>
    {
        if (!$this-><variable>){
+4 −1
Changes for code/test6.php: 4 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -11,7 +11,9 @@
$introspection = \UnicaenCode\Util::introspection();


$traits = $introspection->getTraits();
//$traits = $introspection->getTraits();
$traits = [\Application\Form\CentreCout\Traits\CentreCoutSaisieFormAwareTrait::class];

foreach ($traits as $trait) {
    $params = $introspection->getTraitParams($trait);
    if ($params['aware']) {
@@ -20,6 +22,7 @@ foreach ($traits as $trait) {
                'class'     => $params['targetClass'],
                'useGetter' => true,
                'subDir'    => $params['subDir'],
                'expanded'  => false,
            ]);
        } else {
            echo "ATTENTION : Le trait $trait ne fait référence à aucune classe connue et identifiée<br />\n";
+2 −2
Changes for config/autoload/unicaen-code.global.php: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@ $settings = [
        [
            'template'  => 'AwareTrait',
            'type'      => ['Service', 'Hydrator', 'Provider', 'Processus'],
            'function' => function (array $params) {
            'generator' => function (array $params): array {
                $params['template'] = 'ServiceAwareTrait';

                return $params;
@@ -19,7 +19,7 @@ $settings = [
        [
            'template'  => 'AwareTrait',
            'type'      => ['Form', 'Fieldset'],
            'function' => function (array $params) {
            'generator' => function (array $params): array {
                $params['template'] = 'FormAwareTrait';

                return $params;