@@ -1,7 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Base class for the APINouns |
|
| 4 | - */ |
|
| 3 | + * Base class for the APINouns |
|
| 4 | + */ |
|
| 5 | 5 | class APINoun extends Controller { |
| 6 | 6 | |
| 7 | 7 | /** |
@@ -119,7 +119,7 @@ |
||
| 119 | 119 | * @return SS_HTTPResponse |
| 120 | 120 | */ |
| 121 | 121 | protected function message($message, $statusCode) { |
| 122 | - $response = $this->getAPIResponse(array( |
|
| 122 | + $response = $this->getAPIResponse(array( |
|
| 123 | 123 | 'message' => $message, |
| 124 | 124 | 'statusCode' => $statusCode |
| 125 | 125 | )); |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Will convert the Filename to the version 1.2 of deploynaut where it |
|
| 4 | - * more or less is exactly is the same as the Name but with .rb |
|
| 5 | - */ |
|
| 3 | + * Will convert the Filename to the version 1.2 of deploynaut where it |
|
| 4 | + * more or less is exactly is the same as the Name but with .rb |
|
| 5 | + */ |
|
| 6 | 6 | class DNMigrate1_1to1_2 extends BuildTask { |
| 7 | 7 | /** |
| 8 | 8 | * @param SS_HTTPRequest $request |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | foreach($environments as $environment) { |
| 15 | 15 | $newFilename = basename($environment->Filename); |
| 16 | 16 | if($environment->Filename != $newFilename) { |
| 17 | - echo 'Migrating "'.$environment->Filename.'" to '.$newFilename.PHP_EOL; |
|
| 17 | + echo 'Migrating "' . $environment->Filename . '" to ' . $newFilename . PHP_EOL; |
|
| 18 | 18 | $environment->Filename = $newFilename; |
| 19 | 19 | $environment->write(); |
| 20 | 20 | } |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | foreach($projects as $project) { |
| 27 | 27 | if(!$project->projectFolderExists()) { |
| 28 | 28 | $warnings = true; |
| 29 | - echo 'Project '.$project->Name.' don\'t have a cap project folder'.PHP_EOL; |
|
| 29 | + echo 'Project ' . $project->Name . ' don\'t have a cap project folder' . PHP_EOL; |
|
| 30 | 30 | } |
| 31 | 31 | } |
| 32 | 32 | if($warnings) { |
@@ -1,7 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Surface Filesystem::sync() as a dev task in case CMS has not been included. |
|
| 4 | - */ |
|
| 3 | + * Surface Filesystem::sync() as a dev task in case CMS has not been included. |
|
| 4 | + */ |
|
| 5 | 5 | class CMSFilesystemSyncTask extends BuildTask { |
| 6 | 6 | public function run($request = null) { |
| 7 | 7 | Filesystem::sync(); |
@@ -49,7 +49,7 @@ |
||
| 49 | 49 | 'projects' => array(), |
| 50 | 50 | ); |
| 51 | 51 | |
| 52 | - if($request->httpMethod() != 'GET') return $this->message('API not found', 404);; |
|
| 52 | + if($request->httpMethod() != 'GET') return $this->message('API not found', 404); ; |
|
| 53 | 53 | |
| 54 | 54 | foreach(DNProject::get() as $item) { |
| 55 | 55 | if($item->canView($this->getMember())) { |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | "href" => "$href/deploy", |
| 39 | 39 | "type" => "application/json", |
| 40 | 40 | "fields" => array( |
| 41 | - array( "name" => "release", "type" => "text" ), |
|
| 41 | + array("name" => "release", "type" => "text"), |
|
| 42 | 42 | ), |
| 43 | 43 | ) |
| 44 | 44 | ) |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | $ping->write(); |
| 127 | 127 | $ping->start(); |
| 128 | 128 | |
| 129 | - $location = Director::absoluteBaseURL().$this->Link().'/ping/'.$ping->ID; |
|
| 129 | + $location = Director::absoluteBaseURL() . $this->Link() . '/ping/' . $ping->ID; |
|
| 130 | 130 | $output = array( |
| 131 | 131 | 'message' => 'Ping queued as job ' . $ping->ResqueToken, |
| 132 | 132 | 'href' => $location, |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | $deploy->SHA = $reqBody['release']; |
| 181 | 181 | $deploy->write(); |
| 182 | 182 | $deploy->start(); |
| 183 | - $location = Director::absoluteBaseURL().$this->Link().'/deploy/'.$deploy->ID; |
|
| 183 | + $location = Director::absoluteBaseURL() . $this->Link() . '/deploy/' . $deploy->ID; |
|
| 184 | 184 | $output = array( |
| 185 | 185 | 'message' => 'Deploy queued as job ' . $deploy->ResqueToken, |
| 186 | 186 | 'href' => $location, |
@@ -97,7 +97,7 @@ |
||
| 97 | 97 | $fetch->write(); |
| 98 | 98 | $fetch->start(); |
| 99 | 99 | |
| 100 | - $location = Director::absoluteBaseURL().$this->Link().'/fetch/'.$fetch->ID; |
|
| 100 | + $location = Director::absoluteBaseURL() . $this->Link() . '/fetch/' . $fetch->ID; |
|
| 101 | 101 | $output = array( |
| 102 | 102 | 'message' => 'Ping queued as job ' . $fetch->ResqueToken, |
| 103 | 103 | 'href' => $location, |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | $env = $environment->Project()->getProcessEnv(); |
| 178 | 178 | |
| 179 | 179 | if(!$args) $args = array(); |
| 180 | - $args['history_path'] = realpath(DEPLOYNAUT_LOG_PATH.'/'); |
|
| 180 | + $args['history_path'] = realpath(DEPLOYNAUT_LOG_PATH . '/'); |
|
| 181 | 181 | |
| 182 | 182 | // Inject env string directly into the command. |
| 183 | 183 | // Capistrano doesn't like the $process->setEnv($env) we'd normally do below. |
@@ -191,7 +191,7 @@ discard block |
||
| 191 | 191 | |
| 192 | 192 | $data = DNData::inst(); |
| 193 | 193 | // Generate a capfile from a template |
| 194 | - $capTemplate = file_get_contents(BASE_PATH.'/deploynaut/Capfile.template'); |
|
| 194 | + $capTemplate = file_get_contents(BASE_PATH . '/deploynaut/Capfile.template'); |
|
| 195 | 195 | $cap = str_replace( |
| 196 | 196 | array('<config root>', '<ssh key>', '<base path>'), |
| 197 | 197 | array($data->getEnvironmentDir(), DEPLOYNAUT_SSH_KEY, BASE_PATH), |
@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | if(defined('DEPLOYNAUT_CAPFILE')) { |
| 202 | 202 | $capFile = DEPLOYNAUT_CAPFILE; |
| 203 | 203 | } else { |
| 204 | - $capFile = ASSETS_PATH.'/Capfile'; |
|
| 204 | + $capFile = ASSETS_PATH . '/Capfile'; |
|
| 205 | 205 | } |
| 206 | 206 | file_put_contents($capFile, $cap); |
| 207 | 207 | |
@@ -53,7 +53,7 @@ |
||
| 53 | 53 | |
| 54 | 54 | // Default, cacheless implementation |
| 55 | 55 | } else { |
| 56 | - $filename = TEMP_FOLDER .'/' . $sha . '.tar.gz'; |
|
| 56 | + $filename = TEMP_FOLDER . '/' . $sha . '.tar.gz'; |
|
| 57 | 57 | if($this->generatePackage($sha, $repositoryDir, $outputFilename, $log)) { |
| 58 | 58 | return $filename; |
| 59 | 59 | } |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | |
| 26 | 26 | public function getIdentifier() { |
| 27 | 27 | // If the build script changes, don't re-use cached items |
| 28 | - return substr(sha1($this->buildScript),0,8); |
|
| 28 | + return substr(sha1($this->buildScript), 0, 8); |
|
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | /** |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | */ |
| 73 | 73 | protected function executeProcesses($processes, DeploynautLogFile $log) { |
| 74 | 74 | foreach($processes as $process) { |
| 75 | - $process->mustRun(function ($type, $buffer) use($log) { |
|
| 75 | + $process->mustRun(function($type, $buffer) use($log) { |
|
| 76 | 76 | $log->write($buffer); |
| 77 | 77 | }); |
| 78 | 78 | } |