@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | /** |
34 | 34 | * @var PortDefinition[] |
35 | 35 | */ |
36 | - public $portDefinitions =[]; |
|
36 | + public $portDefinitions = []; |
|
37 | 37 | |
38 | 38 | public $requirePorts = false; |
39 | 39 | |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | /** |
52 | 52 | * @var array |
53 | 53 | */ |
54 | - public $constraints = []; |
|
54 | + public $constraints = []; |
|
55 | 55 | |
56 | 56 | |
57 | 57 | public $acceptedResourceRoles = []; |
@@ -101,39 +101,39 @@ discard block |
||
101 | 101 | |
102 | 102 | if (isset($aData['portDefinitions'])) { |
103 | 103 | foreach ($aData['portDefinitions'] as $portDefinition) { |
104 | - $this->portDefinitions[] = new PortDefinition((array)$portDefinition); |
|
104 | + $this->portDefinitions[] = new PortDefinition((array) $portDefinition); |
|
105 | 105 | } |
106 | 106 | } |
107 | 107 | |
108 | 108 | if (isset($aData['container'])) { |
109 | - $this->container = new Container((array)$aData['container']); |
|
109 | + $this->container = new Container((array) $aData['container']); |
|
110 | 110 | } |
111 | 111 | |
112 | 112 | if (isset($aData['healthChecks'])) |
113 | 113 | { |
114 | - foreach($aData['healthChecks'] as $healthCheck) |
|
114 | + foreach ($aData['healthChecks'] as $healthCheck) |
|
115 | 115 | { |
116 | - $this->healthChecks[] = new HealthCheck((array)$healthCheck); |
|
116 | + $this->healthChecks[] = new HealthCheck((array) $healthCheck); |
|
117 | 117 | } |
118 | 118 | } |
119 | 119 | |
120 | 120 | if (isset($aData['upgradeStrategy'])) |
121 | 121 | { |
122 | - $this->upgradeStrategy = new UpgradeStrategy((array)$aData['upgradeStrategy']); |
|
122 | + $this->upgradeStrategy = new UpgradeStrategy((array) $aData['upgradeStrategy']); |
|
123 | 123 | } else { |
124 | 124 | $this->upgradeStrategy = new UpgradeStrategy(); |
125 | 125 | } |
126 | 126 | |
127 | 127 | if (isset($aData['ipAddress'])) |
128 | 128 | { |
129 | - $this->ipAddress = new IpAddress((array)$aData['ipAddress']); |
|
129 | + $this->ipAddress = new IpAddress((array) $aData['ipAddress']); |
|
130 | 130 | } |
131 | 131 | |
132 | 132 | if (isset($aData['env'])) |
133 | 133 | { |
134 | - $this->env = (object) $aData['env']; |
|
134 | + $this->env = (object) $aData['env']; |
|
135 | 135 | } else { |
136 | - $this->env = (object)[]; |
|
136 | + $this->env = (object) []; |
|
137 | 137 | } |
138 | 138 | |
139 | 139 | if (isset($aData['labels'])) |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | $_aDifferences[$_sProperty] = $this->oDiffCompare->compare( |
167 | 167 | $_oRemoteEntity->{$_sProperty}, |
168 | 168 | $_oLocalEntity->{$_sProperty} |
169 | - ) ; |
|
169 | + ); |
|
170 | 170 | } |
171 | 171 | |
172 | 172 | return $_aDifferences; |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | * @param JobEntityInterface $oRemoteJob |
220 | 220 | * @return null |
221 | 221 | */ |
222 | - abstract protected function preCompareModifications(JobEntityInterface &$oLocalJob, JobEntityInterface &$oRemoteJob); |
|
222 | + abstract protected function preCompareModifications(JobEntityInterface & $oLocalJob, JobEntityInterface & $oRemoteJob); |
|
223 | 223 | |
224 | 224 | /** |
225 | 225 | * Gets entity for each system with defaults set |
@@ -151,8 +151,7 @@ |
||
151 | 151 | if ($this->oJobComparisonBusinessCase->hasSameJobType($_oJobEntityLocal, $_oJobEntityChronos)) |
152 | 152 | { |
153 | 153 | $_bHasUpdatedJob = $this->oJobRepositoryRemote->updateJob($_oJobEntityLocal); |
154 | - } |
|
155 | - else |
|
154 | + } else |
|
156 | 155 | { |
157 | 156 | $_bHasUpdatedJob = ( |
158 | 157 | $this->oJobRepositoryRemote->removeJob($_oJobEntityChronos->getKey()) |
@@ -52,8 +52,7 @@ discard block |
||
52 | 52 | if (empty($aEntityNames)) |
53 | 53 | { |
54 | 54 | $_aRemoteEntities = $this->oJobRepositoryRemote->getJobs(); |
55 | - } |
|
56 | - else |
|
55 | + } else |
|
57 | 56 | { |
58 | 57 | $_aRemoteEntities = []; |
59 | 58 | foreach ($aEntityNames as $_sJobName) |
@@ -85,8 +84,7 @@ discard block |
||
85 | 84 | 'Entity %s stored in local repository', |
86 | 85 | $oAppRemote->getKey() |
87 | 86 | )); |
88 | - } |
|
89 | - else { |
|
87 | + } else { |
|
90 | 88 | $this->oLogger->error(sprintf( |
91 | 89 | 'Failed to store %s in local repository', |
92 | 90 | $oAppRemote->getKey() |
@@ -116,8 +114,7 @@ discard block |
||
116 | 114 | 'Entity %s is updated in local repository', |
117 | 115 | $oAppRemote->getKey() |
118 | 116 | )); |
119 | - } |
|
120 | - else { |
|
117 | + } else { |
|
121 | 118 | $this->oLogger->error(sprintf( |
122 | 119 | 'Failed to update app %s in local repository', |
123 | 120 | $oAppRemote->getKey() |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | $_sYaml = $_oDumper->dump(array('parameters' => $aToStore), 2); |
166 | 166 | |
167 | 167 | $_oFileSystem = new Filesystem(); |
168 | - $_oFileSystem->dumpFile($this->getHomeDir() . '/parameters.yml', $_sYaml); |
|
168 | + $_oFileSystem->dumpFile($this->getHomeDir().'/parameters.yml', $_sYaml); |
|
169 | 169 | } |
170 | 170 | |
171 | 171 | /** |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | private function getParameterValue($sKey, $mDefaultValue = null) |
195 | 195 | { |
196 | 196 | $_oParser = new Parser(); |
197 | - $_sParameterFile = $this->getHomeDir() . '/parameters.yml'; |
|
197 | + $_sParameterFile = $this->getHomeDir().'/parameters.yml'; |
|
198 | 198 | |
199 | 199 | if (file_exists($_sParameterFile)) |
200 | 200 | { |