Passed
Push — develop ( 29faa4...07e7ff )
by Neill
33:04 queued 19:04
created
neon/install/controllers/DatabaseController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -106,10 +106,10 @@
 block discarded – undo
106 106
 			// show message saying no config file found
107 107
 			// and provide a button to go back to the config step /install/config
108 108
 			$errorResponse = $this->render('/install/_error.tpl', [
109
-				'message' => 'Could not find the database <strong>' . env('DB_NAME') . '</strong>',
109
+				'message' => 'Could not find the database <strong>'.env('DB_NAME').'</strong>',
110 110
 				'buttons' => [
111 111
 					[
112
-						'label' => 'Try to Create &amp; Install Database <strong>' . env('DB_NAME') . '</strong>',
112
+						'label' => 'Try to Create &amp; Install Database <strong>'.env('DB_NAME').'</strong>',
113 113
 						'url' => Url::toRoute(['/install/database/create-database']),
114 114
 						'iconClass' => 'fa fa-plus',
115 115
 						'type' => 'primary',
Please login to merge, or discard this patch.
neon/install/controllers/ConfigController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
 					InstallHelper::createConfigFile($installer);
54 54
 					return $this->render('_created');
55 55
 				}
56
-				return $this->render('_show', [ 'config' => InstallHelper::createConfigFileContents($installer) ]);
56
+				return $this->render('_show', ['config' => InstallHelper::createConfigFileContents($installer)]);
57 57
 			}
58 58
 		}
59 59
 		return $this->render('index', ['model'=>$installer]);
Please login to merge, or discard this patch.
neon/daedalus/interfaces/IDdsChangeLogManagement.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
 	 * @param \neon\core\helpers\Iterator $iterator  Iterate over the results.
64 64
 	 * @return array  the change log data
65 65
 	 */
66
-	public function listChangeLog($fromDate=null, Iterator $iterator=null);
66
+	public function listChangeLog($fromDate = null, Iterator $iterator = null);
67 67
 
68 68
 	/**
69 69
 	 * List an object's change log, if the object's class has been set up to store changes
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 	 * @return If the object's class is set to have a change log, this will return the
74 74
 	 *   change log for this object. Otherwise it will return a blank array.
75 75
 	 */
76
-	public function listObjectChangeLog($uuid, $fromDate=null, Iterator $iterator=null);
76
+	public function listObjectChangeLog($uuid, $fromDate = null, Iterator $iterator = null);
77 77
 
78 78
 	/**
79 79
 	 * List the history of an object, if the object's class has been set up to store changes.
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 	 * @return If the object's class is set to have a change log, this will return the
85 85
 	 *   history for this object. Otherwise it will return a blank array.
86 86
 	 */
87
-	public function listObjectHistory($uuid, $fromDate=null, Iterator $iterator=null);
87
+	public function listObjectHistory($uuid, $fromDate = null, Iterator $iterator = null);
88 88
 
89 89
 	/**
90 90
 	 * Clear change log to a certain date and optionally for particular class types
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 	 *   then the $classList is the set of log items to be preserved and all
99 99
 	 *   others are cleared.
100 100
 	 */
101
-	public function clearChangeLog($toDate, $classList=[], $clearClassList=true);
101
+	public function clearChangeLog($toDate, $classList = [], $clearClassList = true);
102 102
 
103 103
 	/**
104 104
 	 * Clear an object's change log
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 	 *   This can be empty, if the item was deleted or destroyed for example.
125 125
 	 * @return string  the uuid of the created log entry
126 126
 	 */
127
-	public function addLogEntry($objectUuid, $class, $changeKey, $before=[], $after=[]);
127
+	public function addLogEntry($objectUuid, $class, $changeKey, $before = [], $after = []);
128 128
 
129 129
 	/**
130 130
 	 * Get the log entry
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 	 * @param array $associateObjectUuids  any associated objects that are related to the principal one.
164 164
 	 * @return string  the uuid of the created log entry
165 165
 	 */
166
-	public function addGeneralComment($module, $classType, $comment, $objectUuid=null, array $associateObjectUuids=[]);
166
+	public function addGeneralComment($module, $classType, $comment, $objectUuid = null, array $associateObjectUuids = []);
167 167
 
168 168
 	/**
169 169
 	 * Get an object's value at a particular log point.
Please login to merge, or discard this patch.
neon/daedalus/interfaces/IDdsObjectMapManagement.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 	 * @throw \InvalidArgumentException  if the class type does not exist
72 72
 	 * @throw \RuntimeException  if the map field does not exist
73 73
 	 */
74
-	public function getObjectMap($classType, $filters=[], $mapFields=[], $start=0, $length=1000, $includeDeleted=false);
74
+	public function getObjectMap($classType, $filters = [], $mapFields = [], $start = 0, $length = 1000, $includeDeleted = false);
75 75
 
76 76
 
77 77
 	/**
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 	 * @return string $requestKey  returns a unique request key so the results can be
92 92
 	 *   found after committing.
93 93
 	 */
94
-	public function makeMapLookupRequest($objectUuids, $mapFields=[], $classType=null);
94
+	public function makeMapLookupRequest($objectUuids, $mapFields = [], $classType = null);
95 95
 
96 96
 	/**
97 97
 	 * Get hold of the requested map lookup
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 	 *   found after committing. @see getMapChainLookupResult for the data structure
134 134
 	 *   returned
135 135
 	 */
136
-	public function makeMapChainLookupRequest($objectUuids, $chainMembers=[], $chainMapFields=[], $inReverse=false);
136
+	public function makeMapChainLookupRequest($objectUuids, $chainMembers = [], $chainMapFields = [], $inReverse = false);
137 137
 
138 138
 	/**
139 139
 	 * Commit the map requests stored so that all object chains are resolved
Please login to merge, or discard this patch.
neon/daedalus/interfaces/IDdsAppMigrator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,6 +52,6 @@
 block discarded – undo
52 52
 	 * @param boolean $delete  if set to true, then the migration is deleted
53 53
 	 *   regardless of whether or not any migrations were stored
54 54
 	 */
55
-	public function closeMigrationFile($delete=false);
55
+	public function closeMigrationFile($delete = false);
56 56
 
57 57
 }
