@@ -38,8 +38,7 @@ |
||
| 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, |
@@ -1,9 +1,9 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @author: Viskov Sergey |
|
| 4 | - * @date: 3/18/16 |
|
| 5 | - * @time: 5:33 PM |
|
| 6 | - */ |
|
| 3 | + * @author: Viskov Sergey |
|
| 4 | + * @date: 3/18/16 |
|
| 5 | + * @time: 5:33 PM |
|
| 6 | + */ |
|
| 7 | 7 | |
| 8 | 8 | namespace LTDBeget\sphinx\configurator\configurationEntities\sections; |
| 9 | 9 | |
@@ -1,9 +1,9 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @author: Viskov Sergey |
|
| 4 | - * @date: 3/18/16 |
|
| 5 | - * @time: 5:32 PM |
|
| 6 | - */ |
|
| 3 | + * @author: Viskov Sergey |
|
| 4 | + * @date: 3/18/16 |
|
| 5 | + * @time: 5:32 PM |
|
| 6 | + */ |
|
| 7 | 7 | |
| 8 | 8 | namespace LTDBeget\sphinx\configurator\configurationEntities\sections; |
| 9 | 9 | |
@@ -1,9 +1,9 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @author: Viskov Sergey |
|
| 4 | - * @date: 3/18/16 |
|
| 5 | - * @time: 5:32 PM |
|
| 6 | - */ |
|
| 3 | + * @author: Viskov Sergey |
|
| 4 | + * @date: 3/18/16 |
|
| 5 | + * @time: 5:32 PM |
|
| 6 | + */ |
|
| 7 | 7 | |
| 8 | 8 | namespace LTDBeget\sphinx\configurator\configurationEntities\sections; |
| 9 | 9 | |
@@ -1,9 +1,9 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @author: Viskov Sergey |
|
| 4 | - * @date: 3/18/16 |
|
| 5 | - * @time: 5:32 PM |
|
| 6 | - */ |
|
| 3 | + * @author: Viskov Sergey |
|
| 4 | + * @date: 3/18/16 |
|
| 5 | + * @time: 5:32 PM |
|
| 6 | + */ |
|
| 7 | 7 | |
| 8 | 8 | namespace LTDBeget\sphinx\configurator\configurationEntities\sections; |
| 9 | 9 | |
@@ -1,9 +1,9 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @author: Viskov Sergey |
|
| 4 | - * @date: 3/18/16 |
|
| 5 | - * @time: 5:43 PM |
|
| 6 | - */ |
|
| 3 | + * @author: Viskov Sergey |
|
| 4 | + * @date: 3/18/16 |
|
| 5 | + * @time: 5:43 PM |
|
| 6 | + */ |
|
| 7 | 7 | |
| 8 | 8 | namespace LTDBeget\sphinx\configurator\configurationEntities\sections; |
| 9 | 9 | |
@@ -1,9 +1,9 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @author: Viskov Sergey |
|
| 4 | - * @date: 3/2/16 |
|
| 5 | - * @time: 8:04 PM |
|
| 6 | - */ |
|
| 3 | + * @author: Viskov Sergey |
|
| 4 | + * @date: 3/2/16 |
|
| 5 | + * @time: 8:04 PM |
|
| 6 | + */ |
|
| 7 | 7 | |
| 8 | 8 | namespace LTDBeget\sphinx\configurator\configurationEntities; |
| 9 | 9 | |
@@ -1,9 +1,9 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @author: Viskov Sergey |
|
| 4 | - * @date: 3/18/16 |
|
| 5 | - * @time: 5:11 PM |
|
| 6 | - */ |
|
| 3 | + * @author: Viskov Sergey |
|
| 4 | + * @date: 3/18/16 |
|
| 5 | + * @time: 5:11 PM |
|
| 6 | + */ |
|
| 7 | 7 | |
| 8 | 8 | namespace LTDBeget\sphinx\configurator\configurationEntities\base; |
| 9 | 9 | |
@@ -58,7 +58,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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; |
@@ -1,9 +1,9 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @author: Viskov Sergey |
|
| 4 | - * @date: 19.03.16 |
|
| 5 | - * @time: 0:04 |
|
| 6 | - */ |
|
| 3 | + * @author: Viskov Sergey |
|
| 4 | + * @date: 19.03.16 |
|
| 5 | + * @time: 0:04 |
|
| 6 | + */ |
|
| 7 | 7 | |
| 8 | 8 | namespace LTDBeget\sphinx\configurator\configurationEntities\base; |
| 9 | 9 | |
@@ -35,11 +35,11 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | |