@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | * @date 15.12.15 |
13 | 13 | */ |
14 | 14 | |
15 | -declare(strict_types = 1); |
|
15 | +declare(strict_types=1); |
|
16 | 16 | |
17 | 17 | namespace IPub\FormPhone\Controls; |
18 | 18 | |
@@ -321,10 +321,10 @@ discard block |
||
321 | 321 | */ |
322 | 322 | public function loadHttpData() |
323 | 323 | { |
324 | - $country = $this->getHttpData(Forms\Form::DATA_LINE, '[' . self::FIELD_COUNTRY . ']'); |
|
324 | + $country = $this->getHttpData(Forms\Form::DATA_LINE, '['.self::FIELD_COUNTRY.']'); |
|
325 | 325 | $this->country = ($country === '' || $country === NULL) ? NULL : (string) $country; |
326 | 326 | |
327 | - $number = $this->getHttpData(Forms\Form::DATA_LINE, '[' . self::FIELD_NUMBER . ']'); |
|
327 | + $number = $this->getHttpData(Forms\Form::DATA_LINE, '['.self::FIELD_NUMBER.']'); |
|
328 | 328 | $this->number = ($number === '' || $number === NULL) ? NULL : (string) $number; |
329 | 329 | } |
330 | 330 | |
@@ -334,7 +334,7 @@ discard block |
||
334 | 334 | public function getControl() |
335 | 335 | { |
336 | 336 | $el = Utils\Html::el(); |
337 | - $el->addHtml($this->getControlPart(self::FIELD_COUNTRY) . $this->getControlPart(self::FIELD_NUMBER)); |
|
337 | + $el->addHtml($this->getControlPart(self::FIELD_COUNTRY).$this->getControlPart(self::FIELD_NUMBER)); |
|
338 | 338 | |
339 | 339 | return $el; |
340 | 340 | } |
@@ -373,7 +373,7 @@ discard block |
||
373 | 373 | ); |
374 | 374 | |
375 | 375 | $result[$row] = Utils\Html::el('option'); |
376 | - $result[$row]->setText('+' . $this->phoneUtils->getCountryCodeForCountry($row) . ' (' . $countryName . ')'); |
|
376 | + $result[$row]->setText('+'.$this->phoneUtils->getCountryCodeForCountry($row).' ('.$countryName.')'); |
|
377 | 377 | $result[$row]->data('mask', preg_replace('/[0-9]/', '9', $this->phoneUtils->getExampleNationalNumber($row))); |
378 | 378 | $result[$row]->addAttributes([ |
379 | 379 | 'value' => $row, |
@@ -390,12 +390,12 @@ discard block |
||
390 | 390 | ); |
391 | 391 | |
392 | 392 | $control->addAttributes([ |
393 | - 'name' => $name . '[' . self::FIELD_COUNTRY . ']', |
|
394 | - 'id' => $this->getHtmlId() . '-' . self::FIELD_COUNTRY, |
|
393 | + 'name' => $name.'['.self::FIELD_COUNTRY.']', |
|
394 | + 'id' => $this->getHtmlId().'-'.self::FIELD_COUNTRY, |
|
395 | 395 | ]); |
396 | 396 | $control->data('ipub-forms-phone', ''); |
397 | 397 | $control->data('settings', json_encode([ |
398 | - 'field' => $name . '[' . self::FIELD_NUMBER . ']' |
|
398 | + 'field' => $name.'['.self::FIELD_NUMBER.']' |
|
399 | 399 | ]) |
400 | 400 | ); |
401 | 401 | |
@@ -415,8 +415,8 @@ discard block |
||
415 | 415 | $control = Utils\Html::el('input'); |
416 | 416 | |
417 | 417 | $control->addAttributes([ |
418 | - 'name' => $name . '[' . self::FIELD_NUMBER . ']', |
|
419 | - 'id' => $this->getHtmlId() . '-' . self::FIELD_NUMBER, |
|
418 | + 'name' => $name.'['.self::FIELD_NUMBER.']', |
|
419 | + 'id' => $this->getHtmlId().'-'.self::FIELD_NUMBER, |
|
420 | 420 | 'value' => $this->number, |
421 | 421 | 'type' => 'text', |
422 | 422 | 'class' => $prototype->getAttribute('class'), |
@@ -445,7 +445,7 @@ discard block |
||
445 | 445 | public function getLabel($caption = NULL) |
446 | 446 | { |
447 | 447 | $label = parent::getLabel($caption); |
448 | - $label->for = $this->getHtmlId() . '-' . self::FIELD_NUMBER; |
|
448 | + $label->for = $this->getHtmlId().'-'.self::FIELD_NUMBER; |
|
449 | 449 | |
450 | 450 | return $label; |
451 | 451 | } |
@@ -490,7 +490,7 @@ discard block |
||
490 | 490 | // Phone type have to be upper-cased |
491 | 491 | $type = strtoupper($type); |
492 | 492 | |
493 | - if (defined('\IPub\Phone\Phone::TYPE_' . $type)) { |
|
493 | + if (defined('\IPub\Phone\Phone::TYPE_'.$type)) { |
|
494 | 494 | return $type; |
495 | 495 | |
496 | 496 | } else { |