@@ -75,6 +75,7 @@ discard block |
||
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | /** |
| 78 | + * @param string $code |
|
| 78 | 79 | */ |
| 79 | 80 | public function setActionCode($code) { |
| 80 | 81 | $this->actionCode = $code; |
@@ -89,6 +90,7 @@ discard block |
||
| 89 | 90 | |
| 90 | 91 | /** |
| 91 | 92 | * @param int |
| 93 | + * @param string $seconds |
|
| 92 | 94 | */ |
| 93 | 95 | public function setEstimatedTime($seconds) { |
| 94 | 96 | $this->estimatedTime = $seconds; |
@@ -110,8 +110,12 @@ |
||
| 110 | 110 | // Normalise "empty" values into dashes so comparisons are done properly. |
| 111 | 111 | // This means there is no diference between an empty string and a null |
| 112 | 112 | // but "0" is considered to be non-empty. |
| 113 | - if(empty($from) && !strlen($from)) $from = '-'; |
|
| 114 | - if(empty($to) && !strlen($to)) $to = '-'; |
|
| 113 | + if(empty($from) && !strlen($from)) { |
|
| 114 | + $from = '-'; |
|
| 115 | + } |
|
| 116 | + if(empty($to) && !strlen($to)) { |
|
| 117 | + $to = '-'; |
|
| 118 | + } |
|
| 115 | 119 | |
| 116 | 120 | return $this->changes[$title] = array( |
| 117 | 121 | 'from' => $from, |
@@ -110,8 +110,8 @@ discard block |
||
| 110 | 110 | // Normalise "empty" values into dashes so comparisons are done properly. |
| 111 | 111 | // This means there is no diference between an empty string and a null |
| 112 | 112 | // but "0" is considered to be non-empty. |
| 113 | - if(empty($from) && !strlen($from)) $from = '-'; |
|
| 114 | - if(empty($to) && !strlen($to)) $to = '-'; |
|
| 113 | + if (empty($from) && !strlen($from)) $from = '-'; |
|
| 114 | + if (empty($to) && !strlen($to)) $to = '-'; |
|
| 115 | 115 | |
| 116 | 116 | return $this->changes[$title] = array( |
| 117 | 117 | 'from' => $from, |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | */ |
| 171 | 171 | public function getChange($key) { |
| 172 | 172 | $changes = $this->getChanges(); |
| 173 | - if(array_key_exists($key, $changes)) { |
|
| 173 | + if (array_key_exists($key, $changes)) { |
|
| 174 | 174 | return new ArrayData($changes[$key]); |
| 175 | 175 | } |
| 176 | 176 | return null; |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | * @return string|null |
| 190 | 190 | */ |
| 191 | 191 | public function getOption($option) { |
| 192 | - if(!empty($this->options[$option])) { |
|
| 192 | + if (!empty($this->options[$option])) { |
|
| 193 | 193 | return $this->options[$option]; |
| 194 | 194 | } |
| 195 | 195 | } |
@@ -230,7 +230,7 @@ discard block |
||
| 230 | 230 | DeploymentStrategy::WARNING_CODE => 1, |
| 231 | 231 | DeploymentStrategy::ERROR_CODE => 2 |
| 232 | 232 | ]; |
| 233 | - if($map[$current] < $map[$code]) { |
|
| 233 | + if ($map[$current] < $map[$code]) { |
|
| 234 | 234 | $this->setValidationCode($code); |
| 235 | 235 | } |
| 236 | 236 | } |
@@ -259,7 +259,7 @@ discard block |
||
| 259 | 259 | ); |
| 260 | 260 | |
| 261 | 261 | $output = array(); |
| 262 | - foreach($fields as $field) { |
|
| 262 | + foreach ($fields as $field) { |
|
| 263 | 263 | $output[$field] = $this->$field; |
| 264 | 264 | } |
| 265 | 265 | return $output; |
@@ -300,8 +300,8 @@ discard block |
||
| 300 | 300 | 'messages' |
| 301 | 301 | ); |
| 302 | 302 | |
| 303 | - foreach($fields as $field) { |
|
| 304 | - if(!empty($data[$field])) { |
|
| 303 | + foreach ($fields as $field) { |
|
| 304 | + if (!empty($data[$field])) { |
|
| 305 | 305 | $this->$field = $data[$field]; |
| 306 | 306 | } |
| 307 | 307 | } |
@@ -954,7 +954,7 @@ |
||
| 954 | 954 | to other environments, alongside the "Who can restore" permission.<br> |
| 955 | 955 | Should include all users with upload permissions, otherwise they can't download |
| 956 | 956 | their own uploads. |
| 957 | -PHP |
|
| 957 | +php |
|
| 958 | 958 | ), |
| 959 | 959 | |
| 960 | 960 | // The Main.PipelineApprovers |
@@ -578,7 +578,7 @@ |
||
| 578 | 578 | * Dear people of the future: If you are looking to optimize this, simply create a CurrentBuildSHA(), which can be |
| 579 | 579 | * a lot faster. I presume you came here because of the Project display template, which only needs a SHA. |
| 580 | 580 | * |
| 581 | - * @return false|DNDeployment |
|
| 581 | + * @return DNDeployment |
|
| 582 | 582 | */ |
| 583 | 583 | public function CurrentBuild() { |
| 584 | 584 | // The DeployHistory function is far too slow to use for this |
@@ -774,7 +774,7 @@ discard block |
||
| 774 | 774 | ->buildPermissionField('ArchiveUploaderGroups', 'ArchiveUploaders', $groups, $members) |
| 775 | 775 | ->setTitle('Who can upload?') |
| 776 | 776 | ->setDescription( |
| 777 | - 'Users who can upload archives linked to this environment into Deploynaut.<br />' . |
|
| 777 | + 'Users who can upload archives linked to this environment into Deploynaut.<br />'. |
|
| 778 | 778 | 'Linking them to an environment allows limiting download permissions (see below).' |
| 779 | 779 | ), |
| 780 | 780 | |
@@ -821,7 +821,7 @@ discard block |
||
| 821 | 821 | // Add actions |
| 822 | 822 | $action = new FormAction('check', 'Check Connection'); |
| 823 | 823 | $action->setUseButtonTag(true); |
| 824 | - $dataURL = Director::absoluteBaseURL() . 'naut/api/' . $this->Project()->Name . '/' . $this->Name . '/ping'; |
|
| 824 | + $dataURL = Director::absoluteBaseURL().'naut/api/'.$this->Project()->Name.'/'.$this->Name.'/ping'; |
|
| 825 | 825 | $action->setAttribute('data-url', $dataURL); |
| 826 | 826 | $fields->insertBefore($action, 'Name'); |
| 827 | 827 | |
@@ -834,8 +834,8 @@ discard block |
||
| 834 | 834 | */ |
| 835 | 835 | public function onBeforeWrite() { |
| 836 | 836 | parent::onBeforeWrite(); |
| 837 | - if ($this->Name && $this->Name . '.rb' != $this->Filename) { |
|
| 838 | - $this->Filename = $this->Name . '.rb'; |
|
| 837 | + if ($this->Name && $this->Name.'.rb' != $this->Filename) { |
|
| 838 | + $this->Filename = $this->Name.'.rb'; |
|
| 839 | 839 | } |
| 840 | 840 | $this->checkEnvironmentPath(); |
| 841 | 841 | $this->writeConfigFile(); |
@@ -885,7 +885,7 @@ discard block |
||
| 885 | 885 | if (!$this->Filename) { |
| 886 | 886 | return ''; |
| 887 | 887 | } |
| 888 | - return $this->DNData()->getEnvironmentDir() . '/' . $this->Project()->Name . '/' . $this->Filename; |
|
| 888 | + return $this->DNData()->getEnvironmentDir().'/'.$this->Project()->Name.'/'.$this->Filename; |
|
| 889 | 889 | } |
| 890 | 890 | |
| 891 | 891 | /** |
@@ -1039,7 +1039,7 @@ discard block |
||
| 1039 | 1039 | && $this->Filename |
| 1040 | 1040 | && $this->CreateEnvConfig |
| 1041 | 1041 | ) { |
| 1042 | - $templateFile = $this->config()->template_file ?: BASE_PATH . '/deploynaut/environment.template'; |
|
| 1042 | + $templateFile = $this->config()->template_file ?: BASE_PATH.'/deploynaut/environment.template'; |
|
| 1043 | 1043 | file_put_contents($this->getConfigFilename(), file_get_contents($templateFile)); |
| 1044 | 1044 | } else if ($this->envFileExists() && $this->DeployConfig) { |
| 1045 | 1045 | file_put_contents($this->getConfigFilename(), $this->DeployConfig); |
@@ -961,7 +961,7 @@ |
||
| 961 | 961 | * @param array $data |
| 962 | 962 | * @param Form $form |
| 963 | 963 | * |
| 964 | - * @return bool|HTMLText|SS_HTTPResponse |
|
| 964 | + * @return SS_HTTPResponse|null |
|
| 965 | 965 | */ |
| 966 | 966 | public function doCreateEnvironment($data, Form $form) { |
| 967 | 967 | $this->setCurrentActionType(self::ACTION_ENVIRONMENTS); |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | Requirements::javascript('deploynaut/javascript/material.js'); |
| 179 | 179 | |
| 180 | 180 | // Load the buildable dependencies only if not loaded centrally. |
| 181 | - if (!is_dir(BASE_PATH . DIRECTORY_SEPARATOR . 'static')) { |
|
| 181 | + if (!is_dir(BASE_PATH.DIRECTORY_SEPARATOR.'static')) { |
|
| 182 | 182 | if (\Director::isDev()) { |
| 183 | 183 | \Requirements::javascript('deploynaut/static/bundle-debug.js'); |
| 184 | 184 | } else { |
@@ -242,7 +242,7 @@ discard block |
||
| 242 | 242 | } |
| 243 | 243 | |
| 244 | 244 | // Block framework jquery |
| 245 | - Requirements::block(FRAMEWORK_DIR . '/thirdparty/jquery/jquery.js'); |
|
| 245 | + Requirements::block(FRAMEWORK_DIR.'/thirdparty/jquery/jquery.js'); |
|
| 246 | 246 | |
| 247 | 247 | self::include_requirements(); |
| 248 | 248 | } |
@@ -261,7 +261,7 @@ discard block |
||
| 261 | 261 | * @return \SS_HTTPResponse |
| 262 | 262 | */ |
| 263 | 263 | public function index(SS_HTTPRequest $request) { |
| 264 | - return $this->redirect($this->Link() . 'projects/'); |
|
| 264 | + return $this->redirect($this->Link().'projects/'); |
|
| 265 | 265 | } |
| 266 | 266 | |
| 267 | 267 | /** |
@@ -389,7 +389,7 @@ discard block |
||
| 389 | 389 | // Framing an environment as a "group of people with download access" |
| 390 | 390 | // makes more sense to the user here, while still allowing us to enforce |
| 391 | 391 | // environment specific restrictions on downloading the file later on. |
| 392 | - $envs = $project->DNEnvironmentList()->filterByCallback(function ($item) { |
|
| 392 | + $envs = $project->DNEnvironmentList()->filterByCallback(function($item) { |
|
| 393 | 393 | return $item->canUploadArchive(); |
| 394 | 394 | }); |
| 395 | 395 | $envsMap = []; |
@@ -421,7 +421,7 @@ discard block |
||
| 421 | 421 | $form->disableSecurityToken(); |
| 422 | 422 | $form->addExtraClass('fields-wide'); |
| 423 | 423 | // Tweak the action so it plays well with our fake URL structure. |
| 424 | - $form->setFormAction($project->Link() . '/UploadSnapshotForm'); |
|
| 424 | + $form->setFormAction($project->Link().'/UploadSnapshotForm'); |
|
| 425 | 425 | |
| 426 | 426 | return $form; |
| 427 | 427 | } |
@@ -442,7 +442,7 @@ discard block |
||
| 442 | 442 | } |
| 443 | 443 | |
| 444 | 444 | $validEnvs = $project->DNEnvironmentList() |
| 445 | - ->filterByCallback(function ($item) { |
|
| 445 | + ->filterByCallback(function($item) { |
|
| 446 | 446 | return $item->canUploadArchive(); |
| 447 | 447 | }); |
| 448 | 448 | |
@@ -471,9 +471,9 @@ discard block |
||
| 471 | 471 | $dataArchive->DataTransfers()->add($dataTransfer); |
| 472 | 472 | $form->saveInto($dataArchive); |
| 473 | 473 | $dataArchive->write(); |
| 474 | - $workingDir = TEMP_FOLDER . DIRECTORY_SEPARATOR . 'deploynaut-transfer-' . $dataTransfer->ID; |
|
| 474 | + $workingDir = TEMP_FOLDER.DIRECTORY_SEPARATOR.'deploynaut-transfer-'.$dataTransfer->ID; |
|
| 475 | 475 | |
| 476 | - $cleanupFn = function () use ($workingDir, $dataTransfer, $dataArchive) { |
|
| 476 | + $cleanupFn = function() use ($workingDir, $dataTransfer, $dataArchive) { |
|
| 477 | 477 | $process = new AbortableProcess(sprintf('rm -rf %s', escapeshellarg($workingDir))); |
| 478 | 478 | $process->setTimeout(120); |
| 479 | 479 | $process->run(); |
@@ -547,7 +547,7 @@ discard block |
||
| 547 | 547 | // Framing an environment as a "group of people with download access" |
| 548 | 548 | // makes more sense to the user here, while still allowing us to enforce |
| 549 | 549 | // environment specific restrictions on downloading the file later on. |
| 550 | - $envs = $project->DNEnvironmentList()->filterByCallback(function ($item) { |
|
| 550 | + $envs = $project->DNEnvironmentList()->filterByCallback(function($item) { |
|
| 551 | 551 | return $item->canUploadArchive(); |
| 552 | 552 | }); |
| 553 | 553 | $envsMap = []; |
@@ -573,7 +573,7 @@ discard block |
||
| 573 | 573 | $form->disableSecurityToken(); |
| 574 | 574 | $form->addExtraClass('fields-wide'); |
| 575 | 575 | // Tweak the action so it plays well with our fake URL structure. |
| 576 | - $form->setFormAction($project->Link() . '/PostSnapshotForm'); |
|
| 576 | + $form->setFormAction($project->Link().'/PostSnapshotForm'); |
|
| 577 | 577 | |
| 578 | 578 | return $form; |
| 579 | 579 | } |
@@ -592,7 +592,7 @@ discard block |
||
| 592 | 592 | return $this->project404Response(); |
| 593 | 593 | } |
| 594 | 594 | |
| 595 | - $validEnvs = $project->DNEnvironmentList()->filterByCallback(function ($item) { |
|
| 595 | + $validEnvs = $project->DNEnvironmentList()->filterByCallback(function($item) { |
|
| 596 | 596 | return $item->canUploadArchive(); |
| 597 | 597 | }); |
| 598 | 598 | |
@@ -712,7 +712,7 @@ discard block |
||
| 712 | 712 | $branchName = $request->getVar('name'); |
| 713 | 713 | $branch = $project->DNBranchList()->byName($branchName); |
| 714 | 714 | if (!$branch) { |
| 715 | - return new SS_HTTPResponse("Branch '" . Convert::raw2xml($branchName) . "' not found.", 404); |
|
| 715 | + return new SS_HTTPResponse("Branch '".Convert::raw2xml($branchName)."' not found.", 404); |
|
| 716 | 716 | } |
| 717 | 717 | |
| 718 | 718 | return $this->render([ |
@@ -849,7 +849,7 @@ discard block |
||
| 849 | 849 | ); |
| 850 | 850 | |
| 851 | 851 | // Tweak the action so it plays well with our fake URL structure. |
| 852 | - $form->setFormAction($project->Link() . '/CreateEnvironmentForm'); |
|
| 852 | + $form->setFormAction($project->Link().'/CreateEnvironmentForm'); |
|
| 853 | 853 | |
| 854 | 854 | return $form; |
| 855 | 855 | } |
@@ -882,7 +882,7 @@ discard block |
||
| 882 | 882 | $job->write(); |
| 883 | 883 | $job->start(); |
| 884 | 884 | |
| 885 | - return $this->redirect($project->Link('createenv') . '/' . $job->ID); |
|
| 885 | + return $this->redirect($project->Link('createenv').'/'.$job->ID); |
|
| 886 | 886 | } |
| 887 | 887 | |
| 888 | 888 | /** |
@@ -1080,7 +1080,7 @@ discard block |
||
| 1080 | 1080 | return $body; |
| 1081 | 1081 | } |
| 1082 | 1082 | |
| 1083 | - $form->setFormAction($this->getRequest()->getURL() . '/DeployForm'); |
|
| 1083 | + $form->setFormAction($this->getRequest()->getURL().'/DeployForm'); |
|
| 1084 | 1084 | return $form; |
| 1085 | 1085 | } |
| 1086 | 1086 | |
@@ -1346,7 +1346,7 @@ discard block |
||
| 1346 | 1346 | $deployment->getMachine()->apply(DNDeployment::TR_QUEUE); |
| 1347 | 1347 | |
| 1348 | 1348 | return json_encode([ |
| 1349 | - 'url' => Director::absoluteBaseURL() . $deployment->Link() |
|
| 1349 | + 'url' => Director::absoluteBaseURL().$deployment->Link() |
|
| 1350 | 1350 | ], JSON_PRETTY_PRINT); |
| 1351 | 1351 | } |
| 1352 | 1352 | |
@@ -1469,7 +1469,7 @@ discard block |
||
| 1469 | 1469 | */ |
| 1470 | 1470 | public function getDataTransferForm(SS_HTTPRequest $request = null) { |
| 1471 | 1471 | // Performs canView permission check by limiting visible projects |
| 1472 | - $envs = $this->getCurrentProject()->DNEnvironmentList()->filterByCallback(function ($item) { |
|
| 1472 | + $envs = $this->getCurrentProject()->DNEnvironmentList()->filterByCallback(function($item) { |
|
| 1473 | 1473 | return $item->canBackup(); |
| 1474 | 1474 | }); |
| 1475 | 1475 | |
@@ -1491,7 +1491,7 @@ discard block |
||
| 1491 | 1491 | ->addExtraClass('btn') |
| 1492 | 1492 | ) |
| 1493 | 1493 | ); |
| 1494 | - $form->setFormAction($this->getRequest()->getURL() . '/DataTransferForm'); |
|
| 1494 | + $form->setFormAction($this->getRequest()->getURL().'/DataTransferForm'); |
|
| 1495 | 1495 | |
| 1496 | 1496 | return $form; |
| 1497 | 1497 | } |
@@ -1517,12 +1517,12 @@ discard block |
||
| 1517 | 1517 | // Validate direction. |
| 1518 | 1518 | if ($data['Direction'] == 'get') { |
| 1519 | 1519 | $validEnvs = $this->getCurrentProject()->DNEnvironmentList() |
| 1520 | - ->filterByCallback(function ($item) { |
|
| 1520 | + ->filterByCallback(function($item) { |
|
| 1521 | 1521 | return $item->canBackup(); |
| 1522 | 1522 | }); |
| 1523 | 1523 | } else if ($data['Direction'] == 'push') { |
| 1524 | 1524 | $validEnvs = $this->getCurrentProject()->DNEnvironmentList() |
| 1525 | - ->filterByCallback(function ($item) { |
|
| 1525 | + ->filterByCallback(function($item) { |
|
| 1526 | 1526 | return $item->canRestore(); |
| 1527 | 1527 | }); |
| 1528 | 1528 | } else { |
@@ -1653,7 +1653,7 @@ discard block |
||
| 1653 | 1653 | |
| 1654 | 1654 | // Performs canView permission check by limiting visible projects |
| 1655 | 1655 | $project = $this->getCurrentProject(); |
| 1656 | - $envs = $project->DNEnvironmentList()->filterByCallback(function ($item) { |
|
| 1656 | + $envs = $project->DNEnvironmentList()->filterByCallback(function($item) { |
|
| 1657 | 1657 | return $item->canRestore(); |
| 1658 | 1658 | }); |
| 1659 | 1659 | |
@@ -1692,7 +1692,7 @@ discard block |
||
| 1692 | 1692 | ->addExtraClass('btn') |
| 1693 | 1693 | ) |
| 1694 | 1694 | ); |
| 1695 | - $form->setFormAction($project->Link() . '/DataTransferRestoreForm'); |
|
| 1695 | + $form->setFormAction($project->Link().'/DataTransferRestoreForm'); |
|
| 1696 | 1696 | |
| 1697 | 1697 | return $form; |
| 1698 | 1698 | } |
@@ -1790,7 +1790,7 @@ discard block |
||
| 1790 | 1790 | ->addExtraClass('btn') |
| 1791 | 1791 | ) |
| 1792 | 1792 | ); |
| 1793 | - $form->setFormAction($project->Link() . '/DeleteForm'); |
|
| 1793 | + $form->setFormAction($project->Link().'/DeleteForm'); |
|
| 1794 | 1794 | |
| 1795 | 1795 | return $form; |
| 1796 | 1796 | } |
@@ -1896,7 +1896,7 @@ discard block |
||
| 1896 | 1896 | ->addExtraClass('btn') |
| 1897 | 1897 | ) |
| 1898 | 1898 | ); |
| 1899 | - $form->setFormAction($this->getCurrentProject()->Link() . '/MoveForm'); |
|
| 1899 | + $form->setFormAction($this->getCurrentProject()->Link().'/MoveForm'); |
|
| 1900 | 1900 | |
| 1901 | 1901 | return $form; |
| 1902 | 1902 | } |
@@ -2157,7 +2157,7 @@ discard block |
||
| 2157 | 2157 | $transfers = DNDataTransfer::get() |
| 2158 | 2158 | ->filter('EnvironmentID', $environments) |
| 2159 | 2159 | ->filterByCallback( |
| 2160 | - function ($record) { |
|
| 2160 | + function($record) { |
|
| 2161 | 2161 | return |
| 2162 | 2162 | $record->Environment()->canRestore() || // Ensure member can perform an action on the transfers env |
| 2163 | 2163 | $record->Environment()->canBackup() || |
@@ -2282,7 +2282,7 @@ discard block |
||
| 2282 | 2282 | */ |
| 2283 | 2283 | protected function project404Response() { |
| 2284 | 2284 | return new SS_HTTPResponse( |
| 2285 | - "Project '" . Convert::raw2xml($this->getRequest()->param('Project')) . "' not found.", |
|
| 2285 | + "Project '".Convert::raw2xml($this->getRequest()->param('Project'))."' not found.", |
|
| 2286 | 2286 | 404 |
| 2287 | 2287 | ); |
| 2288 | 2288 | } |
@@ -2292,7 +2292,7 @@ discard block |
||
| 2292 | 2292 | */ |
| 2293 | 2293 | protected function environment404Response() { |
| 2294 | 2294 | $envName = Convert::raw2xml($this->getRequest()->param('Environment')); |
| 2295 | - return new SS_HTTPResponse("Environment '" . $envName . "' not found.", 404); |
|
| 2295 | + return new SS_HTTPResponse("Environment '".$envName."' not found.", 404); |
|
| 2296 | 2296 | } |
| 2297 | 2297 | |
| 2298 | 2298 | /** |
@@ -7,7 +7,7 @@ |
||
| 7 | 7 | public static $cache = array(); |
| 8 | 8 | |
| 9 | 9 | public static function getIncludingBranches($commit) { |
| 10 | - $cacheKey = 'getIncludingBranches-' . $commit->getRepository()->getPath() . '-' . $commit->gethash(); |
|
| 10 | + $cacheKey = 'getIncludingBranches-'.$commit->getRepository()->getPath().'-'.$commit->gethash(); |
|
| 11 | 11 | if(!isset(self::$cache[$cacheKey])) { |
| 12 | 12 | self::$cache[$cacheKey] = $commit->getIncludingBranches(); |
| 13 | 13 | } |
@@ -55,7 +55,7 @@ |
||
| 55 | 55 | |
| 56 | 56 | public function Link() { |
| 57 | 57 | // Use a get-var for branch so that it can handle unsafe chars better |
| 58 | - return Controller::join_links($this->project->Link(), 'branch?name=' . urlencode($this->Name())); |
|
| 58 | + return Controller::join_links($this->project->Link(), 'branch?name='.urlencode($this->Name())); |
|
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | /** |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | * @return string |
| 38 | 38 | */ |
| 39 | 39 | public function LogLink() { |
| 40 | - return $this->Link() . '/log'; |
|
| 40 | + return $this->Link().'/log'; |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | /** |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | } |
| 113 | 113 | |
| 114 | 114 | public function getTitle() { |
| 115 | - return $this->dbObject('Created')->Nice() . " (Status: {$this->Status})"; |
|
| 115 | + return $this->dbObject('Created')->Nice()." (Status: {$this->Status})"; |
|
| 116 | 116 | } |
| 117 | 117 | |
| 118 | 118 | public function Link() { |
@@ -233,14 +233,14 @@ discard block |
||
| 233 | 233 | $envName = $this->Environment()->getFullName(); |
| 234 | 234 | if($this->Direction == 'get') { |
| 235 | 235 | if($this->Origin == 'ManualUpload') { |
| 236 | - $description = 'Manual upload of ' . $this->getModeNice() . ' to ' . $envName; |
|
| 236 | + $description = 'Manual upload of '.$this->getModeNice().' to '.$envName; |
|
| 237 | 237 | } elseif($this->IsBackupDataTransfer()) { |
| 238 | - $description = 'Automated backup of ' . $this->getModeNice() . ' from ' . $envName; |
|
| 238 | + $description = 'Automated backup of '.$this->getModeNice().' from '.$envName; |
|
| 239 | 239 | } else { |
| 240 | - $description = 'Backup of ' . $this->getModeNice() . ' to ' . $envName; |
|
| 240 | + $description = 'Backup of '.$this->getModeNice().' to '.$envName; |
|
| 241 | 241 | } |
| 242 | 242 | } else { |
| 243 | - $description = 'Restore ' . $this->getModeNice() . ' to ' . $envName; |
|
| 243 | + $description = 'Restore '.$this->getModeNice().' to '.$envName; |
|
| 244 | 244 | } |
| 245 | 245 | |
| 246 | 246 | return $description; |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | * @return string |
| 69 | 69 | */ |
| 70 | 70 | public function LogLink() { |
| 71 | - return $this->Link() . '/log'; |
|
| 71 | + return $this->Link().'/log'; |
|
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | /** |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | if($env instanceof EnvironmentCreateBackend) { |
| 191 | 191 | return $env; |
| 192 | 192 | } else { |
| 193 | - throw new Exception("Invalid backend: " . $data['EnvironmentType']); |
|
| 193 | + throw new Exception("Invalid backend: ".$data['EnvironmentType']); |
|
| 194 | 194 | } |
| 195 | 195 | } |
| 196 | 196 | return null; |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | * Do the actual job by calling the appropiate backend |
| 32 | 32 | */ |
| 33 | 33 | public function perform() { |
| 34 | - echo "[-] PingJob starting" . PHP_EOL; |
|
| 34 | + echo "[-] PingJob starting".PHP_EOL; |
|
| 35 | 35 | $log = new DeploynautLogFile($this->args['logfile']); |
| 36 | 36 | |
| 37 | 37 | $ping = DNPing::get()->byID($this->args['pingID']); |