File tree Expand file tree Collapse file tree 6 files changed +72
-3
lines changed Expand file tree Collapse file tree 6 files changed +72
-3
lines changed Original file line number Diff line number Diff line change @@ -7,13 +7,19 @@ class GitCommand extends SystemCommand
77{
88 protected  $ commandPath'git ' ;
99
10+  /** 
11+  * @return string 
12+  */ 
1013 public  function  getHead ()
1114 {
1215 $ command$ this createCommand ("log -1 --pretty=format:'%H' " );
1316
1417 return  current ($ this executeCommand ($ command
1518 }
1619
20+  /** 
21+  * @return string|null 
22+  */ 
1723 public  function  getBranch ()
1824 {
1925 $ command$ this createCommand ("branch " );
@@ -28,6 +34,9 @@ public function getBranch()
2834 return  null ;
2935 }
3036
37+  /** 
38+  * @return int 
39+  */ 
3140 public  function  getCommittedAt ()
3241 {
3342 $ command$ this createCommand ("log -1 --pretty=format:'%ct' " );
Original file line number Diff line number Diff line change 55
66class  ApiClient
77{
8+  /** 
9+  * @var string 
10+  */ 
811 protected  $ apiHost"https://codeclimate.com " ;
912
1013 /** 
Original file line number Diff line number Diff line change 77
88class  CoverageCollector
99{
10+  /** 
11+  * @var Jobs 
12+  */ 
1013 protected  $ api
1114
1215 /** 
@@ -15,6 +18,11 @@ class CoverageCollector
1518 */ 
1619 protected  $ cloverPaths
1720
21+  /** 
22+  * CoverageCollector constructor. 
23+  * 
24+  * @param string[] $paths 
25+  */ 
1826 public  function  __construct ($ paths
1927 {
2028 $ rootDirgetcwd ();
@@ -35,7 +43,7 @@ public function __construct($paths)
3543 /** 
3644 * Set a list of Clover XML paths 
3745 * 
38-  * @param array  $paths Array of relative paths to Clovers XML files 
46+  * @param string[]  $paths Array of relative paths to Clovers XML files 
3947 */ 
4048 public  function  setCloverPaths ($ paths
4149 {
@@ -44,13 +52,16 @@ public function setCloverPaths($paths)
4452
4553 /** 
4654 * Get a list of Clover XML paths 
47-  * @return array  Array of relative Clover XML file locations 
55+  * @return string[]  Array of relative Clover XML file locations 
4856 */ 
4957 public  function  getCloverPaths ()
5058 {
5159 return  $ this cloverPaths ;
5260 }
5361
62+  /** 
63+  * @return JsonFile 
64+  */ 
5465 public  function  collectAsJson ()
5566 {
5667 $ cloverJsonFile$ this api ->collectCloverXml ()->getJsonFile ();
Original file line number Diff line number Diff line change 33
44class  CiInfo
55{
6+  /** 
7+  * @return array 
8+  */ 
69 public  function  toArray ()
710 {
811 if  (isset ($ _SERVER "TRAVIS " ])) {
@@ -40,6 +43,9 @@ public function toArray()
4043 return  [ ];
4144 }
4245
46+  /** 
47+  * @return array 
48+  */ 
4349 protected  function  travisProperties ()
4450 {
4551 return  [
@@ -50,6 +56,9 @@ protected function travisProperties()
5056 ];
5157 }
5258
59+  /** 
60+  * @return array 
61+  */ 
5362 protected  function  circleProperties ()
5463 {
5564 return  [
@@ -60,6 +69,9 @@ protected function circleProperties()
6069 ];
6170 }
6271
72+  /** 
73+  * @return array 
74+  */ 
6375 protected  function  semaphoreProperties ()
6476 {
6577 return  [
@@ -69,6 +81,9 @@ protected function semaphoreProperties()
6981 ];
7082 }
7183
84+  /** 
85+  * @return array 
86+  */ 
7287 protected  function  jenkinsProperties ()
7388 {
7489 return  [
@@ -80,6 +95,9 @@ protected function jenkinsProperties()
8095 ];
8196 }
8297
98+  /** 
99+  * @return array 
100+  */ 
83101 protected  function  tddiumProperties ()
84102 {
85103 return  [
@@ -89,6 +107,9 @@ protected function tddiumProperties()
89107 ];
90108 }
91109
110+  /** 
111+  * @return array 
112+  */ 
92113 protected  function  codeshipProperties ()
93114 {
94115 return  [
@@ -100,6 +121,9 @@ protected function codeshipProperties()
100121 ];
101122 }
102123
124+  /** 
125+  * @return array 
126+  */ 
103127 protected  function  buildkiteProperties ()
104128 {
105129 return  [
@@ -112,6 +136,9 @@ protected function buildkiteProperties()
112136 ];
113137 }
114138
139+  /** 
140+  * @return array 
141+  */ 
115142 protected  function  werckerProperties ()
116143 {
117144 return  [
Original file line number Diff line number Diff line change @@ -31,6 +31,9 @@ public function getRepoToken()
3131 return  $ _SERVER "CODECLIMATE_REPO_TOKEN " ];
3232 }
3333
34+  /** 
35+  * @return array 
36+  */ 
3437 protected  function  getEnvironment ()
3538 {
3639 return  [
@@ -39,6 +42,9 @@ protected function getEnvironment()
3942 ];
4043 }
4144
45+  /** 
46+  * @return array 
47+  */ 
4248 protected  function  collectGitInfo ()
4349 {
4450 $ commandnew  GitCommand ();
@@ -50,13 +56,19 @@ protected function collectGitInfo()
5056 ];
5157 }
5258
59+  /** 
60+  * @return array 
61+  */ 
5362 protected  function  collectCiServiceInfo ()
5463 {
5564 $ ciInfonew  CiInfo ();
5665
5766 return  $ ciInfotoArray ();
5867 }
5968
69+  /** 
70+  * @return array 
71+  */ 
6072 protected  function  collectSourceFiles ()
6173 {
6274 return  array_map (function  (SourceFile $ sourceFile
@@ -68,6 +80,10 @@ protected function collectSourceFiles()
6880 }, $ this getSourceFiles ());
6981 }
7082
83+  /** 
84+  * @param SourceFile $sourceFile 
85+  * @return string 
86+  */ 
7187 protected  function  calculateBlobId (SourceFile $ sourceFile
7288 {
7389 $ contentfile_get_contents ($ sourceFilegetPath ());
Original file line number Diff line number Diff line change @@ -8,7 +8,10 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase
88{
99 const  PROJECT_DIR  = "/tmp/php-test-reporter-example-project " ;
1010
11-  private  $ srcDir
11+  /** 
12+  * @var string 
13+  */ 
14+  protected  $ srcDir
1215
1316 protected  function  setUp ()
1417 {
                         You can’t perform that action at this time. 
           
                  
0 commit comments