@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | . '->%1.raw) echo $_label' |
| 65 | 65 | . ($node->tokenizer->isNext() ? '->addAttributes($attributes)' : '->addAttributes($attributes)'), |
| 66 | 66 | $name, |
| 67 | - $words ? ('getLabelPart(' . implode(', ', array_map([$writer, 'formatWord'], $words)) . ')') : 'getLabel()' |
|
| 67 | + $words ? ('getLabelPart('.implode(', ', array_map([$writer, 'formatWord'], $words)).')') : 'getLabel()' |
|
| 68 | 68 | ); |
| 69 | 69 | } |
| 70 | 70 | |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | public function macroLabelEnd(MacroNode $node, PhpWriter $writer) |
| 81 | 81 | { |
| 82 | 82 | if ($node->content != NULL) { |
| 83 | - $node->openingCode = rtrim($node->openingCode, '?> ') . '->startTag() ?>'; |
|
| 83 | + $node->openingCode = rtrim($node->openingCode, '?> ').'->startTag() ?>'; |
|
| 84 | 84 | return $writer->write('if ($_label) echo $_label->endTag()'); |
| 85 | 85 | } |
| 86 | 86 | } |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | } else { |
| 114 | - $methodName = 'get' . ucfirst($name); |
|
| 114 | + $methodName = 'get'.ucfirst($name); |
|
| 115 | 115 | |
| 116 | 116 | if (method_exists($entity, $methodName) && $value = call_user_func([$entity, $methodName])) { |
| 117 | 117 | if (is_object($value) && $this->isEntity($value)) { |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | } |
| 142 | 142 | |
| 143 | 143 | } else { |
| 144 | - $methodName = 'get' . ucfirst($name); |
|
| 144 | + $methodName = 'get'.ucfirst($name); |
|
| 145 | 145 | |
| 146 | 146 | if (method_exists($entity, $methodName) && $value = call_user_func([$entity, $methodName])) { |
| 147 | 147 | if (is_object($value) && $this->isEntity($value)) { |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | private function getMetadata($entity) |
| 172 | 172 | { |
| 173 | 173 | if (!$this->isEntity($entity)) { |
| 174 | - throw new Exceptions\InvalidArgumentException('Expected object, ' . gettype($entity) . ' given.'); |
|
| 174 | + throw new Exceptions\InvalidArgumentException('Expected object, '.gettype($entity).' given.'); |
|
| 175 | 175 | } |
| 176 | 176 | |
| 177 | 177 | return $this->entityManager->getClassMetadata(get_class($entity)); |
@@ -203,7 +203,7 @@ discard block |
||
| 203 | 203 | return [$formElement]; |
| 204 | 204 | |
| 205 | 205 | } else { |
| 206 | - throw new Exceptions\InvalidArgumentException('Expected Nette\Forms\Container or Nette\Forms\IControl, but ' . get_class($formElement) . ' given'); |
|
| 206 | + throw new Exceptions\InvalidArgumentException('Expected Nette\Forms\Container or Nette\Forms\IControl, but '.get_class($formElement).' given'); |
|
| 207 | 207 | } |
| 208 | 208 | } |
| 209 | 209 | } |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | */ |
| 34 | 34 | protected function addExtension(string $name, string $class) |
| 35 | 35 | { |
| 36 | - Nette\Forms\Container::extensionMethod($name, function (Nette\Forms\Container $container, $name, $label = NULL) use ($class) { |
|
| 36 | + Nette\Forms\Container::extensionMethod($name, function(Nette\Forms\Container $container, $name, $label = NULL) use ($class) { |
|
| 37 | 37 | return $container[$name] = new $class($label); |
| 38 | 38 | }); |
| 39 | 39 | } |
@@ -57,7 +57,7 @@ |
||
| 57 | 57 | */ |
| 58 | 58 | public static function register(Nette\Configurator $config, string $extensionName = 'extendedForms') |
| 59 | 59 | { |
| 60 | - $config->onCompile[] = function (Nette\Configurator $config, Nette\DI\Compiler $compiler) use ($extensionName) { |
|
| 60 | + $config->onCompile[] = function(Nette\Configurator $config, Nette\DI\Compiler $compiler) use ($extensionName) { |
|
| 61 | 61 | $compiler->addExtension($extensionName, new FormsExtension()); |
| 62 | 62 | }; |
| 63 | 63 | } |