Completed
Push — master ( f1dead...6e2731 )
by Sergey
03:37
created
src/LTDBeget/sphinx/configurator/deserializers/ArrayDeserializer.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 
89 89
                 $name            = $section["name"];
90 90
                 $inheritanceName = !empty($section["inheritance"]) ? $section["inheritance"] : null;
91
-                $section      = $this->objectConfiguration->addSource($name, $inheritanceName);
91
+                $section = $this->objectConfiguration->addSource($name, $inheritanceName);
92 92
                 break;
93 93
             case eSection::INDEX():
94 94
                 $name = $section["name"];
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
                 }
99 99
 
100 100
                 $inheritanceName = !empty($section["inheritance"]) ? $section["inheritance"] : null;
101
-                $section      = $this->objectConfiguration->addIndex($name, $inheritanceName);
101
+                $section = $this->objectConfiguration->addIndex($name, $inheritanceName);
102 102
                 break;
103 103
             case eSection::INDEXER():
104 104
                 $section = $this->objectConfiguration->getIndexer();
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
      */
156 156
     private function getOptionName(Section $section, string $name) : eOption
157 157
     {
158
-        switch($section->getType()) {
158
+        switch ($section->getType()) {
159 159
             case eSection::SOURCE():
160 160
                 $option = eSourceOption::get($name);
161 161
                 break;
Please login to merge, or discard this patch.
src/LTDBeget/sphinx/configurator/exceptions/SyntaxErrorException.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,8 +38,7 @@
 block discarded – undo
38 38
      * @param int $code
39 39
      * @param Exception|null $previous
40 40
      */
41
-    public function __construct
42
-    (
41
+    public function __construct(
43 42
         string $unexpected_char,
44 43
         string $original_data,
45 44
         int $error_line,
Please login to merge, or discard this patch.
src/LTDBeget/sphinx/configurator/configurationEntities/base/Section.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
      */
59 59
     final public function getType() : eSection
60 60
     {
61
-        if(is_null($this->type)) {
61
+        if (is_null($this->type)) {
62 62
             $this->initType();
63 63
         }
64 64
 
@@ -86,9 +86,9 @@  discard block
 block discarded – undo
86 86
      */
87 87
     final public function iterateOptions()
88 88
     {
89
-        foreach($this->options as $option) {
90
-            if(is_array($option)) {
91
-                foreach($option as $multiOption) {
89
+        foreach ($this->options as $option) {
90
+            if (is_array($option)) {
91
+                foreach ($option as $multiOption) {
92 92
                     yield $multiOption;
93 93
                 }
94 94
             } else {
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
     final protected function addOptionInternal(eOption $name, string $value) : Option
108 108
     {
109 109
         $informer = $this->getInformer();
110
-        if(! $informer->isKnownOption($this->getType(), $name)) {
110
+        if (!$informer->isKnownOption($this->getType(), $name)) {
111 111
             $version = $this->getConfiguration()->getVersion();
112 112
             throw new WrongContextException(
113 113
                 "For sphinx v. {$version} option {$name}  in {$this->getType()} isn't available"
@@ -117,8 +117,8 @@  discard block
 block discarded – undo
117 117
 
118 118
         $option = new Option($this, $name, $value, $isMultiValue);
119 119
 
120
-        if($option->isMultiValue()) {
121
-            if(!array_key_exists( (string) $option->getName(), $this->options)) {
120
+        if ($option->isMultiValue()) {
121
+            if (!array_key_exists((string) $option->getName(), $this->options)) {
122 122
                 $this->options[(string) $option->getName()] = [];
123 123
             }
124 124
             $this->options[(string) $option->getName()][] = $option;
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
     private function initType()
152 152
     {
153 153
         $section_name = strtolower($this->shortClassName());
154
-        switch($section_name) {
154
+        switch ($section_name) {
155 155
             case eSection::INDEX:
156 156
                 $this->type = eSection::INDEX();
157 157
                 break;
Please login to merge, or discard this patch.
src/LTDBeget/sphinx/configurator/configurationEntities/base/Definition.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -35,11 +35,11 @@  discard block
 block discarded – undo
35 35
         string $inheritance = null
36 36
     )
37 37
     {
38
-        if(empty($name)) {
38
+        if (empty($name)) {
39 39
             throw new LogicException("Name of section {$this->getType()} can't be empty.");
40 40
         }
41 41
 
42
-        if(! is_null($inheritance) && empty($name)) {
42
+        if (!is_null($inheritance) && empty($name)) {
43 43
             throw new LogicException("Inheritance of section {$this->getType()} can't be empty.");
44 44
         }
45 45
 
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
     public function __toString() : string
58 58
     {
59 59
         $string = "{$this->getType()} {$this->getName()}";
60
-        if($this->isHasInheritance()) {
60
+        if ($this->isHasInheritance()) {
61 61
             // TODO if object parent get name
62 62
             $string .= " : {$this->getInheritance()}";
63 63
         }
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
      */
70 70
     public function isHasInheritance() : bool
71 71
     {
72
-        return ! is_null($this->inheritance);
72
+        return !is_null($this->inheritance);
73 73
     }
74 74
 
75 75
     /**
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
      */
80 80
     public function getInheritance() : string
81 81
     {
82
-        if(! $this->isHasInheritance()) {
82
+        if (!$this->isHasInheritance()) {
83 83
             throw new LogicException("Trying to get inheritance for {$this->getType()} which doesn't' have it.");
84 84
         }
85 85
 
Please login to merge, or discard this patch.