@@ -25,8 +25,8 @@ |
||
| 25 | 25 | |
| 26 | 26 | public function jsonSerialize() |
| 27 | 27 | { |
| 28 | - return array_filter(get_object_vars($this), function ($var) { |
|
| 29 | - return !is_null($var); |
|
| 30 | - }); |
|
| 28 | + return array_filter(get_object_vars($this), function ($var) { |
|
| 29 | + return !is_null($var); |
|
| 30 | + }); |
|
| 31 | 31 | } |
| 32 | 32 | } |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | |
| 26 | 26 | public function jsonSerialize() |
| 27 | 27 | { |
| 28 | - return array_filter(get_object_vars($this), function ($var) { |
|
| 28 | + return array_filter(get_object_vars($this), function($var) { |
|
| 29 | 29 | return !is_null($var); |
| 30 | 30 | }); |
| 31 | 31 | } |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | $this->path = $path; |
| 20 | 20 | $this->restClient = $jiraClient; |
| 21 | 21 | if (!$this->restClient) { |
| 22 | - $this->setRestClient(); |
|
| 22 | + $this->setRestClient(); |
|
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | } |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | return $json_mapper->mapArray($boardList, |
| 41 | 41 | new \ArrayObject(), |
| 42 | 42 | '\JiraRestApi\Board\Board' |
| 43 | - ); |
|
| 43 | + ); |
|
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | /** |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | } |
| 26 | - public function setRestClient(){ |
|
| 26 | + public function setRestClient() { |
|
| 27 | 27 | $this->restClient = new JiraClient($this->configuration, $this->logger, $this->path); |
| 28 | 28 | $this->restClient->setAPIUri(''); |
| 29 | 29 | } |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | static function getBoardFromJSON($json) { |
| 33 | 33 | $json_mapper = new \JsonMapper(); |
| 34 | 34 | $json_mapper->undefinedPropertyHandler = [new \JiraRestApi\JsonMapperHelper(), 'setUndefinedProperty']; |
| 35 | - return $json_mapper->map($json, new Board() ); |
|
| 35 | + return $json_mapper->map($json, new Board()); |
|
| 36 | 36 | } |
| 37 | 37 | static function getArrayOfBoardsFromJSON($boardList) { |
| 38 | 38 | $json_mapper = new \JsonMapper(); |
@@ -65,18 +65,18 @@ discard block |
||
| 65 | 65 | public function getAllBoards($paramArray = []) |
| 66 | 66 | { |
| 67 | 67 | $boardArray = array(); |
| 68 | - $boardArray = $this->loopOverResults($this->uri,$paramArray); |
|
| 68 | + $boardArray = $this->loopOverResults($this->uri, $paramArray); |
|
| 69 | 69 | return $this->getArrayOfBoardsFromJSON($boardArray); |
| 70 | 70 | } |
| 71 | 71 | |
| 72 | - public function getBoardWithSprintsList($boardId = null,$paramArray = []){ |
|
| 72 | + public function getBoardWithSprintsList($boardId = null, $paramArray = []) { |
|
| 73 | 73 | if (is_null($boardId)) { |
| 74 | 74 | $boardList = $this->getAllBoards(); |
| 75 | 75 | $boards = array(); |
| 76 | - foreach($boardList as $board) { |
|
| 76 | + foreach ($boardList as $board) { |
|
| 77 | 77 | if ($board->type == 'scrum') { |
| 78 | 78 | $boards[] = $this->getSprintInfoForBoard($board->id, $paramArray); |
| 79 | - }else { |
|
| 79 | + } else { |
|
| 80 | 80 | $boards[] = $board; |
| 81 | 81 | } |
| 82 | 82 | } |
@@ -86,9 +86,9 @@ discard block |
||
| 86 | 86 | return $boards; |
| 87 | 87 | } |
| 88 | 88 | |
| 89 | - public function getSprintInfoForBoard($boardId,$paramArray) { |
|
| 89 | + public function getSprintInfoForBoard($boardId, $paramArray) { |
|
| 90 | 90 | $board = $this->getBoard($boardId); |
| 91 | - $sprintList = $this->loopOverResults($this->uri.'/'.$boardId.'/sprint/',$paramArray); |
|
| 91 | + $sprintList = $this->loopOverResults($this->uri.'/'.$boardId.'/sprint/', $paramArray); |
|
| 92 | 92 | $sprintObjectsArray = array(); |
| 93 | 93 | foreach ($sprintList as $sprint) { |
| 94 | 94 | $sprintObjectsArray[$sprint->id] = SprintService::getSprintFromJSON($sprint); |
@@ -97,17 +97,17 @@ discard block |
||
| 97 | 97 | return $board; |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | - public function loopOverResults($uri,$paramArray = []) { |
|
| 100 | + public function loopOverResults($uri, $paramArray = []) { |
|
| 101 | 101 | $resultsArray = array(); |
| 102 | 102 | $ret = $this->restClient->exec($uri.$this->restClient->toHttpQueryParameter($paramArray), null); |
| 103 | 103 | $results = json_decode($ret); |
| 104 | 104 | while (!$results->isLast) { |
| 105 | - $resultsArray = array_merge($resultsArray,$results->values); |
|
| 105 | + $resultsArray = array_merge($resultsArray, $results->values); |
|
| 106 | 106 | $paramArray['startAt'] = $results->startAt + $results->maxResults; |
| 107 | 107 | $ret = $this->restClient->exec($this->uri.$this->restClient->toHttpQueryParameter($paramArray), null); |
| 108 | 108 | $results = json_decode($ret); |
| 109 | 109 | } |
| 110 | - $resultsArray = array_merge($resultsArray,$results->values); |
|
| 110 | + $resultsArray = array_merge($resultsArray, $results->values); |
|
| 111 | 111 | return $resultsArray; |
| 112 | 112 | } |
| 113 | 113 | |
@@ -76,7 +76,7 @@ |
||
| 76 | 76 | foreach($boardList as $board) { |
| 77 | 77 | if ($board->type == 'scrum') { |
| 78 | 78 | $boards[] = $this->getSprintInfoForBoard($board->id, $paramArray); |
| 79 | - }else { |
|
| 79 | + } else { |
|
| 80 | 80 | $boards[] = $board; |
| 81 | 81 | } |
| 82 | 82 | } |