Passed
Push — main ( 5ee2f7...6c6690 )
by Thierry
03:51
created
jaxon-core/src/App/Metadata/Data/DatabagData.php 1 patch
Switch Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -22,61 +22,61 @@
 block discarded – undo
22 22
 
23 23
 class DatabagData extends AbstractData
24 24
 {
25
-    /**
25
+/**
26 26
      * The databag names
27 27
      *
28 28
      * @var string
29 29
      */
30
-    protected $aNames = [];
30
+protected $aNames = [];
31 31
 
32
-    /**
32
+/**
33 33
      * @return string
34 34
      */
35
-    public function getName(): string
36
-    {
37
-        return 'bags';
38
-    }
35
+public function getName(): string
36
+{
37
+return 'bags';
38
+}
39 39
 
40
-    /**
40
+/**
41 41
      * @return mixed
42 42
      */
43
-    public function getValue(): mixed
44
-    {
45
-        return array_values($this->aNames);
46
-    }
43
+public function getValue(): mixed
44
+{
45
+return array_values($this->aNames);
46
+}
47 47
 
48
-    /**
48
+/**
49 49
      * @param string $sName
50 50
      *
51 51
      * @return void
52 52
      */
53
-    protected function validateName(string $sName): void
54
-    {
55
-        if(preg_match('/^[a-zA-Z][a-zA-Z0-9_\-\.]*$/', $sName) > 0)
56
-        {
57
-            return;
58
-        }
59
-        throw new SetupException("$sName is not a valid \"name\" value for databag");
60
-    }
53
+protected function validateName(string $sName): void
54
+{
55
+if(preg_match('/^[a-zA-Z][a-zA-Z0-9_\-\.]*$/', $sName) > 0)
56
+{
57
+return;
58
+}
59
+throw new SetupException("$sName is not a valid \"name\" value for databag");
60
+}
61 61
 
62
-    /**
62
+/**
63 63
      * @param string $sName
64 64
      *
65 65
      * @return void
66 66
      */
67
-    public function addValue(string $sName): void
68
-    {
69
-        $this->validateName($sName);
67
+public function addValue(string $sName): void
68
+{
69
+$this->validateName($sName);
70 70
 
71
-        $this->aNames[$sName] = $sName;
72
-    }
71
+$this->aNames[$sName] = $sName;
72
+}
73 73
 
74
-    /**
74
+/**
75 75
      * @inheritDoc
76 76
      */
77
-    public function encode(string $sVarName): array
78
-    {
79
-        return array_map(fn($sName) =>
80
-            "{$sVarName}->addValue('$sName');", $this->aNames);
81
-    }
77
+public function encode(string $sVarName): array
78
+{
79
+return array_map(fn($sName) =>
80
+"{$sVarName}->addValue('$sName');", $this->aNames);
81
+}
82 82
 }
Please login to merge, or discard this patch.
jaxon-core/src/App/Metadata/Data/CallbackData.php 1 patch
Switch Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -22,61 +22,61 @@
 block discarded – undo
22 22
 
23 23
 class CallbackData extends AbstractData
24 24
 {
25
-    /**
25
+/**
26 26
      * The callback js objects
27 27
      *
28 28
      * @var string
29 29
      */
30
-    protected $aNames = [];
30
+protected $aNames = [];
31 31
 
32
-    /**
32
+/**
33 33
      * @return string
34 34
      */
35
-    public function getName(): string
36
-    {
37
-        return 'callback';
38
-    }
35
+public function getName(): string
36
+{
37
+return 'callback';
38
+}
39 39
 
40
-    /**
40
+/**
41 41
      * @return mixed
42 42
      */
43
-    public function getValue(): mixed
44
-    {
45
-        return array_values($this->aNames);
46
-    }
43
+public function getValue(): mixed
44
+{
45
+return array_values($this->aNames);
46
+}
47 47
 
48
-    /**
48
+/**
49 49
      * @param string $sName
50 50
      *
51 51
      * @return void
52 52
      */
53
-    protected function validateObjectName(string $sName): void
54
-    {
55
-        if(preg_match('/^[a-zA-Z][a-zA-Z0-9_\-\.]*$/', $sName) > 0)
56
-        {
57
-            return;
58
-        }
59
-        throw new SetupException("$sName is not a valid \"name\" value for callback");
60
-    }
53
+protected function validateObjectName(string $sName): void
54
+{
55
+if(preg_match('/^[a-zA-Z][a-zA-Z0-9_\-\.]*$/', $sName) > 0)
56
+{
57
+return;
58
+}
59
+throw new SetupException("$sName is not a valid \"name\" value for callback");
60
+}
61 61
 
62
-    /**
62
+/**
63 63
      * @param string $sName
64 64
      *
65 65
      * @return void
66 66
      */
67
-    public function addValue(string $sName): void
68
-    {
69
-        $this->validateObjectName($sName);
67
+public function addValue(string $sName): void
68
+{
69
+$this->validateObjectName($sName);
70 70
 
71
-        $this->aNames[$sName] = $sName;
72
-    }
71
+$this->aNames[$sName] = $sName;
72
+}
73 73
 
74
-    /**
74
+/**
75 75
      * @inheritDoc
76 76
      */
77
-    public function encode(string $sVarName): array
78
-    {
79
-        return array_map(fn($sName) =>
80
-            "{$sVarName}->addValue('$sName');", $this->aNames);
81
-    }
77
+public function encode(string $sVarName): array
78
+{
79
+return array_map(fn($sName) =>
80
+"{$sVarName}->addValue('$sName');", $this->aNames);
81
+}
82 82
 }
Please login to merge, or discard this patch.