Passed
Push — develop ( 7bdbd7...e398eb )
by Neill
33:33 queued 15s
created
neon/core/ApplicationWeb.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 		// Register the core apps
166 166
 		$this->registerApps($this->getCoreApps());
167 167
 		// Check neon is installed
168
-		if (! $this->isInstalled() || InstallHelper::isInstallRoute()) {
168
+		if (!$this->isInstalled() || InstallHelper::isInstallRoute()) {
169 169
 			// We can not bootstrap the apps as they can not rely on a database connection
170 170
 			// so conclude the bootstrap process
171 171
 			return;
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 	 */
185 185
 	public function getDocsPath()
186 186
 	{
187
-		return __DIR__ . '/docs';
187
+		return __DIR__.'/docs';
188 188
 	}
189 189
 
190 190
 	/**
Please login to merge, or discard this patch.
neon/core/validators/NumberValidator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
 	public function getClientOptions($model, $attribute)
29 29
 	{
30 30
 		$options = parent::getClientOptions($model, $attribute);
31
-		$options['integerOnly']=$this->integerOnly;
31
+		$options['integerOnly'] = $this->integerOnly;
32 32
 		return $options;
33 33
 	}
34 34
 }
35 35
\ No newline at end of file
Please login to merge, or discard this patch.
neon/core/validators/EmailValidator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
 			'message' => $this->formatMessage($this->message, [
30 30
 				'attribute' => $model->getAttributeLabel($attribute),
31 31
 			]),
32
-			'enableIDN' => (bool)$this->enableIDN,
32
+			'enableIDN' => (bool) $this->enableIDN,
33 33
 		];
34 34
 		if ($this->skipOnEmpty) {
35 35
 			$options['skipOnEmpty'] = 1;
Please login to merge, or discard this patch.
neon/core/validators/Validator.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -19,8 +19,8 @@  discard block
 block discarded – undo
19 19
 		'captcha' => ['class'=>'yii\captcha\CaptchaValidator'],
20 20
 		'compare' => ['class'=>'yii\validators\CompareValidator'],
21 21
 		'date' => ['class'=>'neon\core\validators\DateValidator'],
22
-		'datetime' => ['class' => 'neon\core\validators\DateValidator', 'type' => DateValidator::TYPE_DATETIME,],
23
-		'time' => ['class' => 'yii\validators\DateValidator', 'type' => DateValidator::TYPE_TIME,],
22
+		'datetime' => ['class' => 'neon\core\validators\DateValidator', 'type' => DateValidator::TYPE_DATETIME, ],
23
+		'time' => ['class' => 'yii\validators\DateValidator', 'type' => DateValidator::TYPE_TIME, ],
24 24
 		'default' => ['class'=>'yii\validators\DefaultValueValidator'],
25 25
 		'double' => ['class'=>'neon\core\validators\NumberValidator'],
26 26
 		'each' => ['class'=>'yii\validators\EachValidator'],
@@ -30,13 +30,13 @@  discard block
 block discarded – undo
30 30
 		'filter' => ['class'=>'yii\validators\FilterValidator'],
31 31
 		'image' => ['class'=>'yii\validators\ImageValidator'],
32 32
 		'in' => ['class'=>'yii\validators\RangeValidator'],
33
-		'integer' => ['class' => 'neon\core\validators\NumberValidator', 'integerOnly' => true,],
33
+		'integer' => ['class' => 'neon\core\validators\NumberValidator', 'integerOnly' => true, ],
34 34
 		'match' => ['class'=>'neon\core\validators\RegularExpressionValidator'],
35 35
 		'number' => ['class'=>'neon\core\validators\NumberValidator'],
36 36
 		'required' => ['class'=>'neon\core\validators\RequiredValidator'],
37 37
 		'safe' => ['class'=>'yii\validators\SafeValidator'],
38 38
 		'string' => ['class'=>'neon\core\validators\StringValidator'],
39
-		'trim' => ['class' => 'yii\validators\FilterValidator', 'filter' => 'trim', 'skipOnArray' => true,],
39
+		'trim' => ['class' => 'yii\validators\FilterValidator', 'filter' => 'trim', 'skipOnArray' => true, ],
40 40
 		'unique' => ['class'=>'yii\validators\UniqueValidator'],
41 41
 		'url' => ['class'=>'neon\core\validators\UrlValidator'],
42 42
 		'ip' => ['class'=>'yii\validators\IpValidator'],
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 
64 64
 		if ($type instanceof \Closure || ($model->hasMethod($type) && !isset(static::$builtInValidators[$type]))) {
65 65
 			// method-based validator
66
-			$params['class'] = __NAMESPACE__ . '\InlineValidator';
66
+			$params['class'] = __NAMESPACE__.'\InlineValidator';
67 67
 			$params['method'] = $type;
68 68
 		} else {
69 69
 			if (isset(static::$builtInValidators[$type])) {
Please login to merge, or discard this patch.
neon/core/validators/MockModel.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,9 +17,9 @@
 block discarded – undo
17 17
 	 * @param string $label
18 18
 	 * @return MockModel|null
19 19
 	 */
20
-	public static function get($label='')
20
+	public static function get($label = '')
21 21
 	{
22
-		if (self::$mock===null)
22
+		if (self::$mock === null)
23 23
 			self::$mock = new self();
24 24
 		self::$mock->label = $label;
25 25
 		return self::$mock;
Please login to merge, or discard this patch.
neon/core/grid/DdsGrid.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
 	/**
233 233
 	 * Add the edit and delete DDS object buttons to the grid
234 234
 	 */
235
-	public function addActionButtonColumn($title=false)
235
+	public function addActionButtonColumn($title = false)
236 236
 	{
237 237
 		$buttonCol = $this->addButtonColumn('edit')->setTitle($title);
238 238
 
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
 
247 247
 		if ($this->hasScope('deleted') && $this->isScopeActive('deleted')) {
248 248
 			if ($this->showGridUndeleteButton) {
249
-				$buttonCol->addButton('undelete', '','', 'fa fa-undo', 'btn-default', [
249
+				$buttonCol->addButton('undelete', '', '', 'fa fa-undo', 'btn-default', [
250 250
 					'data-toggle' => 'tooltip',
251 251
 					'title' => 'Restore',
252 252
 					'data-action' => 'actionUndelete'
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
 	 * Load appropriate columns based on DDS details
378 378
 	 * @deprecated - just set the classType - either in the init or the config
379 379
 	 */
380
-	public function ddsLoadGrid($classType, $includeDeleted=false, $pageSize=50)
380
+	public function ddsLoadGrid($classType, $includeDeleted = false, $pageSize = 50)
381 381
 	{
382 382
 		if ($this->title == null)
383 383
 			$this->title = $classType;
Please login to merge, or discard this patch.
neon/core/grid/PhoebeDataProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 			}
62 62
 		}
63 63
 
64
-		$paginator =  [
64
+		$paginator = [
65 65
 			'start' => $pagination->getOffset(),
66 66
 			'length' => $pagination->getLimit(),
67 67
 			'total' => $pagination->totalCount
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 		$form = $this->getForm();
76 76
 
77 77
 		$data = [];
78
-		foreach($results as $object) {
78
+		foreach ($results as $object) {
79 79
 			$form->reset();
80 80
 			$form->loadFromDb($object);
81 81
 			$data[] = array_merge($object, $form->getDataDisplay());
Please login to merge, or discard this patch.
neon/core/grid/column/IColumn.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -14,9 +14,9 @@  discard block
 block discarded – undo
14 14
 
15 15
 interface IColumn
16 16
 {
17
-	public function __construct($config=[]);
17
+	public function __construct($config = []);
18 18
 
19
-	public function renderDataCell($model, $key, $index);  // GRID: called by grid
19
+	public function renderDataCell($model, $key, $index); // GRID: called by grid
20 20
 
21 21
 	/**
22 22
 	 * Renders the contents of the cell (can be overriden by setting self::setDataCellContentFunction)
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 	 * Set whether this column is sortable or not
150 150
 	 * @param bool $bool
151 151
 	 */
152
-	public function setIsSortable($bool=true);
152
+	public function setIsSortable($bool = true);
153 153
 
154 154
 	/**
155 155
 	 * Is the column sortable
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
 	 *
223 223
 	 * @param boolean $bool
224 224
 	 */
225
-	public function setAsIndex($bool=true);
225
+	public function setAsIndex($bool = true);
226 226
 
227 227
 	/**
228 228
 	 * Set the title of the column
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
 	 *
271 271
 	 * @return null|callable
272 272
 	 */
273
-	public function getSearchFunction();  // GRID: called by grid
273
+	public function getSearchFunction(); // GRID: called by grid
274 274
 
275 275
 	/**
276 276
 	 * Set the database field name, this is used to lookup the row data
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
 	 * @param array $linkOptions
315 315
 	 * @return mixed
316 316
 	 */
317
-	public function addRowAction($key, $text, $linkOptions=[]);
317
+	public function addRowAction($key, $text, $linkOptions = []);
318 318
 
319 319
 	public function renderRowActions($model, $key, $index);
320 320
 
Please login to merge, or discard this patch.
neon/core/grid/column/Column.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
 		return $this->_width;
165 165
 	}
166 166
 
167
-	public function __construct($config=[])
167
+	public function __construct($config = [])
168 168
 	{
169 169
 		parent::__construct($config);
170 170
 		if (!isset($config['key'])) {
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
 	/**
253 253
 	 * @inheritDoc
254 254
 	 */
255
-	public function setIsSortable($bool=true)
255
+	public function setIsSortable($bool = true)
256 256
 	{
257 257
 		$this->_sortable = $bool;
258 258
 	}
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
 		return $this->_sortable;
266 266
 	}
267 267
 
268
-	public function setAsIndex($bool=true)
268
+	public function setAsIndex($bool = true)
269 269
 	{
270 270
 		$this->grid->setIndexedByColumn($this->key);
271 271
 		// thi is a bit gnarly but tests for yii Active record data providers specifically
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
 			return $this->_dataCellContentFunction;
334 334
 		}
335 335
 		// check for convention
336
-		$functionName = 'render' . $this->key;
336
+		$functionName = 'render'.$this->key;
337 337
 		if (method_exists($this->grid, $functionName) && $functionName !== 'renderfile') {
338 338
 			return $functionName;
339 339
 		}
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
 	/**
400 400
 	 * @inheritDoc
401 401
 	 */
402
-	public function setDbField($field){
402
+	public function setDbField($field) {
403 403
 		$this->_dbKey = $field;
404 404
 		return $this;
405 405
 	}
@@ -407,8 +407,8 @@  discard block
 block discarded – undo
407 407
 	/**
408 408
 	 * @inheritDoc
409 409
 	 */
410
-	public function getDbField(){
411
-		if ($this->_dbKey === null){
410
+	public function getDbField() {
411
+		if ($this->_dbKey === null) {
412 412
 			// set to be the key
413 413
 			$this->_dbKey = $this->key;
414 414
 		}
@@ -457,9 +457,9 @@  discard block
 block discarded – undo
457 457
 		if ($this->grid->hasSort($this->key)) {
458 458
 			$sort = $this->grid->hasSortDescending() ? ' - ' : ' + ';
459 459
 		}
460
-		$sortParam = $this->grid->hasSortDescending() ? $this->key : '-' . $this->key;
460
+		$sortParam = $this->grid->hasSortDescending() ? $this->key : '-'.$this->key;
461 461
 		$url = neon()->getUrlManager()->createUrl([\Yii::$app->controller->getRoute(), $this->grid->id => ['sort' => $sortParam]]);
462
-		return Html::a($this->getTitle() . $sort, $url, ['data-sort'=>$sortParam]);
462
+		return Html::a($this->getTitle().$sort, $url, ['data-sort'=>$sortParam]);
463 463
 	}
464 464
 
465 465
 	/**
@@ -513,7 +513,7 @@  discard block
 block discarded – undo
513 513
 	public function getFilterField()
514 514
 	{
515 515
 		$field = $this->getBaseFilterField();
516
-		foreach($this->filterFieldConfig as $key => $value)
516
+		foreach ($this->filterFieldConfig as $key => $value)
517 517
 			$field[$key] = $value;
518 518
 		return $field;
519 519
 	}
@@ -529,7 +529,7 @@  discard block
 block discarded – undo
529 529
 
530 530
 	public function setMemberConfig($config)
531 531
 	{
532
-		foreach($config as $key => $value) {
532
+		foreach ($config as $key => $value) {
533 533
 			if (isset($this->member->$key))
534 534
 				$this->member->$key = $value;
535 535
 		}
@@ -539,7 +539,7 @@  discard block
 block discarded – undo
539 539
 	/**
540 540
 	 * @inheritDoc
541 541
 	 */
542
-	public function getCellData($row, $noValue='-')
542
+	public function getCellData($row, $noValue = '-')
543 543
 	{
544 544
 		$data = null;
545 545
 		$key = $this->getKey();
@@ -603,7 +603,7 @@  discard block
 block discarded – undo
603 603
 	 */
604 604
 	public function getFieldName()
605 605
 	{
606
-		return $this->getGrid()->getId() . '[' . $this->key . '][search]';
606
+		return $this->getGrid()->getId().'['.$this->key.'][search]';
607 607
 	}
608 608
 
609 609
 	/**
@@ -677,12 +677,12 @@  discard block
 block discarded – undo
677 677
 		throw new \Exception('Unable to call a valid search function');
678 678
 	}
679 679
 
680
-	protected $_actions =[];
680
+	protected $_actions = [];
681 681
 
682 682
 	/**
683 683
 	 * @inheritDoc
684 684
 	 */
685
-	public function addRowAction($key, $text, $linkOptions=[])
685
+	public function addRowAction($key, $text, $linkOptions = [])
686 686
 	{
687 687
 		$linkOptions['text'] = $text;
688 688
 		$linkOptions['data-action'] = $key;
@@ -708,7 +708,7 @@  discard block
 block discarded – undo
708 708
 		}
709 709
 		$out = '<div class="neonGrid_rowActions">';
710 710
 		$i = 0;
711
-		foreach($this->_actions as $actionKey => $linkOptions) {
711
+		foreach ($this->_actions as $actionKey => $linkOptions) {
712 712
 			if ($i > 0) $out .= ' | ';
713 713
 			if (isset($linkOptions['function'])) {
714 714
 				$func = $linkOptions['function'];
@@ -735,7 +735,7 @@  discard block
 block discarded – undo
735 735
 	 * @param array $arguments of arguments
736 736
 	 * @return mixed
737 737
 	 */
738
-	public function callFunction($function, $arguments=[])
738
+	public function callFunction($function, $arguments = [])
739 739
 	{
740 740
 		if (is_string($function)) {
741 741
 			return call_user_func_array([$this->grid, $function], $arguments);
@@ -760,7 +760,7 @@  discard block
 block discarded – undo
760 760
 			if (count($columnData)) {
761 761
 				$this->member->dataMapFilters = ['uuid' => $columnData];
762 762
 			}
763
-			foreach($models as $model) {
763
+			foreach ($models as $model) {
764 764
 				$this->member->makeMapRequest($this->getCellData($model, null));
765 765
 			}
766 766
 		}
Please login to merge, or discard this patch.