Passed
Push — master ( ae59e9...ed1478 )
by Sergey
03:17
created
src/LTDBeget/sphinx/enums/base/Enum.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,6 +19,6 @@
 block discarded – undo
19 19
      */
20 20
     public function __toString() : string
21 21
     {
22
-        return (string)$this->getValue();
22
+        return (string) $this->getValue();
23 23
     }
24 24
 }
25 25
\ No newline at end of file
Please login to merge, or discard this patch.
src/LTDBeget/sphinx/configurator/serializers/ArraySerializer.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -141,8 +141,8 @@  discard block
 block discarded – undo
141 141
     private function serializeDefinition(Definition $definition)
142 142
     {
143 143
         $this->arrayConfiguration[] = [
144
-            'type'        => (string)$definition->getType(),
145
-            'name'        => (string)$definition->getName(),
144
+            'type'        => (string) $definition->getType(),
145
+            'name'        => (string) $definition->getName(),
146 146
             'inheritance' => $definition->isHasInheritance() ? $definition->getInheritance()->getName() : NULL,
147 147
             'options'     => $this->serializeOptions($definition)
148 148
         ];
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
     private function serializeSettings(Settings $settings)
160 160
     {
161 161
         $this->arrayConfiguration[] = [
162
-            'type'    => (string)$settings->getType(),
162
+            'type'    => (string) $settings->getType(),
163 163
             'options' => $this->serializeOptions($settings)
164 164
         ];
165 165
     }
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
 
178 178
         foreach ($section->iterateOptions() as $option) {
179 179
             $options[] = [
180
-                'name'  => (string)$option->getName(),
180
+                'name'  => (string) $option->getName(),
181 181
                 'value' => $option->getValue()
182 182
             ];
183 183
         }
Please login to merge, or discard this patch.
src/LTDBeget/sphinx/configurator/configurationEntities/base/Section.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
     public function __toString() : string
89 89
     {
90 90
         try {
91
-            $string = (string)$this->getType();
91
+            $string = (string) $this->getType();
92 92
         } catch (\Exception $e) {
93 93
             $string = '';
94 94
         }
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
     final protected function addOptionInternal(eOption $name, string $value) : Option
150 150
     {
151 151
         $option      = $this->createOption($name, $value);
152
-        $option_name = (string)$option->getName();
152
+        $option_name = (string) $option->getName();
153 153
 
154 154
         if ($option->isMultiValue()) {
155 155
             $this->options[$option_name] = $this->options[$option_name] ?? [];
Please login to merge, or discard this patch.
src/LTDBeget/sphinx/configurator/configurationEntities/base/Definition.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -180,7 +180,7 @@
 block discarded – undo
180 180
      */
181 181
     private function isValidName($name) : bool
182 182
     {
183
-        return (bool)preg_match("/^[A-Za-z_\d]*$/", $name);
183
+        return (bool) preg_match("/^[A-Za-z_\d]*$/", $name);
184 184
     }
185 185
 
186 186
     /**
Please login to merge, or discard this patch.
src/LTDBeget/sphinx/informer/Informer.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
             $this->makeOptionInfo($section, $optionName);
68 68
         }
69 69
 
70
-        return $this->optionsInfo[(string)$section][(string)$optionName];
70
+        return $this->optionsInfo[(string) $section][(string) $optionName];
71 71
     }
72 72
 
73 73
     /**
@@ -80,8 +80,8 @@  discard block
 block discarded – undo
80 80
      */
81 81
     public function isKnownOption(eSection $section, eOption $optionName)
82 82
     {
83
-        return array_key_exists((string)$section, $this->documentation) &&
84
-        array_key_exists((string)$optionName, $this->documentation[(string)$section]);
83
+        return array_key_exists((string) $section, $this->documentation) &&
84
+        array_key_exists((string) $optionName, $this->documentation[(string) $section]);
85 85
     }
86 86
 
87 87
     /**
@@ -94,8 +94,8 @@  discard block
 block discarded – undo
94 94
      */
95 95
     public function isRemovedOption(eSection $section, eOption $optionName)
96 96
     {
97
-        return array_key_exists((string)$section, $this->removedOptions) &&
98
-        array_key_exists((string)$optionName, $this->removedOptions[(string)$section]);
97
+        return array_key_exists((string) $section, $this->removedOptions) &&
98
+        array_key_exists((string) $optionName, $this->removedOptions[(string) $section]);
99 99
     }
100 100
 
101 101
     /**
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
      */
108 108
     public function isSectionExist(eSection $section) : bool
109 109
     {
110
-        return !$section->is(eSection::COMMON) || !version_compare((string)$this->version, eVersion::V_2_2_1, '<');
110
+        return !$section->is(eSection::COMMON) || !version_compare((string) $this->version, eVersion::V_2_2_1, '<');
111 111
     }
112 112
 
113 113
     /**
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
             throw new InformerRuntimeException("Sphinx of version {$this->version} does't have section {$section}");
127 127
         }
128 128
 
129
-        foreach ($this->documentation[(string)$section] as $optionName => $optionData) {
129
+        foreach ($this->documentation[(string) $section] as $optionName => $optionData) {
130 130
             yield $this->getOptionInfo($section, $this->getOptionName($section, $optionName));
131 131
         }
132 132
     }
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
      */
146 146
     private function getOptionName(eSection $section, string $optionName) : eOption
147 147
     {
148
-        $enumClassName = "LTDBeget\\sphinx\\enums\\options\\e" . ucfirst((string)$section) . 'Option';
148
+        $enumClassName = "LTDBeget\\sphinx\\enums\\options\\e" . ucfirst((string) $section) . 'Option';
149 149
 
150 150
         /**
151 151
          * @var eOption $enumClassName
@@ -179,8 +179,8 @@  discard block
 block discarded – undo
179 179
      */
180 180
     private function isOptionInfoInit(eSection $section, eOption $optionName) : bool
181 181
     {
182
-        return array_key_exists((string)$section, $this->optionsInfo) &&
183
-        array_key_exists((string)$optionName, $this->optionsInfo[(string)$section]);
182
+        return array_key_exists((string) $section, $this->optionsInfo) &&
183
+        array_key_exists((string) $optionName, $this->optionsInfo[(string) $section]);
184 184
     }
185 185
 
186 186
     /**
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
         if (!$this->isKnownOption($section, $optionName)) {
197 197
             throw new InformerRuntimeException("For version {$this->version} {$optionName} is unknown option");
198 198
         }
199
-        $info_data = $this->documentation[(string)$section][(string)$optionName];
199
+        $info_data = $this->documentation[(string) $section][(string) $optionName];
200 200
 
201 201
         $optionInfo = new OptionInfo(
202 202
             $optionName,
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
             $info_data['link']
208 208
         );
209 209
 
210
-        $this->optionsInfo[(string)$section][(string)$optionName] = $optionInfo;
210
+        $this->optionsInfo[(string) $section][(string) $optionName] = $optionInfo;
211 211
     }
212 212
 
213 213
     /**
Please login to merge, or discard this patch.