Completed
Pull Request — master (#579)
by Mateusz
07:37
created
code/control/DNDeploymentDispatcher.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -74,10 +74,10 @@  discard block
 block discarded – undo
74 74
 		// Map authorisation rules to selected transitions.
75 75
 		$machine->getDispatcher()->addListener(
76 76
 			'finite.test_transition',
77
-			function (Finite\Event\TransitionEvent $e) use ($project) {
77
+			function(Finite\Event\TransitionEvent $e) use ($project) {
78 78
 				$code = null;
79 79
 
80
-				switch ($e->getTransition()->getName()) {
80
+				switch($e->getTransition()->getName()) {
81 81
 				case 'approve':
82 82
 					$code = Dispatcher::ALLOW_DNDEPLOYMENT_APPROVE;
83 83
 					break;
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 					break;
87 87
 				}
88 88
 
89
-				if (!$code || !$project->allowed($code)) {
89
+				if(!$code || !$project->allowed($code)) {
90 90
 					$e->reject();
91 91
 				}
92 92
 			}
Please login to merge, or discard this patch.
code/model/jobs/DNDeployment.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -81,12 +81,12 @@  discard block
 block discarded – undo
81 81
 			'transitions' => [
82 82
 				'approve'  => ['from' => ['New'], 'to' => 'Approved'],
83 83
 				'queue'  => ['from' => ['Approved'], 'to' => 'Queued'],
84
-				'invalidate'  => ['from' => ['New','Approved'], 'to' => 'Invalid'],
84
+				'invalidate'  => ['from' => ['New', 'Approved'], 'to' => 'Invalid'],
85 85
 				'deploy'  => ['from' => ['Queued'], 'to' => 'Deploying'],
86
-				'abort'  => ['from' => ['Queued', 'Deploying','Aborting'], 'to' => 'Aborting'],
86
+				'abort'  => ['from' => ['Queued', 'Deploying', 'Aborting'], 'to' => 'Aborting'],
87 87
 				'complete' => ['from' => ['Deploying'], 'to' => 'Completed'],
88 88
 				'fail'  => [
89
-					'from' => ['New','Approved','Queued','Invalid','Deploying','Aborting'],
89
+					'from' => ['New', 'Approved', 'Queued', 'Invalid', 'Deploying', 'Aborting'],
90 90
 					'to' => 'Failed'
91 91
 				],
92 92
 			],
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 	}
125 125
 
126 126
 	public function LogLink() {
127
-		return $this->Link() . '/log';
127
+		return $this->Link().'/log';
128 128
 	}
129 129
 
130 130
 	public function canView($member = null) {
@@ -243,12 +243,12 @@  discard block
 block discarded – undo
243 243
 	 */
244 244
 	public function getFullDeployMessages() {
245 245
 		$strategy = $this->getDeploymentStrategy();
246
-		if ($strategy->getActionCode()!=='full') return null;
246
+		if($strategy->getActionCode() !== 'full') return null;
247 247
 
248 248
 		$changes = $strategy->getChangesModificationNeeded();
249 249
 		$messages = [];
250
-		foreach ($changes as $change => $details) {
251
-			if ($change==='Code version') continue;
250
+		foreach($changes as $change => $details) {
251
+			if($change === 'Code version') continue;
252 252
 
253 253
 			$messages[] = [
254 254
 				'Flag' => sprintf(
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
 			];
260 260
 		}
261 261
 
262
-		if (empty($messages)) {
262
+		if(empty($messages)) {
263 263
 			$messages[] = [
264 264
 				'Flag' => '',
265 265
 				'Text' => '<i>Environment changes have been made.</i>'
@@ -308,7 +308,7 @@  discard block
 block discarded – undo
308 308
 
309 309
 			// if there is a compare URL, and a description or a change (something actually changed)
310 310
 			// then show the URL. Otherwise don't show anything, as there is no comparison to be made.
311
-			if ($changed || $description) {
311
+			if($changed || $description) {
312 312
 				$compareUrl = isset($change['compareUrl']) ? $change['compareUrl'] : '';
313 313
 			}
314 314
 
Please login to merge, or discard this patch.