Test Setup Failed
Push — master ( 3044dd...9e3d62 )
by Adam
07:01
created
src/IPub/FormPhone/Controls/Phone.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -321,10 +321,10 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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'),
@@ -443,7 +443,7 @@  discard block
 block discarded – undo
443 443
 	public function getLabel($caption = NULL)
444 444
 	{
445 445
 		$label = parent::getLabel($caption);
446
-		$label->for = $this->getHtmlId() . '-' . self::FIELD_NUMBER;
446
+		$label->for = $this->getHtmlId().'-'.self::FIELD_NUMBER;
447 447
 
448 448
 		return $label;
449 449
 	}
@@ -488,7 +488,7 @@  discard block
 block discarded – undo
488 488
 		// Phone type have to be upper-cased
489 489
 		$type = strtoupper($type);
490 490
 
491
-		if (defined('\IPub\Phone\Phone::TYPE_' . $type)) {
491
+		if (defined('\IPub\Phone\Phone::TYPE_'.$type)) {
492 492
 			return $type;
493 493
 
494 494
 		} else {
Please login to merge, or discard this patch.