@@ -107,12 +107,12 @@ discard block |
||
107 | 107 | |
108 | 108 | if (isset($aData['container'])) |
109 | 109 | { |
110 | - $this->container = new Container((array)$aData['container']); |
|
110 | + $this->container = new Container((array) $aData['container']); |
|
111 | 111 | } |
112 | 112 | |
113 | 113 | if (isset($aData['healthChecks'])) |
114 | 114 | { |
115 | - foreach($aData['healthChecks'] as $healthCheck) |
|
115 | + foreach ($aData['healthChecks'] as $healthCheck) |
|
116 | 116 | { |
117 | 117 | $this->healthChecks[] = new HealthCheck((array) $healthCheck); |
118 | 118 | } |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | |
133 | 133 | if (isset($aData['env'])) |
134 | 134 | { |
135 | - $this->env = (object) $aData['env']; |
|
135 | + $this->env = (object) $aData['env']; |
|
136 | 136 | } else { |
137 | 137 | $this->env = (object) []; |
138 | 138 | } |
@@ -121,7 +121,8 @@ discard block |
||
121 | 121 | if (isset($aData['upgradeStrategy'])) |
122 | 122 | { |
123 | 123 | $this->upgradeStrategy = new UpgradeStrategy((array) $aData['upgradeStrategy']); |
124 | - } else { |
|
124 | + } |
|
125 | + else { |
|
125 | 126 | $this->upgradeStrategy = new UpgradeStrategy(); |
126 | 127 | } |
127 | 128 | |
@@ -133,14 +134,16 @@ discard block |
||
133 | 134 | if (isset($aData['env'])) |
134 | 135 | { |
135 | 136 | $this->env = (object) $aData['env']; |
136 | - } else { |
|
137 | + } |
|
138 | + else { |
|
137 | 139 | $this->env = (object) []; |
138 | 140 | } |
139 | 141 | |
140 | 142 | if (isset($aData['labels'])) |
141 | 143 | { |
142 | 144 | $this->labels = (object) $aData['labels']; |
143 | - } else { |
|
145 | + } |
|
146 | + else { |
|
144 | 147 | $this->labels = (object) []; |
145 | 148 | } |
146 | 149 | MarathonEntityUtils::setPropertyIfExist($aData, $this, 'constraints'); |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | } |
85 | 85 | |
86 | 86 | // check if dependency is satisfied |
87 | - if ( $_oJobEntityLocal->isDependencyJob()) |
|
87 | + if ($_oJobEntityLocal->isDependencyJob()) |
|
88 | 88 | { |
89 | 89 | try { |
90 | 90 | $circular = $this->isDependencyCircular($_oJobEntityLocal, count($_oJobEntityLocal->dependencies)); |
@@ -96,10 +96,10 @@ discard block |
||
96 | 96 | return false; |
97 | 97 | } |
98 | 98 | } |
99 | - catch(\Exception $e) |
|
99 | + catch (\Exception $e) |
|
100 | 100 | { |
101 | 101 | $this->oLogger->error(sprintf( |
102 | - 'Job %s cannot be added to remote : %s',$sAppId, $e->getMessage() |
|
102 | + 'Job %s cannot be added to remote : %s', $sAppId, $e->getMessage() |
|
103 | 103 | )); |
104 | 104 | return false; |
105 | 105 | } |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | * @return bool |
158 | 158 | * @throws \Exception |
159 | 159 | */ |
160 | - private function isDependencyCircular(MarathonAppEntity $oEntity, $iImmediateChildren, &$path=[]) |
|
160 | + private function isDependencyCircular(MarathonAppEntity $oEntity, $iImmediateChildren, &$path = []) |
|
161 | 161 | { |
162 | 162 | // Invariant: path will not have duplicates for acyclic dependency tree |
163 | 163 | if ($this->hasDuplicates($path)) |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | // for B intermediate Child will be 2. |
212 | 212 | // when we process D, it will be reduced to 1 and with C to 0 |
213 | 213 | // then we will pop B to generate path [A, E] when we reach E. |
214 | - $iImmediateChildren = $iImmediateChildren -1; |
|
214 | + $iImmediateChildren = $iImmediateChildren - 1; |
|
215 | 215 | if ($iImmediateChildren == 0) |
216 | 216 | { |
217 | 217 | array_pop($path); |