@@ -115,8 +115,7 @@ |
||
115 | 115 | { |
116 | 116 | $_aFilteredJobList[] = $_sJobName; |
117 | 117 | } |
118 | - } |
|
119 | - else |
|
118 | + } else |
|
120 | 119 | { |
121 | 120 | if (!$this->oJobIndexService->isJobInIndex($_sJobName)) |
122 | 121 | { |
@@ -10,7 +10,6 @@ |
||
10 | 10 | namespace Chapi\Service\JobValidator\PropertyValidator; |
11 | 11 | |
12 | 12 | |
13 | -use Chapi\Entity\Chronos\JobEntity; |
|
14 | 13 | use Chapi\Entity\JobEntityInterface; |
15 | 14 | use Chapi\Service\JobValidator\PropertyValidatorInterface; |
16 | 15 |
@@ -54,8 +54,7 @@ |
||
54 | 54 | { |
55 | 55 | $_oResponse = $this->oGuzzelClient->request('GET', $sUrl, $_aRequestOptions); |
56 | 56 | return new HttpGuzzlResponse($_oResponse); |
57 | - } |
|
58 | - catch (\Exception $oException) |
|
57 | + } catch (\Exception $oException) |
|
59 | 58 | { |
60 | 59 | throw new HttpConnectionException( |
61 | 60 | sprintf('Can\'t get response from "%s"', $this->oGuzzelClient->getConfig('base_uri') . $sUrl), |
@@ -317,8 +317,7 @@ |
||
317 | 317 | { |
318 | 318 | $_oDateTime = new \DateTime(str_replace('Z', '', $_oIso8601Entity->sStartTime)); |
319 | 319 | $_oDateTime->setTimezone(new \DateTimeZone($sTimeZone)); |
320 | - } |
|
321 | - else |
|
320 | + } else |
|
322 | 321 | { |
323 | 322 | $_oDateTime = new \DateTime($_oIso8601Entity->sStartTime); |
324 | 323 | } |
@@ -250,12 +250,10 @@ discard block |
||
250 | 250 | { |
251 | 251 | if (is_array($mValueA) && is_array($mValueB)) { |
252 | 252 | return $this->isArrayEqual($mValueA, $mValueB); |
253 | - } |
|
254 | - elseif (is_object($mValueA) && is_object($mValueB)) |
|
253 | + } elseif (is_object($mValueA) && is_object($mValueB)) |
|
255 | 254 | { |
256 | 255 | return $this->isArrayEqual(get_object_vars($mValueA), get_object_vars($mValueB)); |
257 | - } |
|
258 | - elseif ((is_scalar($mValueA) && is_scalar($mValueB)) || (is_null($mValueA) && is_null($mValueB))) |
|
256 | + } elseif ((is_scalar($mValueA) && is_scalar($mValueB)) || (is_null($mValueA) && is_null($mValueB))) |
|
259 | 257 | { |
260 | 258 | return $mValueA == $mValueB; |
261 | 259 | } |
@@ -288,8 +286,7 @@ discard block |
||
288 | 286 | { |
289 | 287 | return false; |
290 | 288 | } |
291 | - } |
|
292 | - else |
|
289 | + } else |
|
293 | 290 | { |
294 | 291 | foreach ($aValuesB as $_mValueB) |
295 | 292 | { |
@@ -99,10 +99,12 @@ |
||
99 | 99 | { |
100 | 100 | if ($this->oRepositoryBridge->addJob($oJobEntity)) |
101 | 101 | { |
102 | - if (!is_null($this->oJobCollection)) // if no collection inited the new job will init by chronos request |
|
102 | + if (!is_null($this->oJobCollection)) { |
|
103 | + // if no collection inited the new job will init by chronos request |
|
103 | 104 | { |
104 | 105 | $this->oJobCollection->offsetSet($oJobEntity->getKey(), $oJobEntity); |
105 | 106 | } |
107 | + } |
|
106 | 108 | |
107 | 109 | return true; |
108 | 110 | } |
@@ -55,8 +55,7 @@ |
||
55 | 55 | $_mValue = (!empty($_mValue)) |
56 | 56 | ? json_encode($_mValue, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) |
57 | 57 | : $_sEmptyString; |
58 | - } |
|
59 | - elseif (is_bool($_mValue)) |
|
58 | + } elseif (is_bool($_mValue)) |
|
60 | 59 | { |
61 | 60 | $_mValue = (true === $_mValue) |
62 | 61 | ? 'true' |
@@ -12,7 +12,6 @@ |
||
12 | 12 | |
13 | 13 | |
14 | 14 | use Chapi\BusinessCase\Comparison\JobComparisonInterface; |
15 | -use Chapi\Entity\JobEntityInterface; |
|
16 | 15 | use Chapi\Entity\Marathon\MarathonAppEntity; |
17 | 16 | use Chapi\Service\JobIndex\JobIndexServiceInterface; |
18 | 17 | use Chapi\Service\JobRepository\JobRepositoryInterface; |
@@ -83,8 +83,7 @@ |
||
83 | 83 | )); |
84 | 84 | return false; |
85 | 85 | } |
86 | - } |
|
87 | - catch(\Exception $e) |
|
86 | + } catch(\Exception $e) |
|
88 | 87 | { |
89 | 88 | $this->oLogger->error(sprintf( |
90 | 89 | 'Job %s cannot be added to remote : %s',$sAppId, $e->getMessage() |
@@ -12,8 +12,6 @@ |
||
12 | 12 | |
13 | 13 | use Chapi\Component\Cache\CacheInterface; |
14 | 14 | use Chapi\Component\RemoteClients\ApiClientInterface; |
15 | -use Chapi\Entity\Chronos\ChronosJobEntity; |
|
16 | -use Chapi\Entity\Marathon\MarathonAppEntity; |
|
17 | 15 | use Chapi\Service\JobValidator\JobValidatorServiceInterface; |
18 | 16 | use Psr\Log\LoggerInterface; |
19 | 17 | use Symfony\Component\Filesystem\Filesystem; |