@@ -136,8 +136,7 @@ discard block |
||
| 136 | 136 | usort($options, function($a, $b) { |
| 137 | 137 | return strtolower($a['label']) <=> strtolower($b['label']); |
| 138 | 138 | }); |
| 139 | - } |
|
| 140 | - elseif ($relationshipType === 'project') |
|
| 139 | + } elseif ($relationshipType === 'project') |
|
| 141 | 140 | { |
| 142 | 141 | $projects = $this->getProjects(); |
| 143 | 142 | |
@@ -394,8 +393,7 @@ discard block |
||
| 394 | 393 | if ( ! isset($hoursByPerson[$timeEntry->user->name])) |
| 395 | 394 | { |
| 396 | 395 | $hoursByPerson[$timeEntry->user->name] = $timeEntry->hours; |
| 397 | - } |
|
| 398 | - else |
|
| 396 | + } else |
|
| 399 | 397 | { |
| 400 | 398 | $hoursByPerson[$timeEntry->user->name] += $timeEntry->hours; |
| 401 | 399 | } |
@@ -440,8 +438,7 @@ discard block |
||
| 440 | 438 | if ($roundTime) |
| 441 | 439 | { |
| 442 | 440 | $total += $roundedHours * $timeEntry->billable_rate; |
| 443 | - } |
|
| 444 | - else |
|
| 441 | + } else |
|
| 445 | 442 | { |
| 446 | 443 | $total += $timeEntry->hours * $timeEntry->billable_rate; |
| 447 | 444 | } |
@@ -514,8 +511,7 @@ discard block |
||
| 514 | 511 | if ($roundTime) |
| 515 | 512 | { |
| 516 | 513 | $total += $roundedHours * $timeEntry->billable_rate; |
| 517 | - } |
|
| 518 | - else |
|
| 514 | + } else |
|
| 519 | 515 | { |
| 520 | 516 | $total += $timeEntry->hours * $timeEntry->billable_rate; |
| 521 | 517 | } |
@@ -568,8 +564,7 @@ discard block |
||
| 568 | 564 | if ($roundTime) |
| 569 | 565 | { |
| 570 | 566 | $timeCost = $roundedHours * $timeEntry->cost_rate; |
| 571 | - } |
|
| 572 | - else |
|
| 567 | + } else |
|
| 573 | 568 | { |
| 574 | 569 | $timeCost = $timeEntry->hours * $timeEntry->cost_rate; |
| 575 | 570 | } |
@@ -604,8 +599,7 @@ discard block |
||
| 604 | 599 | $endpointPieces = explode('?', $endpoint); |
| 605 | 600 | $endpointWithoutParameters = $endpointPieces[0]; |
| 606 | 601 | $endpoint .= '&page='; |
| 607 | - } |
|
| 608 | - else |
|
| 602 | + } else |
|
| 609 | 603 | { |
| 610 | 604 | $endpointWithoutParameters = $endpoint; |
| 611 | 605 | $endpoint .= '?page='; |
@@ -668,18 +662,15 @@ discard block |
||
| 668 | 662 | { |
| 669 | 663 | // round up to nearest half hour |
| 670 | 664 | return ceil($hours * 2) / 2; |
| 671 | - } |
|
| 672 | - elseif ($method === 'nearestHalfHour') |
|
| 665 | + } elseif ($method === 'nearestHalfHour') |
|
| 673 | 666 | { |
| 674 | 667 | // round up or down to closest half hour |
| 675 | 668 | return round($hours * 2) / 2; |
| 676 | - } |
|
| 677 | - elseif ($method === 'nextWholeNumber') |
|
| 669 | + } elseif ($method === 'nextWholeNumber') |
|
| 678 | 670 | { |
| 679 | 671 | // round up to whole number |
| 680 | 672 | return round($hours); |
| 681 | - } |
|
| 682 | - elseif ($method === 'nearestWholeNumber') |
|
| 673 | + } elseif ($method === 'nearestWholeNumber') |
|
| 683 | 674 | { |
| 684 | 675 | // round up or down to closest whole number |
| 685 | 676 | return round($hours, 0, PHP_ROUND_HALF_EVEN); |
@@ -139,8 +139,7 @@ discard block |
||
| 139 | 139 | 'default' => null |
| 140 | 140 | ]; |
| 141 | 141 | } |
| 142 | - } |
|
| 143 | - elseif ($relationshipType === 'organization') |
|
| 142 | + } elseif ($relationshipType === 'organization') |
|
| 144 | 143 | { |
| 145 | 144 | foreach ($this->getOrganizations() as $organization) |
| 146 | 145 | { |
@@ -156,8 +155,7 @@ discard block |
||
| 156 | 155 | usort($options, function($a, $b) { |
| 157 | 156 | return strtolower($a['label']) <=> strtolower($b['label']); |
| 158 | 157 | }); |
| 159 | - } |
|
| 160 | - elseif ($relationshipType === 'person') |
|
| 158 | + } elseif ($relationshipType === 'person') |
|
| 161 | 159 | { |
| 162 | 160 | foreach (SaasLink::$plugin->capsule->getPeople() as $person) |
| 163 | 161 | { |
@@ -287,8 +285,7 @@ discard block |
||
| 287 | 285 | $endpointPieces = explode('?', $endpoint); |
| 288 | 286 | $endpointWithoutParameters = $endpointPieces[0]; |
| 289 | 287 | $endpoint .= '&page='; |
| 290 | - } |
|
| 291 | - else |
|
| 288 | + } else |
|
| 292 | 289 | { |
| 293 | 290 | $endpointWithoutParameters = $endpoint; |
| 294 | 291 | $endpoint .= '?page='; |
@@ -131,8 +131,7 @@ |
||
| 131 | 131 | if (self::CACHE_ENABLED && $cachedResponse = Craft::$app->cache->get($cacheKey)) |
| 132 | 132 | { |
| 133 | 133 | $responseData = $cachedResponse; |
| 134 | - } |
|
| 135 | - else |
|
| 134 | + } else |
|
| 136 | 135 | { |
| 137 | 136 | $response = $this->client->get(sprintf( |
| 138 | 137 | 'organizations/%s/boards?filter=%s&fields=%s', |