58 58
\ No newline at end of file
Please login to merge, or discard this patch.
neon/daedalus/interfaces/IDdsDataTypeManagement.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
 	 *   any deleted datatyes
26 26
 	 * @return an array data types
27 27
 	 */
28
-	public function listDataTypes($includeDeleted=false);
28
+	public function listDataTypes($includeDeleted = false);
29 29
 
30 30
 	/**
31 31
 	 * Create a datatype.
Please login to merge, or discard this patch.
neon/daedalus/interfaces/IDdsQueryHelpers.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,5 +17,5 @@
 block discarded – undo
17 17
 	 *   does and has been deleted.
18 18
 	 * @return mixed
19 19
 	 */
20
-	public function addObjectDeletionChecksOnJoin(\yii\db\Query $query, $tables, $join='innerJoin');
20
+	public function addObjectDeletionChecksOnJoin(\yii\db\Query $query, $tables, $join = 'innerJoin');
21 21
 }
22 22
\ No newline at end of file
Please login to merge, or discard this patch.
neon/daedalus/grid/ChangeLogGrid.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
 		$this->addDateColumn('when')->setWidth("10em");
46 46
 
47 47
 		$this->addButtonColumn('View')
48
-			->addButton('view', ['/daedalus/change-log/view-object' , 'uuid' => '{{object_uuid}}', 'logUuid' => '{{log_uuid}}'], '', 'fa fa-eye', '', ['data-toggle' => 'tooltip', 'title'=>'View Object']);
48
+			->addButton('view', ['/daedalus/change-log/view-object', 'uuid' => '{{object_uuid}}', 'logUuid' => '{{log_uuid}}'], '', 'fa fa-eye', '', ['data-toggle' => 'tooltip', 'title'=>'View Object']);
49 49
 
50 50
 		$this->setPageSize(100);
51 51
 	}
