@@ -61,7 +61,7 @@ |
||
61 | 61 | $this->log->addInfo('Result='.$ret); |
62 | 62 | |
63 | 63 | $json = json_decode($ret); |
64 | - $results = array_map(function ($elem) { |
|
64 | + $results = array_map(function($elem) { |
|
65 | 65 | return $this->json_mapper->map($elem, new ProjectType()); |
66 | 66 | }, $json); |
67 | 67 |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | { |
69 | 69 | $ret = $this->exec("/user/assignable/search?project=$projectIdOrKey", null); |
70 | 70 | $json = json_decode($ret); |
71 | - $results = array_map(function ($elem) { |
|
71 | + $results = array_map(function($elem) { |
|
72 | 72 | return $this->json_mapper->map($elem, new Reporter()); |
73 | 73 | }, $json); |
74 | 74 | |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | { |
87 | 87 | $ret = $this->exec($this->uri."/$projectIdOrKey/statuses", null); |
88 | 88 | $json = json_decode($ret); |
89 | - $results = array_map(function ($elem) { |
|
89 | + $results = array_map(function($elem) { |
|
90 | 90 | return $this->json_mapper->map($elem, new IssueType()); |
91 | 91 | }, $json); |
92 | 92 | |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | $this->log->addInfo('Result='.$ret); |
106 | 106 | |
107 | 107 | $json = json_decode($ret); |
108 | - $results = array_map(function ($elem) { |
|
108 | + $results = array_map(function($elem) { |
|
109 | 109 | return $this->json_mapper->map($elem, new ProjectType()); |
110 | 110 | }, $json); |
111 | 111 |
@@ -92,7 +92,7 @@ |
||
92 | 92 | |
93 | 93 | public function jsonSerialize() |
94 | 94 | { |
95 | - return array_filter(get_object_vars($this), function ($var) { |
|
95 | + return array_filter(get_object_vars($this), function($var) { |
|
96 | 96 | return !is_null($var); |
97 | 97 | }); |
98 | 98 | } |
@@ -25,7 +25,7 @@ |
||
25 | 25 | |
26 | 26 | public static function dd($x) |
27 | 27 | { |
28 | - array_map(function ($x) { |
|
28 | + array_map(function($x) { |
|
29 | 29 | (new Dumper())->dump($x); |
30 | 30 | }, func_get_args()); |
31 | 31 | die(1); |
@@ -140,7 +140,7 @@ |
||
140 | 140 | |
141 | 141 | public function jsonSerialize() |
142 | 142 | { |
143 | - $vars = array_filter(get_object_vars($this), function ($var) { |
|
143 | + $vars = array_filter(get_object_vars($this), function($var) { |
|
144 | 144 | return !is_null($var); |
145 | 145 | }); |
146 | 146 |
@@ -783,7 +783,7 @@ |
||
783 | 783 | $metas = json_decode($ret, true); |
784 | 784 | |
785 | 785 | // extract only custom field(startWith customefield_XXXXX) |
786 | - $cfs = array_filter($metas['fields'], function ($key) { |
|
786 | + $cfs = array_filter($metas['fields'], function($key) { |
|
787 | 787 | $pos = strpos($key, 'customfield'); |
788 | 788 | |
789 | 789 | return $pos !== false; |
@@ -27,7 +27,7 @@ |
||
27 | 27 | */ |
28 | 28 | public function register() |
29 | 29 | { |
30 | - $this->app->bind(ConfigurationInterface::class, function () { |
|
30 | + $this->app->bind(ConfigurationInterface::class, function() { |
|
31 | 31 | return new DotEnvConfiguration(base_path()); |
32 | 32 | }); |
33 | 33 | } |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | return $this->name; |
76 | 76 | } |
77 | 77 | |
78 | - public function getGoal(){ |
|
78 | + public function getGoal() { |
|
79 | 79 | return str_replace(array("\n\r", "\n", "\r"), '', $this->goal); |
80 | 80 | } |
81 | 81 | |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | } |
91 | 91 | |
92 | 92 | public function getEndDate($format = 'Y-m-d H:i:s') { |
93 | - if (!is_null($this->endDate)){ |
|
93 | + if (!is_null($this->endDate)) { |
|
94 | 94 | $date = new \DateTime($this->endDate); |
95 | 95 | return date_format($date, $format); |
96 | 96 | } |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | |
32 | 32 | } |
33 | 33 | |
34 | - public function setRestClient(){ |
|
34 | + public function setRestClient() { |
|
35 | 35 | $this->restClient = new JiraClient($this->configuration, $this->logger, $this->path); |
36 | 36 | $this->restClient->setAPIUri(''); |
37 | 37 | } |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | { |
42 | 42 | $json_mapper = new \JsonMapper(); |
43 | 43 | $json_mapper->undefinedPropertyHandler = [new \JiraRestApi\JsonMapperHelper(), 'setUndefinedProperty']; |
44 | - return $json_mapper->map($json, new Sprint() ); |
|
44 | + return $json_mapper->map($json, new Sprint()); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | /** |
@@ -60,14 +60,14 @@ discard block |
||
60 | 60 | return $this->getSprintFromJSON(json_decode($ret)); |
61 | 61 | } |
62 | 62 | |
63 | - public function getVelocityForSprint($sprintID){ |
|
63 | + public function getVelocityForSprint($sprintID) { |
|
64 | 64 | try { |
65 | 65 | $sprint = $this->getSprint($sprintID); |
66 | - if (!is_null($sprint->originBoardId)){ |
|
66 | + if (!is_null($sprint->originBoardId)) { |
|
67 | 67 | $ret = $this->restClient->exec('/rest/greenhopper/1.0/rapid/charts/velocity.json?rapidViewId='.$sprint->originBoardId.'&sprintId='.$sprint->id); |
68 | 68 | $velocityObject = json_decode($ret); |
69 | 69 | $velocityStats = $velocityObject->{'velocityStatEntries'}; |
70 | - if (property_exists($velocityStats,$sprint->id)) { |
|
70 | + if (property_exists($velocityStats, $sprint->id)) { |
|
71 | 71 | $sprint->estimatedVelocity = $velocityStats->{$sprint->id}->{'estimated'}->value; |
72 | 72 | $sprint->completedVelocity = $velocityStats->{$sprint->id}->{'completed'}->value; |
73 | 73 | } else { |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | return $sprint; |
79 | 79 | } |
80 | 80 | catch (JiraException $e) { |
81 | - print("Error Occured! " . $e->getMessage()); |
|
81 | + print("Error Occured! ".$e->getMessage()); |
|
82 | 82 | return null; |
83 | 83 | } |
84 | 84 | } |