Passed
Push — develop ( 802f80...ff58ad )
by steve
13:55 queued 12s
created
neon/core/form/fields/Field.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
 	 * @param array $config
195 195
 	 * @throws InvalidNameFormat
196 196
 	 */
197
-	public function __construct($name=[], array $config=[])
197
+	public function __construct($name = [], array $config = [])
198 198
 	{
199 199
 		// The $name field can also be a configuration array
200 200
 		if (is_array($name)) {
@@ -519,7 +519,7 @@  discard block
 block discarded – undo
519 519
 	 */
520 520
 	public function getLabelHtml()
521 521
 	{
522
-		return $this->getLabel() ? Html::activeLabel($this->getForm(), $this->getName(), $this->labelAttributes ) : '';
522
+		return $this->getLabel() ? Html::activeLabel($this->getForm(), $this->getName(), $this->labelAttributes) : '';
523 523
 	}
524 524
 
525 525
 	/**
@@ -601,7 +601,7 @@  discard block
 block discarded – undo
601 601
 	public function validate()
602 602
 	{
603 603
 		$validators = $this->getValidators();
604
-		if (count($validators)==0)
604
+		if (count($validators) == 0)
605 605
 			return true;
606 606
 
607 607
 		$isEmpty = empty($this->getValue());
@@ -630,10 +630,10 @@  discard block
 block discarded – undo
630 630
 					$validator->validateAttribute($form, $attribute);
631 631
 				} catch (UnknownPropertyException $e) {
632 632
 					throw new UnknownPropertyException(
633
-						'You are using a validator ' . get_class($validator) . ' that has a when clause or needs to use validateAttribute. '
633
+						'You are using a validator '.get_class($validator).' that has a when clause or needs to use validateAttribute. '
634 634
 						. 'This requires you to have <br><br>'
635
-						. 'public function get' . ucfirst($attribute) . "<br>{ <br>&nbsp;&nbsp;return \$this->getField(&quot;$attribute&quot;)->getValue()); <br>}"
636
-						. '<br><br>on the form. You may also need the equivalent set' . ucfirst($attribute) . ' method. <br>Error was ' . $e->getMessage());
635
+						. 'public function get'.ucfirst($attribute)."<br>{ <br>&nbsp;&nbsp;return \$this->getField(&quot;$attribute&quot;)->getValue()); <br>}"
636
+						. '<br><br>on the form. You may also need the equivalent set'.ucfirst($attribute).' method. <br>Error was '.$e->getMessage());
637 637
 				}
638 638
 			}
639 639
 		}
@@ -761,7 +761,7 @@  discard block
 block discarded – undo
761 761
 	 * Get a displayable representation of the fields value to be output to html
762 762
 	 * @return string
763 763
 	 */
764
-	public function getValueDisplay($context='')
764
+	public function getValueDisplay($context = '')
765 765
 	{
766 766
 		return Html::encode($this->getValue());
767 767
 	}
@@ -781,7 +781,7 @@  discard block
 block discarded – undo
781 781
 	/**
782 782
 	 * @inheritdoc
783 783
 	 */
784
-	public function processAsFilter(IQuery $query, $searchData=null)
784
+	public function processAsFilter(IQuery $query, $searchData = null)
785 785
 	{
786 786
 		$searchData = ($searchData === null) ? $this->getValue() : $searchData;
787 787
 		// Note: we can not use empty here
@@ -840,7 +840,7 @@  discard block
 block discarded – undo
840 840
 	 * @param array|null $ddsMembers if not specified it will look up the members of the classType
841 841
 	 * @deprecated
842 842
 	 */
843
-	public function ddsSaveDefinition($classType=null, $ddsMembers=null)
843
+	public function ddsSaveDefinition($classType = null, $ddsMembers = null)
844 844
 	{
845 845
 		Deprecated::ddsSaveDefinitionField($this, $classType, $ddsMembers);
846 846
 	}
Please login to merge, or discard this patch.