Completed
Pull Request — master (#757)
by Stig
03:54
created
code/model/DNEnvironment.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -670,7 +670,7 @@
 block discarded – undo
670 670
 	/**
671 671
 	 * A list of past deployments.
672 672
 	 * @param string $orderBy - the name of a DB column to sort in descending order
673
-	 * @return \ArrayList
673
+	 * @return DataList
674 674
 	 */
675 675
 	public function DeployHistory($orderBy = '') {
676 676
 		$sort = [];
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -685,7 +685,7 @@  discard block
 block discarded – undo
685 685
 			->where('"SHA" IS NOT NULL')
686 686
 			->sort($sort);
687 687
 
688
-		if($this->IsNewDeployEnabled()){
688
+		if ($this->IsNewDeployEnabled()) {
689 689
 			$deployments->filter('State', [
690 690
 				DNDeployment::STATE_COMPLETED,
691 691
 				DNDeployment::STATE_FAILED,
@@ -858,7 +858,7 @@  discard block
 block discarded – undo
858 858
 				->buildPermissionField('ArchiveUploaderGroups', 'ArchiveUploaders', $groups, $members)
859 859
 				->setTitle('Who can upload?')
860 860
 				->setDescription(
861
-					'Users who can upload archives linked to this environment into Deploynaut.<br />' .
861
+					'Users who can upload archives linked to this environment into Deploynaut.<br />'.
862 862
 					'Linking them to an environment allows limiting download permissions (see below).'
863 863
 				),
864 864
 
@@ -905,7 +905,7 @@  discard block
 block discarded – undo
905 905
 		// Add actions
906 906
 		$action = new FormAction('check', 'Check Connection');
907 907
 		$action->setUseButtonTag(true);
908
-		$dataURL = Director::absoluteBaseURL() . 'naut/api/' . $this->Project()->Name . '/' . $this->Name . '/ping';
908
+		$dataURL = Director::absoluteBaseURL().'naut/api/'.$this->Project()->Name.'/'.$this->Name.'/ping';
909 909
 		$action->setAttribute('data-url', $dataURL);
910 910
 		$fields->insertBefore($action, 'Name');
911 911
 
@@ -918,8 +918,8 @@  discard block
 block discarded – undo
918 918
 	 */
919 919
 	public function onBeforeWrite() {
920 920
 		parent::onBeforeWrite();
921
-		if ($this->Name && $this->Name . '.rb' != $this->Filename) {
922
-			$this->Filename = $this->Name . '.rb';
921
+		if ($this->Name && $this->Name.'.rb' != $this->Filename) {
922
+			$this->Filename = $this->Name.'.rb';
923 923
 		}
924 924
 		$this->checkEnvironmentPath();
925 925
 		$this->writeConfigFile();
@@ -998,7 +998,7 @@  discard block
 block discarded – undo
998 998
 		if (!$this->Filename) {
999 999
 			return '';
1000 1000
 		}
1001
-		return $this->DNData()->getEnvironmentDir() . '/' . $this->Project()->Name . '/' . $this->Filename;
1001
+		return $this->DNData()->getEnvironmentDir().'/'.$this->Project()->Name.'/'.$this->Filename;
1002 1002
 	}
1003 1003
 
1004 1004
 	/**
@@ -1156,7 +1156,7 @@  discard block
 block discarded – undo
1156 1156
 			&& $this->Filename
1157 1157
 			&& $this->CreateEnvConfig
1158 1158
 		) {
1159
-			$templateFile = $this->config()->template_file ?: BASE_PATH . '/deploynaut/environment.template';
1159
+			$templateFile = $this->config()->template_file ?: BASE_PATH.'/deploynaut/environment.template';
1160 1160
 			file_put_contents($this->getConfigFilename(), file_get_contents($templateFile));
1161 1161
 		} else if ($this->envFileExists() && $this->DeployConfig) {
1162 1162
 			file_put_contents($this->getConfigFilename(), $this->DeployConfig);
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -685,7 +685,7 @@
 block discarded – undo
685 685
 			->where('"SHA" IS NOT NULL')
686 686
 			->sort($sort);
687 687
 
688
-		if($this->IsNewDeployEnabled()){
688
+		if($this->IsNewDeployEnabled()) {
689 689
 			$deployments->filter('State', [
690 690
 				DNDeployment::STATE_COMPLETED,
691 691
 				DNDeployment::STATE_FAILED,
Please login to merge, or discard this patch.