Passed
Push — develop ( 319bd8...330c7a )
by Neill
16:41 queued 15s
created
neon/core/form/fields/Color.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 	/**
34 34
 	 * @inheritdoc
35 35
 	 */
36
-	public function processAsFilter(IQuery $query, $searchData=null)
36
+	public function processAsFilter(IQuery $query, $searchData = null)
37 37
 	{
38 38
 		$searchData = ($searchData === null) ? $this->getValue() : $searchData;
39 39
 		if (!empty($searchData)) {
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 	public function getComponentDetails()
60 60
 	{
61 61
 		return [
62
-			'name' => 'Colour',  'icon' => 'fa fa-paint-brush', 'group' => 'Text', 'order' => 170,
62
+			'name' => 'Colour', 'icon' => 'fa fa-paint-brush', 'group' => 'Text', 'order' => 170,
63 63
 		];
64 64
 	}
65 65
 }
66 66
\ No newline at end of file
Please login to merge, or discard this patch.
neon/core/form/fields/Submit.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
 	public function setValue($value)
54 54
 	{
55 55
 		if ($value === 'true' || $value === true)
56
-			$this->getForm()->submittedButton=$this->getName();
56
+			$this->getForm()->submittedButton = $this->getName();
57 57
 		return $this;
58 58
 	}
59 59
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,8 +52,9 @@
 block discarded – undo
52 52
 	 */
53 53
 	public function setValue($value)
54 54
 	{
55
-		if ($value === 'true' || $value === true)
56
-			$this->getForm()->submittedButton=$this->getName();
55
+		if ($value === 'true' || $value === true) {
56
+					$this->getForm()->submittedButton=$this->getName();
57
+		}
57 58
 		return $this;
58 59
 	}
59 60
 
Please login to merge, or discard this patch.
neon/core/form/fields/Wysiwyg.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -70,18 +70,18 @@  discard block
 block discarded – undo
70 70
 				'toolbar' =>  [
71 71
 					[
72 72
 						'name' => 'paragraph',
73
-						'items' => [ 'Bold', 'Italic', 'Underline', 'Link', 'Unlink', 'EmojiPanel', 'Source' ]
73
+						'items' => ['Bold', 'Italic', 'Underline', 'Link', 'Unlink', 'EmojiPanel', 'Source']
74 74
 					]
75 75
 				]
76 76
 			],
