Passed
Push — main ( 525366...99eb4f )
by Thierry
03:58
created
jaxon-core/src/App/Component/HelperTrait.php 1 patch
Switch Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -6,26 +6,26 @@
 block discarded – undo
6 6
 
7 7
 trait HelperTrait
8 8
 {
9
-    /**
9
+/**
10 10
      * @var ComponentHelper
11 11
      */
12
-    private $xHelper;
12
+private $xHelper;
13 13
 
14
-    /**
14
+/**
15 15
      * @param ComponentHelper $xHelper
16 16
      *
17 17
      * @return void
18 18
      */
19
-    private function setHelper(ComponentHelper $xHelper): void
20
-    {
21
-        $this->xHelper = $xHelper;
22
-    }
19
+private function setHelper(ComponentHelper $xHelper): void
20
+{
21
+$this->xHelper = $xHelper;
22
+}
23 23
 
24
-    /**
24
+/**
25 25
      * @return ComponentHelper
26 26
      */
27
-    protected function helper(): ComponentHelper
28
-    {
29
-        return $this->xHelper;
30
-    }
27
+protected function helper(): ComponentHelper
28
+{
29
+return $this->xHelper;
30
+}
31 31
 }
Please login to merge, or discard this patch.
jaxon-core/src/App/Component/NodeResponseTrait.php 1 patch
Switch Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -7,49 +7,49 @@
 block discarded – undo
7 7
 
8 8
 trait NodeResponseTrait
9 9
 {
10
-    /**
10
+/**
11 11
      * @var NodeResponse
12 12
      */
13
-    protected $nodeResponse = null;
13
+protected $nodeResponse = null;
14 14
 
15
-    /**
15
+/**
16 16
      * @var string
17 17
      */
18
-    protected $overrides = '';
18
+protected $overrides = '';
19 19
 
20
-    /**
20
+/**
21 21
      * @param Container $di
22 22
      *
23 23
      * @return void
24 24
      */
25
-    private function setNodeResponse(Container $di): void
26
-    {
27
-        // Each component must have its own reponse object.
28
-        // A component can override another one. In this case,
29
-        // its response is attached to the overriden component DOM node.
30
-        $this->nodeResponse = $di->newNodeResponse($this->rq($this->overrides ?: ''));
31
-    }
25
+private function setNodeResponse(Container $di): void
26
+{
27
+// Each component must have its own reponse object.
28
+// A component can override another one. In this case,
29
+// its response is attached to the overriden component DOM node.
30
+$this->nodeResponse = $di->newNodeResponse($this->rq($this->overrides ?: ''));
31
+}
32 32
 
33
-    /**
33
+/**
34 34
      * Get the component response
35 35
      *
36 36
      * @return NodeResponse
37 37
      */
38
-    final protected function node(): NodeResponse
39
-    {
40
-        return $this->nodeResponse;
41
-    }
38
+final protected function node(): NodeResponse
39
+{
40
+return $this->nodeResponse;
41
+}
42 42
 
43
-    /**
43
+/**
44 44
      * Set the component item.
45 45
      *
46 46
      * @param string $item
47 47
      *
48 48
      * @return self
49 49
      */
50
-    final public function item(string $item): self
51
-    {
52
-        $this->node()->item($item);
53
-        return $this;
54
-    }
50
+final public function item(string $item): self
51
+{
52
+$this->node()->item($item);
53
+return $this;
54
+}
55 55
 }
Please login to merge, or discard this patch.
jaxon-core/src/App/Metadata/Data/DatabagData.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
      */
51 51
     protected function validateName(string $sName): void