Please login to merge, or discard this patch.
neon/daedalus/services/ddsChangeLog/DdsChangeLogManager.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 	public function hasChangeLog($classType)
47 47
 	{
48 48
 		if ($this->findClass($classType, $class)) {
49
-			return (boolean)$class->hasChangeLog();
49
+			return (boolean) $class->hasChangeLog();
50 50
 		}
51 51
 		return false;
52 52
 	}
@@ -56,9 +56,9 @@  discard block
 block discarded – undo
56 56
 	 */
57 57
 	public function setChangeLog($classType, $to)
58 58
 	{
59
-		$to = (boolean)$to;
59
+		$to = (boolean) $to;
60 60
 		if ($this->findClass($classType, $class)) {
61
-			$hasChangeLog = (boolean)$class->hasChangeLog();
61
+			$hasChangeLog = (boolean) $class->hasChangeLog();
62 62
 			// only change if different to current
63 63
 			if ($hasChangeLog !== $to) {
64 64
 				neon('dds')->IDdsClassManagement->editClass($classType, ['change_log'=>$to]);
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 					'log_uuid' => Hash::uuid64(),
73 73
 					'class_type' => $class['class_type'],
74 74
 					'change_key' => 'COMMENT',
75
-					'description' => sprintf($description, ($to?'ON':'OFF')),
75
+					'description' => sprintf($description, ($to ? 'ON' : 'OFF')),
76 76
 					'who' => $whoUid,
77 77
 					'when' => date('Y-m-d H:i:s'),
78 78
 				])->execute();
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 	/**
85 85
 	 * @inheritdoc
86 86
 	 */
87
-	public function listChangeLog($fromDate=null, Iterator $iterator=null)
87
+	public function listChangeLog($fromDate = null, Iterator $iterator = null)
88 88
 	{
89 89
 		return $this->getChangeLog($fromDate, $iterator, null);
90 90
 	}
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 	/**
93 93
 	 * @inheritdoc
94 94
 	 */
95
-	public function listObjectChangeLog($uuid, $fromDate=null, Iterator $iterator=null)
95
+	public function listObjectChangeLog($uuid, $fromDate = null, Iterator $iterator = null)
96 96
 	{
97 97
 		return $this->getChangeLog($fromDate, $iterator, $uuid);
98 98
 	}
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 	/**
101 101
 	 * @inheritdoc
102 102
 	 */
103
-	public function listObjectHistory($uuid, $fromDate=null, Iterator $iterator=null)
103
+	public function listObjectHistory($uuid, $fromDate = null, Iterator $iterator = null)
104 104
 	{
105 105
 		$changeLog = $this->getChangeLog($fromDate, $iterator, $uuid);
106 106
 		return $this->convertChangeLogToHistory($uuid, $changeLog);
@@ -109,10 +109,10 @@  discard block
 block discarded – undo
109 109
 	/**
110 110
 	 * @inheritdoc
111 111
 	 */
112
-	public function clearChangeLog($toDate, $classList=[], $clearClassList=true)
112
+	public function clearChangeLog($toDate, $classList = [], $clearClassList = true)
113 113
 	{
114 114
 		$deleteConditions = '[[when]] <= :toDate';
115
-		$bindValues = [ ':toDate'=>$toDate ];
115
+		$bindValues = [':toDate'=>$toDate];
116 116
 		if (!empty($classList)) {
117 117
 			$clearClause = ($clearClassList ? '' : '!');
118 118
 			$deleteConditions .= " AND $clearClause([[class_type]]=:".implode(" OR [[class_type]]=:", $classList).")";
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 	public function clearObjectChangeLog($uuid, $toDate)
133 133
 	{
134 134
 		$deleteConditions = '[[when]] <= :toDate AND [[object_uuid]] = :uuid';
135
-		$bindValues = [ ':toDate'=>$toDate, ':uuid' => $uuid ];
135
+		$bindValues = [':toDate'=>$toDate, ':uuid' => $uuid];
136 136
 		neon()->db->createCommand()
137 137
 			->delete('{{dds_change_log}}', $deleteConditions)
138 138
 			->bindValues($bindValues)
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 	/**
143 143
 	 * @inheritdoc
144 144
 	 */
145
-	public function addLogEntry($objectUuid, $class, $changeKey, $before=[], $after=[])
145
+	public function addLogEntry($objectUuid, $class, $changeKey, $before = [], $after = [])
146 146
 	{
147 147
 		if (!in_array($changeKey, $this->changeLogEntryActions))
148 148
 			throw new \InvalidArgumentException('Invalid change key in addLogEntry. Allowed values are ['.implode(', ', $this->changeLogEntryActions));
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
 	/**
250 250
 	 * @inheritdoc
251 251
 	 */
252
-	public function addGeneralComment($module, $classType, $comment, $objectUuid=null, array $associateObjectUuids=[])
252
+	public function addGeneralComment($module, $classType, $comment, $objectUuid = null, array $associateObjectUuids = [])
253 253
 	{
254 254
 		// check we can make a comment
255 255
 		if (empty($comment))
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
 	 * @throws \RuntimeException  if the restore point could not be reached
349 349
 	 *   using a sensible number of change log points (<=1000).
350 350
 	 */
351
-	private function getChangeLog($fromDate, $iterator, $objectUuid, $logId=null)
351
+	private function getChangeLog($fromDate, $iterator, $objectUuid, $logId = null)
352 352
 	{
353 353
 		$fromDate = ($fromDate === null ? date('Y-m-d 00:00:00') : $fromDate);
354 354
 		$iterator = ($iterator === null ? new Iterator : $iterator);
@@ -398,9 +398,9 @@  discard block
 block discarded – undo
398 398
 	 */
399 399
 	private function convertFromDb(&$entry)
400 400
 	{
401
-		$entry['before'] = json_decode($entry['before'],true);
402
-		$entry['after'] = json_decode($entry['after'],true);
403
-		$entry['associated_objects'] = json_decode($entry['associated_objects'],true);
401
+		$entry['before'] = json_decode($entry['before'], true);
402
+		$entry['after'] = json_decode($entry['after'], true);
403
+		$entry['associated_objects'] = json_decode($entry['associated_objects'], true);
404 404
 	}
405 405
 
406 406
 	/**
@@ -412,7 +412,7 @@  discard block
 block discarded – undo
412 412
 	 * @param array &$currentObject  the value of the current object
413 413
 	 * @return array  a history log
414 414
 	 */
415
-	private function convertChangeLogToHistory($uuid, $log, &$currentObject=[])
415
+	private function convertChangeLogToHistory($uuid, $log, &$currentObject = [])
416 416
 	{
417 417
 		// get the current object and work backwards from there to get history
418 418
 		// first see if we can the object and if not check that the last action
@@ -549,7 +549,7 @@  discard block
 block discarded – undo
549 549
 		}
550 550
 		$before = $beforeChangedFields;
551 551
 		$after = $afterChangedFields;
552
-		return count($after)>0;
552
+		return count($after) > 0;
553 553
 	}
554 554
 
555 555
 	/**
@@ -608,7 +608,7 @@  discard block
 block discarded – undo
608 608
 	 */
609 609
 	private function isEquivalentBoolean($before, $after)
610 610
 	{
611
-		return (is_bool($before) && (bool)($after) == $before);
611
+		return (is_bool($before) && (bool) ($after) == $before);
612 612
 	}
613 613
 
614 614
 	/**
@@ -621,8 +621,8 @@  discard block
 block discarded – undo
621 621
 	 */
622 622
 	private function isEquivalentNull($before, $after)
623 623
 	{
624
-		if ($before === null || $before === '' || (is_array($before) && count($before)==0))
625
-			return ($after === null || $after === '' || (is_array($after) && count($after)==0));
624
+		if ($before === null || $before === '' || (is_array($before) && count($before) == 0))
625
+			return ($after === null || $after === '' || (is_array($after) && count($after) == 0));
626 626
 		return false;
627 627
 	}
628 628
 
Please login to merge, or discard this patch.