77 77
 			'default' => [
78 78
 				'toolbar' =>  [
79
-					[ 'name' => 'paragraph', 'items' => [ 'Format', 'Bold', 'Italic', 'Underline', '-', 'Superscript', 'Subscript', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock','-', 'NumberedList', 'BulletedList', 'Outdent', 'Indent', 'Blockquote'] ],
80
-					[ 'name' => 'links', 'items' => [ 'Link', 'Unlink', 'Anchor', '-', 'EmojiPanel' ] ],
81
-					[ 'name' => 'insert', 'items' => [
82
-						'Image', ($this->useMediaBrowser ? 'Fireflyimage' : 'SimpleImageUpload'), '-', 'Table', 'SpecialChar' ] ],
83
-					[ 'name' => 'document', 'items' => ['Maximize' ] ],
84
-					[ 'name' => 'source', 'items' => [ 'RemoveFormat', '-', 'Source' ] ]
79
+					['name' => 'paragraph', 'items' => ['Format', 'Bold', 'Italic', 'Underline', '-', 'Superscript', 'Subscript', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock', '-', 'NumberedList', 'BulletedList', 'Outdent', 'Indent', 'Blockquote']],
80
+					['name' => 'links', 'items' => ['Link', 'Unlink', 'Anchor', '-', 'EmojiPanel']],
81
+					['name' => 'insert', 'items' => [
82
+						'Image', ($this->useMediaBrowser ? 'Fireflyimage' : 'SimpleImageUpload'), '-', 'Table', 'SpecialChar']],
83
+					['name' => 'document', 'items' => ['Maximize']],
84
+					['name' => 'source', 'items' => ['RemoveFormat', '-', 'Source']]
85 85
 				],
86 86
 				'extraPlugins' => [($this->useMediaBrowser ? 'fireflyimage' : 'simpleImageUpload')],
87 87
 				'extraAllowedContent'=>'img[srcset,sizes,loading]'
@@ -118,9 +118,9 @@  discard block
 block discarded – undo
118 118
 	 * Return the purified value but allow tags to be as normal
119 119
 	 * otherwise will lose ability to edit wysiwyg fields properly
120 120
 	 */
121
-	public function getValueDisplay($context='')
121
+	public function getValueDisplay($context = '')
122 122
 	{
123
-		if ($context==='grid') {
123
+		if ($context === 'grid') {
124 124
 			return strip_tags(Str::truncate($this->getValue(), 200, '...', null, true));
125 125
 		}
126 126
 		return $this->getValue();
@@ -131,6 +131,6 @@  discard block
 block discarded – undo
131 131
 	 */
132 132
 	public function getComponentDetails()
133 133
 	{
134
-		return ['label' => 'Rich Text', 'group' => 'Formatted Text',  'icon' => 'fa fa-font', 'order' => 220];
134
+		return ['label' => 'Rich Text', 'group' => 'Formatted Text', 'icon' => 'fa fa-font', 'order' => 220];
135 135
 	}
136 136
 }
Please login to merge, or discard this patch.
neon/core/form/fields/el/SwitchInput.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
 	public function getComponentDetails()
41 41
 	{
42 42
 		return [
43
-			'label' => 'El Switch',  'icon' => 'fa fa-toggle-on', 'group' => 'Choice', 'order'=>465,
43
+			'label' => 'El Switch', 'icon' => 'fa fa-toggle-on', 'group' => 'Choice', 'order'=>465,
44 44
 		];
45 45
 	}
46 46
 
Please login to merge, or discard this patch.
neon/core/form/fields/el/DateTimeRange.php 1 patch
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -66,10 +66,12 @@  discard block
 block discarded – undo
66 66
 		if ($searchData !== '') {
67 67
 			$dateFrom = Arr::get($searchData, 'from');
68 68
 			$dateTo   = Arr::get($searchData, 'to');
69
-			if ($dateFrom)
70
-				$query->where($this->getDataKey(), '>=', $dateFrom);
71
-			if ($dateTo)
72
-				$query->where($this->getDataKey(), '<=', $dateTo);
69
+			if ($dateFrom) {
70
+							$query->where($this->getDataKey(), '>=', $dateFrom);
71
+			}
72
+			if ($dateTo) {
73
+							$query->where($this->getDataKey(), '<=', $dateTo);
74
+			}
73 75
 		}
74 76
 	}
75 77
 
@@ -87,8 +89,9 @@  discard block
 block discarded – undo
87 89
 	public function getValue()
88 90
 	{
89 91
 		$value = parent::getValue();
90
-		if (is_array($value))
91
-			return $value;
92
+		if (is_array($value)) {
93
+					return $value;
94
+		}
92 95
 		return ['from' => '', 'to' => ''];
93 96
 	}
94 97
 
Please login to merge, or discard this patch.
neon/core/form/fields/SelectDynamic.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 	 * Any filters you want to apply to a data map selection.
64 64
 	 * @var array  field=>value
65 65
 	 */
66
-	public $dataMapFilters=[];
66
+	public $dataMapFilters = [];
67 67
 
68 68
 	/**
69 69
 	 * Any fields you want to return in a data map selection if not the default.
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 	 *   string (otherwise with a space) and prefix postfix arguments will be
75 75
 	 *   applied to it.
76 76
 	 */
77
-	public $dataMapFields=[];
77
+	public $dataMapFields = [];
78 78
 
79 79
 	/**
80 80
 	 * @inheritdoc
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 	 * @return array
134 134
 	 * @throws \Exception
135 135
 	 */
136
-	public function getMapObjects($query=null, $start=0, $length=100)
136
+	public function getMapObjects($query = null, $start = 0, $length = 100)
137 137
 	{
138 138
 		$provider = $this->getProviderService();
139 139
 		$format = ['prefix'=>'', 'concat'=>' ', 'postfix' => ''];
@@ -165,12 +165,12 @@  discard block
 block discarded – undo
165 165
 	/**
166 166
 	 * @inheritdoc
167 167
 	 */
168
-	public function getValueDisplay($context='')
168
+	public function getValueDisplay($context = '')
169 169
 	{
170 170
 		$items = $this->getItems();
171 171
 		if (is_array($this->value)) {
172 172
 			$values = array_intersect_key($items, array_flip($this->value));
173
-			return implode(', ',$values);
173
+			return implode(', ', $values);
174 174
 		} else if (isset($items[$this->value])) {
175 175
 			return $items[$this->value];
176 176
 		}
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
 	/**
206 206
 	 * @inheritdoc
207 207
 	 */
208
-	public function processAsFilter(IQuery $query, $searchData=null)
208
+	public function processAsFilter(IQuery $query, $searchData = null)
209 209
 	{
210 210
 		$searchData = ($searchData === null) ? $this->getValue() : $searchData;
211 211
 		if ($searchData !== '') {
Please login to merge, or discard this patch.
neon/core/form/fields/HtmlRaw.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
  */
16 16
 class HtmlRaw extends TextArea
17 17
 {
18
-	const TEXT_TRUNCATE_LENGTH=250;
18
+	const TEXT_TRUNCATE_LENGTH = 250;
19 19
 
20 20
 	/**
21 21
 	 * Set some allowable tags for single text fields
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 	/**
34 34
 	 * @inheritdoc
35 35
 	 */
36
-	public function getValueDisplay($context='')
36
+	public function getValueDisplay($context = '')
37 37
 	{
38 38
 		$text = parent::getValueDisplay();
39 39
 		if (strlen($text) > self::TEXT_TRUNCATE_LENGTH)
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 	/**
55 55
 	 * @inheritdoc
56 56
 	 */
57
-	public function processAsFilter(IQuery $query, $searchData=null)
57
+	public function processAsFilter(IQuery $query, $searchData = null)
58 58
 	{
59 59
 		$searchData = ($searchData === null) ? $this->getValue() : $searchData;
60 60
 		if ($searchData !== '') {
Please login to merge, or discard this patch.
neon/user/form/fields/UserSelectorMultiple.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,8 +21,8 @@
 block discarded – undo
21 21
 	public $dataMapKey = 'users';
22 22
 
23 23
 		/**
24
-	 * @inheritdoc
25
-	 */
24
+		 * @inheritdoc
25
+		 */
26 26
 	public function getComponentDetails()
27 27
 	{
28 28
 		return [
Please login to merge, or discard this patch.
neon/cms/form/fields/ImageCompare.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -14,21 +14,21 @@  discard block
 block discarded – undo
14 14
 
15 15
 class ImageCompare extends ImageMultiple
16 16
 {
17
-    /**
17
+	/**
18 18
 	 * @inheritdoc
19 19
 	 */
20
-    public $ddsDataType = 'json';
20
+	public $ddsDataType = 'json';
21 21
 
22
-    /**
22
+	/**
23 23
 	 * @inheritdoc
24 24
 	 */
25 25
 	public function registerScripts($view)
26 26
 	{
27
-        $view->registerAssetBundle(\neon\cms\assets\CmsFormAsset::class);
27
+		$view->registerAssetBundle(\neon\cms\assets\CmsFormAsset::class);
28 28
 		$view->registerAssetBundle(\neon\firefly\assets\BrowserAsset::class);
29
-    }
29
+	}
30 30
 
31
-    /**
31
+	/**
32 32
 	 * @inheritdoc
33 33
 	 */
34 34
 	public function getFilterField()
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 		return ['class' => 'neon\\core\\form\\fields\\Text'];
37 37
 	}
38 38
 
39
-    /**
39
+	/**
40 40
 	 * @inheritdoc
41 41
 	 */
42 42
 	public function getComponentDetails()
@@ -44,9 +44,9 @@  discard block
 block discarded – undo
44 44
 		return [
45 45
 			'icon' => 'fa fa-image', 'group' => 'Media', 'order' => 612, 'label' => 'Image Compare'
46 46
 		];
47
-    }
47
+	}
48 48
 
49
-    public function getValueDisplay($context='')
49
+	public function getValueDisplay($context='')
50 50
 	{
51 51
 		$json = $this->getValue();
52 52
 		if (empty($json))
Please login to merge, or discard this patch.