52 52
     {
53
-        if(preg_match('/^[a-zA-Z][a-zA-Z0-9_\-\.]*$/', $sName) > 0)
53
+        if (preg_match('/^[a-zA-Z][a-zA-Z0-9_\-\.]*$/', $sName) > 0)
54 54
         {
55 55
             return;
56 56
         }
Please login to merge, or discard this patch.
Switch Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -21,61 +21,61 @@
 block discarded – undo
21 21
 
22 22
 class DatabagData extends AbstractData
23 23
 {
24
-    /**
24
+/**
25 25
      * The databag names
26 26
      *
27 27
      * @var string
28 28
      */
29
-    protected $aNames = [];
29
+protected $aNames = [];
30 30
 
31
-    /**
31
+/**
32 32
      * @return string
33 33
      */
34
-    public function getName(): string
35
-    {
36
-        return 'bags';
37
-    }
34
+public function getName(): string
35
+{
36
+return 'bags';
37
+}
38 38
 
39
-    /**
39
+/**
40 40
      * @return mixed
41 41
      */
42
-    public function getValue(): mixed
43
-    {
44
-        return $this->aNames;
45
-    }
42
+public function getValue(): mixed
43
+{
44
+return $this->aNames;
45
+}
46 46
 
47
-    /**
47
+/**
48 48
      * @param string $sName
49 49
      *
50 50
      * @return void
51 51
      */
52
-    protected function validateName(string $sName): void
53
-    {
54
-        if(preg_match('/^[a-zA-Z][a-zA-Z0-9_\-\.]*$/', $sName) > 0)
55
-        {
56
-            return;
57
-        }
58
-        throw new SetupException("$sName is not a valid \"name\" value for databag");
59
-    }
52
+protected function validateName(string $sName): void
53
+{
54
+if(preg_match('/^[a-zA-Z][a-zA-Z0-9_\-\.]*$/', $sName) > 0)
55
+{
56
+return;
57
+}
58
+throw new SetupException("$sName is not a valid \"name\" value for databag");
59
+}
60 60
 
61
-    /**
61
+/**
62 62
      * @param string $sName
63 63
      *
64 64
      * @return void
65 65
      */
66
-    public function addValue(string $sName): void
67
-    {
68
-        $this->validateName($sName);
66
+public function addValue(string $sName): void
67
+{
68
+$this->validateName($sName);
69 69
 
70
-        $this->aNames[] = $sName;
71
-    }
70
+$this->aNames[] = $sName;
71
+}
72 72
 
73
-    /**
73
+/**
74 74
      * @inheritDoc
75 75
      */
76
-    public function encode(string $sVarName): array
77
-    {
78
-        return array_map(fn($sName) =>
79
-            "{$sVarName}->addValue('$sName');", $this->aNames);
80
-    }
76
+public function encode(string $sVarName): array
77
+{
78
+return array_map(fn($sName) =>
79
+"{$sVarName}->addValue('$sName');", $this->aNames);
80
+}
81 81
 }
Please login to merge, or discard this patch.
jaxon-core/src/App/Metadata/Data/AfterData.php 1 patch
Switch Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -16,11 +16,11 @@
 block discarded – undo
16 16
 
17 17
 class AfterData extends HookData
18 18
 {
19
-    /**
19
+/**
20 20
      * @inheritDoc
21 21
      */
22
-    protected function getType(): string
23
-    {
24
-        return 'after';
25
-    }
22
+protected function getType(): string
23
+{
24
+return 'after';
25
+}
26 26
 }
Please login to merge, or discard this patch.
jaxon-core/src/App/Metadata/Data/BeforeData.php 1 patch
Switch Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -16,11 +16,11 @@
 block discarded – undo
16 16
 
17 17
 class BeforeData extends HookData
18 18
 {
19
-    /**
19
+/**
20 20
      * @inheritDoc
21 21
      */
22
-    protected function getType(): string
23
-    {
24
-        return 'before';
25
-    }
22
+protected function getType(): string
23
+{
24
+return 'before';
25
+}
26 26
 }
Please login to merge, or discard this patch.
jaxon-core/src/App/Metadata/Data/HookData.php 2 patches
Switch Indentation   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -21,71 +21,71 @@
 block discarded – undo
21 21
 
22 22
 abstract class HookData extends AbstractData
23 23
 {
24
-    /**
24
+/**
25 25
      * @var array
26 26
      */
27
-    protected $aCalls = [];
27
+protected $aCalls = [];
28 28
 
29
-    /**
29
+/**
30 30
      * @return string
31 31
      */
32
-    abstract protected function getType(): string;
32
+abstract protected function getType(): string;
33 33
 
34
-    /**
34
+/**
35 35
      * @return string
36 36
      */
37
-    public function getName(): string
38
-    {
39
-        return '__' . $this->getType();
40
-    }
37
+public function getName(): string
38
+{
39
+return '__' . $this->getType();
40
+}
41 41
 
42
-    /**
42
+/**
43 43
      * @return mixed
44 44
      */
45
-    public function getValue(): mixed
46
-    {
47
-        return $this->aCalls;
48
-    }
45
+public function getValue(): mixed
46
+{
47
+return $this->aCalls;
48
+}
49 49
 
50
-    /**
50
+/**
51 51
      * @param string $sMethod
52 52
      *
53 53
      * @return void
54 54
      */
55
-    protected function validateMethod(string $sMethod): void
56
-    {
57
-        if(preg_match('/^[a-zA-Z][a-zA-Z0-9_]*$/', $sMethod) > 0)
58
-        {
59
-            return;
60
-        }
61
-        $sType = $this->getType();
62
-        throw new SetupException("$sMethod is not a valid \"call\" value for $sType.");
63
-    }
55
+protected function validateMethod(string $sMethod): void
56
+{
57
+if(preg_match('/^[a-zA-Z][a-zA-Z0-9_]*$/', $sMethod) > 0)
58
+{
59
+return;
60
+}
61
+$sType = $this->getType();
62
+throw new SetupException("$sMethod is not a valid \"call\" value for $sType.");
63
+}
64 64
 
65
-    /**
65
+/**
66 66
      * @param string $sMethod
67 67
      * @param array $aParams
68 68
      *
69 69
      * @return void
70 70
      */
71
-    public function addCall(string $sMethod, array $aParams): void
72
-    {
73
-        $this->validateMethod($sMethod);
71
+public function addCall(string $sMethod, array $aParams): void
72
+{
73
+$this->validateMethod($sMethod);
74 74
 
75
-        $this->aCalls[$sMethod] = $aParams;
76
-    }
75
+$this->aCalls[$sMethod] = $aParams;
76
+}
77 77
 
78
-    /**
78
+/**
79 79
      * @inheritDoc
80 80
      */
81
-    public function encode(string $sVarName): array
82
-    {
83
-        $aCalls = [];
84
-        foreach($this->aCalls as $sMethod => $aParams)
85
-        {
86
-            $sParams = addslashes(json_encode($aParams));
87
-            $aCalls[] = "{$sVarName}->addCall('$sMethod', json_decode(\"$sParams\", true));";
88
-        }
89
-        return $aCalls;
90
-    }
81
+public function encode(string $sVarName): array
82
+{
83
+$aCalls = [];
84
+foreach($this->aCalls as $sMethod => $aParams)
85
+{
86
+$sParams = addslashes(json_encode($aParams));
87
+$aCalls[] = "{$sVarName}->addCall('$sMethod', json_decode(\"$sParams\", true));";
88
+}
89
+return $aCalls;
90
+}
91 91
 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
      */
55 55
     protected function validateMethod(string $sMethod): void
56 56
     {
57
-        if(preg_match('/^[a-zA-Z][a-zA-Z0-9_]*$/', $sMethod) > 0)
57
+        if (preg_match('/^[a-zA-Z][a-zA-Z0-9_]*$/', $sMethod) > 0)
58 58
         {
59 59
             return;
60 60
         }
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
     public function encode(string $sVarName): array
82 82
     {
83 83
         $aCalls = [];
84
-        foreach($this->aCalls as $sMethod => $aParams)
84
+        foreach ($this->aCalls as $sMethod => $aParams)
85 85
         {
86 86
             $sParams = addslashes(json_encode($aParams));
87 87
             $aCalls[] = "{$sVarName}->addCall('$sMethod', json_decode(\"$sParams\", true));";
Please login to merge, or discard this patch.
jaxon-core/src/App/Metadata/Data/AbstractData.php 1 patch
Switch Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,12 +16,12 @@
 block discarded – undo
16 16
 
17 17
 abstract class AbstractData
18 18
 {
19
-    /**
19
+/**
20 20
      * Generate the PHP code to populate a Metadata object
21 21
      *
22 22
      * @param string $sVarName
23 23
      *
24 24
      * @return array
25 25
      */
26
-    abstract public function encode(string $sVarName): array;
26
+abstract public function encode(string $sVarName): array;
27 27
 }
Please login to merge, or discard this patch.
jaxon-core/src/Plugin/AbstractRequestPlugin.php 1 patch
Switch Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -30,16 +30,16 @@
 block discarded – undo
30 30
 
31 31
 abstract class AbstractRequestPlugin extends AbstractPlugin implements CallableRegistryInterface, RequestHandlerInterface
32 32
 {
33
-    /**
33
+/**
34 34
      * @var Target
35 35
      */
36
-    protected $xTarget = null;
36
+protected $xTarget = null;
37 37
 
38
-    /**
38
+/**
39 39
      * @inheritDoc
40 40
      */
41
-    public function getTarget(): ?Target
42
-    {
43
-        return $this->xTarget;
44
-    }
41
+public function getTarget(): ?Target
42
+{
43
+return $this->xTarget;
44
+}
45 45
 }
Please login to merge, or discard this patch.
jaxon-core/src/Plugin/AbstractPackage.php 1 patch
Switch Indentation   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -19,46 +19,46 @@  discard block
 block discarded – undo
19 19
 
20 20
 abstract class AbstractPackage extends AbstractCodeGenerator
21 21
 {
22
-    /**
22
+/**
23 23
      * The configuration options of the package
24 24
      *
25 25
      * @var Config
26 26
      */
27
-    protected $xPkgConfig;
27
+protected $xPkgConfig;
28 28
 
29
-    /**
29
+/**
30 30
      * The view renderer
31 31
      *
32 32
      * @var ViewRenderer
33 33
      */
34
-    protected $xRenderer;
34
+protected $xRenderer;
35 35
 
36
-    /**
36
+/**
37 37
      * Get the path to the config file, or the config options in an array.
38 38
      *
39 39
      * @return string|array
40 40
      */
41
-    abstract public static function config(): string|array;
41
+abstract public static function config(): string|array;
42 42
 
43
-    /**
43
+/**
44 44
      * Get the package config object
45 45
      *
46 46
      * @return Config
47 47
      */
48
-    final public function getConfig(): Config
49
-    {
50
-        return $this->xPkgConfig;
51
-    }
48
+final public function getConfig(): Config
49
+{
50
+return $this->xPkgConfig;
51
+}
52 52
 
53
-    /**
53
+/**
54 54
      * This method is automatically called after the package instance is created and configured.
55 55
      *
56 56
      * @return void
57 57
      */
58
-    protected function init(): void
59
-    {}
58
+protected function init(): void
59
+{}
60 60
 
61
-    /**
61
+/**
62 62
      * Get the value of a given package option
63 63
      *
64 64
      * @param string $sOption    The option name
@@ -66,49 +66,49 @@  discard block
 block discarded – undo
66 66
      *
67 67
      * @return mixed
68 68
      */
69
-    final public function getOption(string $sOption, $xDefault = null): mixed
70
-    {
71
-        return $this->xPkgConfig->getOption($sOption, $xDefault);
72
-    }
69
+final public function getOption(string $sOption, $xDefault = null): mixed
70
+{
71
+return $this->xPkgConfig->getOption($sOption, $xDefault);
72
+}
73 73
 
74
-    /**
74
+/**
75 75
      * Get the view renderer
76 76
      *
77 77
      * @return ViewRenderer
78 78
      */
79
-    final public function view(): ViewRenderer
80
-    {
81
-        return $this->xRenderer;
82
-    }
79
+final public function view(): ViewRenderer
80
+{
81
+return $this->xRenderer;
82
+}
83 83
 
84
-    /**
84
+/**
85 85
      * @inheritDoc
86 86
      */
87
-    final public function getHash(): string
88
-    {
89
-        // Packages do not generate hash on their own. So we make this method final.
90
-        return '';
91
-    }
87
+final public function getHash(): string
88
+{
89
+// Packages do not generate hash on their own. So we make this method final.
90
+return '';
91
+}
92 92
 
93
-    /**
93
+/**
94 94
      * Get the HTML code of the package home page
95 95
      *
96 96
      * @return string|Stringable
97 97
      */
98
-    public function getHtml(): string|Stringable
99
-    {
100
-        return '';
101
-    }
98
+public function getHtml(): string|Stringable
99
+{
100
+return '';
101
+}
102 102
 
103
-    /**
103
+/**
104 104
      * Get the HTML code of the package home page
105 105
      *
106 106
      * This method is an alias for getHtml().
107 107
      *
108 108
      * @return string|Stringable
109 109
      */
110
-    public function html(): string|Stringable
111
-    {
112
-        return $this->getHtml();
113
-    }
110
+public function html(): string|Stringable
111
+{
112
+return $this->getHtml();
113
+}
114 114
 }
Please login to merge, or discard this patch.