@@ -27,7 +27,7 @@ |
||
| 27 | 27 | $this->jiraConfigDto->jiraMaxResults |
| 28 | 28 | ); |
| 29 | 29 | $ticketList = array_map( |
| 30 | - static fn (Issue $issue) => $issue->key, |
|
| 30 | + static fn(Issue $issue) => $issue->key, |
|
| 31 | 31 | $activities->getIssues() |
| 32 | 32 | ); |
| 33 | 33 | |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | { |
| 22 | 22 | // bla, bla testen |
| 23 | 23 | echo "Rufe die Objektmethode '{$name}' " |
| 24 | - .implode(', ', $arguments)."\n"; |
|
| 24 | + .implode(', ', $arguments) . "\n"; |
|
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | public function getFacade(): object |
@@ -34,6 +34,6 @@ |
||
| 34 | 34 | |
| 35 | 35 | public function createClient(): Client |
| 36 | 36 | { |
| 37 | - return new Client(['base_uri' => (string) $_ENV['FORECAST_HOST']]); |
|
| 37 | + return new Client(['base_uri' => (string)$_ENV['FORECAST_HOST']]); |
|
| 38 | 38 | } |
| 39 | 39 | } |
@@ -28,10 +28,10 @@ |
||
| 28 | 28 | $res = $this->guzzleClient->request( |
| 29 | 29 | 'GET', |
| 30 | 30 | self::EVENTS_API, |
| 31 | - ['query' => array_merge((array) $queryDto, $this->getToken())], |
|
| 31 | + ['query' => array_merge((array)$queryDto, $this->getToken())], |
|
| 32 | 32 | ); |
| 33 | 33 | |
| 34 | - return json_decode((string) $res->getBody(), null, 512, JSON_THROW_ON_ERROR); |
|
| 34 | + return json_decode((string)$res->getBody(), null, 512, JSON_THROW_ON_ERROR); |
|
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | private function getToken(): array |
@@ -25,14 +25,14 @@ |
||
| 25 | 25 | $_ENV['JIRA_TOKEN'], |
| 26 | 26 | $_ENV['JIRA_HOST'], |
| 27 | 27 | $_ENV['JIRA_USER'], |
| 28 | - (int) $_ENV['JIRA_MAX_RESULTS'], |
|
| 28 | + (int)$_ENV['JIRA_MAX_RESULTS'], |
|
| 29 | 29 | $_ENV['JIRA_QUERY'], |
| 30 | 30 | ); |
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | public function createJiraClient(): IssueService |
| 34 | 34 | { |
| 35 | - return new IssueService(new ArrayConfiguration((array) $this->createJiraConfigDto())); |
|
| 35 | + return new IssueService(new ArrayConfiguration((array)$this->createJiraConfigDto())); |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | public function createJiraCollector(): JiraCollector |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | $savedActivities = 0; |
| 34 | 34 | foreach ($activityDtoCollection as $activityDto) { |
| 35 | 35 | $writeTimeRegistration = [ |
| 36 | - 'person' => (int) $this->forecastConfigDto->forecastPersonId, |
|
| 36 | + 'person' => (int)$this->forecastConfigDto->forecastPersonId, |
|
| 37 | 37 | 'task' => $this->findTaskIdToNeedle($activityDto->needle), |
| 38 | 38 | 'time_registered' => $activityDto->duration, |
| 39 | 39 | 'date' => $activityDto->created->format('Y-m-d'), |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | ] |
| 70 | 70 | ); |
| 71 | 71 | |
| 72 | - return json_decode((string) $res->getBody(), null, 512, JSON_THROW_ON_ERROR); |
|
| 72 | + return json_decode((string)$res->getBody(), null, 512, JSON_THROW_ON_ERROR); |
|
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | private function callPostApi(string $path, array $postData) |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | ] |
| 88 | 88 | ); |
| 89 | 89 | |
| 90 | - return json_decode((string) $res->getBody(), null, 512, JSON_THROW_ON_ERROR); |
|
| 90 | + return json_decode((string)$res->getBody(), null, 512, JSON_THROW_ON_ERROR); |
|
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | private function findTaskIdToNeedle(string $taskNeedle): int |
@@ -98,6 +98,6 @@ discard block |
||
| 98 | 98 | } |
| 99 | 99 | } |
| 100 | 100 | |
| 101 | - return (int) $this->forecastConfigDto->forecastFallbackTaskId; |
|
| 101 | + return (int)$this->forecastConfigDto->forecastFallbackTaskId; |
|
| 102 | 102 | } |
| 103 | 103 | } |
@@ -36,6 +36,6 @@ |
||
| 36 | 36 | |
| 37 | 37 | public function createClient(): Client |
| 38 | 38 | { |
| 39 | - return new Client(['base_uri' => (string) $_ENV['GITLAB_URL']]); |
|
| 39 | + return new Client(['base_uri' => (string)$_ENV['GITLAB_URL']]); |
|
| 40 | 40 | } |
| 41 | 41 | } |
@@ -38,6 +38,6 @@ |
||
| 38 | 38 | |
| 39 | 39 | public function createClient(): Client |
| 40 | 40 | { |
| 41 | - return new Client(['base_uri' => (string) $_ENV['MATTERMOST_HOST']]); |
|
| 41 | + return new Client(['base_uri' => (string)$_ENV['MATTERMOST_HOST']]); |
|
| 42 | 42 | } |
| 43 | 43 | } |
@@ -60,7 +60,7 @@ |
||
| 60 | 60 | $matchPattern = sprintf('(%s-[0-9]{1,})i', $_ENV['GITLAB_PATTERN']); |
| 61 | 61 | $resultMatch = preg_match($matchPattern, $target_title, $match); |
| 62 | 62 | if (0 === $resultMatch || !isset($match[0])) { |
| 63 | - throw new \Exception('gitlab needle not found for target_title: '.$target_title); |
|
| 63 | + throw new \Exception('gitlab needle not found for target_title: ' . $target_title); |
|
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | return strtoupper($match[0]); |