Completed
Pull Request — master (#193)
by
unknown
01:43
created
src/Board/BoardService.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.