Passed
Push — master ( 059348...b37941 )
by Simon
02:58 queued 29s
created
Service/Excel.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
     }
194 194
 
195 195
     /**
196
-     * @return object
196
+     * @return \PHPExcel
197 197
      */
198 198
     public function getExcelObject()
199 199
     {
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
      * is able to export
222 222
      *
223 223
      * @param string $format
224
-     * @return boolean
224
+     * @return boolean|null
225 225
      */
226 226
     public function checkOutputFormat($format)
227 227
     {
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
     }
242 242
 
243 243
     /**
244
-     * @param type $title
244
+     * @param string $title
245 245
      */
246 246
     protected function setCurrentSheetTitle($title)
247 247
     {
Please login to merge, or discard this patch.
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -64,14 +64,14 @@  discard block
 block discarded – undo
64 64
     }
65 65
 
66 66
     /**
67
-   * Create a new sheet within the excel object and ready the service for it.
68
-   * This in essence resets most things so make sure you have finished working
69
-   * on your sheet before creating another.
70
-   *
71
-   * @param string $title The name of the sheet
72
-   *
73
-   * @return [type] [description]
74
-   */
67
+     * Create a new sheet within the excel object and ready the service for it.
68
+     * This in essence resets most things so make sure you have finished working
69
+     * on your sheet before creating another.
70
+     *
71
+     * @param string $title The name of the sheet
72
+     *
73
+     * @return [type] [description]
74
+     */
75 75
     public function newSheet($title = '')
76 76
     {
77 77
         if (!$this->excelObject) {
@@ -158,12 +158,12 @@  discard block
 block discarded – undo
158 158
         $this->reportPath = $path;
159 159
     }
160 160
 
161
-  /**
162
-   * Set the "excel type" that will PHPExcel will output
163
-   * Excel2007 / Excel5 / Excel2003XML / SYLK / OOCalc / CSV / HTML.
164
-   *
165
-   * @param string $format [description]
166
-   */
161
+    /**
162
+     * Set the "excel type" that will PHPExcel will output
163
+     * Excel2007 / Excel5 / Excel2003XML / SYLK / OOCalc / CSV / HTML.
164
+     *
165
+     * @param string $format [description]
166
+     */
167 167
     public function setOutputFormat($format)
168 168
     {
169 169
 
Please login to merge, or discard this patch.
Service/Meta.php 2 patches
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
      * Define an option and its value.
38 38
      *
39 39
      * @param string $key
40
-     * @param mixed  $value
40
+     * @param string  $value
41 41
      * @return $this For method chaining
42 42
      * @throws \InvalidArgumentException if key type is not a string or integer
43 43
      */
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
     /**
74 74
      * Get the value of a single option or return false if it doesn't exist
75 75
      *
76
-     * @param string|integer $key
76
+     * @param string $key
77 77
      * @return string|integer|boolean The option value
78 78
      */
79 79
     public function getOption($key)
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
    * data object.
144 144
    *
145 145
    * @param string         $key   The index to use
146
-   * @param string|integer $value The value to set
146
+   * @param string $value The value to set
147 147
    * @return $this
148 148
    * @throws \Exception
149 149
    */
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
     /**
269 269
      * Return the information array relating to a specific column
270 270
      *
271
-     * @param type $key
271
+     * @param string $key
272 272
      * @return array
273 273
      * @throws \Exception
274 274
      */
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
     /**
300 300
      * Return a specific piece of data from the current data point
301 301
      *
302
-     * @param type $key
302
+     * @param string $key
303 303
      * @return type
304 304
      */
305 305
     public function getPointValue($key)
Please login to merge, or discard this patch.
Indentation   +56 added lines, -56 removed lines patch added patch discarded remove patch
@@ -106,15 +106,15 @@  discard block
 block discarded – undo
106 106
         );
107 107
     }
108 108
 
109
-  /**
110
-   * Increment the value for a key that makes up part of the currently focused
111
-   * data object.
112
-   *
113
-   * @param string $key   The index to use
114
-   * @param int    $value The value to increment by
115
-   * @return $this
116
-   * @throws \Exception if there is no data point, column or invalid type
117
-   */
109
+    /**
110
+     * Increment the value for a key that makes up part of the currently focused
111
+     * data object.
112
+     *
113
+     * @param string $key   The index to use
114
+     * @param int    $value The value to increment by
115
+     * @return $this
116
+     * @throws \Exception if there is no data point, column or invalid type
117
+     */
118 118
     public function increment($key, $value = 1)
119 119
     {
120 120
         if (!$this->currentDataPoint) {
@@ -138,15 +138,15 @@  discard block
 block discarded – undo
138 138
         return $this;
139 139
     }
140 140
 
141
-  /**
142
-   * Directly set the value for a key that makes up part of the currently focused
143
-   * data object.
144
-   *
145
-   * @param string         $key   The index to use
146
-   * @param string|integer $value The value to set
147
-   * @return $this
148
-   * @throws \Exception
149
-   */
141
+    /**
142
+     * Directly set the value for a key that makes up part of the currently focused
143
+     * data object.
144
+     *
145
+     * @param string         $key   The index to use
146
+     * @param string|integer $value The value to set
147
+     * @return $this
148
+     * @throws \Exception
149
+     */
150 150
     public function set($key, $value)
151 151
     {
152 152
         if (!$this->currentDataPoint) {
@@ -161,13 +161,13 @@  discard block
 block discarded – undo
161 161
         return $this;
162 162
     }
163 163
 
164
-  /**
165
-   * Set a focus for the current data object for which data can be manipulated.
166
-   * If the key doesn't exist, it will be created using default column values.
167
-   *
168
-   * @param string $key The reference key to be used
169
-   * @return $this
170
-   */
164
+    /**
165
+     * Set a focus for the current data object for which data can be manipulated.
166
+     * If the key doesn't exist, it will be created using default column values.
167
+     *
168
+     * @param string $key The reference key to be used
169
+     * @return $this
170
+     */
171 171
     public function setPoint($key)
172 172
     {
173 173
         if (!isset($this->currentDataSet[$key])) {
@@ -178,14 +178,14 @@  discard block
 block discarded – undo
178 178
         return $this;
179 179
     }
180 180
 
181
-  /**
182
-   * Add a data point which will be shown on the report. This function should be
183
-   * used prior to any kind of data manipulation as it will not setup a data
184
-   * structure for manipulation.
185
-   *
186
-   * @param string $key The index to use
187
-   * @return $this
188
-   */
181
+    /**
182
+     * Add a data point which will be shown on the report. This function should be
183
+     * used prior to any kind of data manipulation as it will not setup a data
184
+     * structure for manipulation.
185
+     *
186
+     * @param string $key The index to use
187
+     * @return $this
188
+     */
189 189
     public function addPoint($key)
190 190
     {
191 191
         if (!in_array($key, $this->dataPoints)) {
@@ -196,20 +196,20 @@  discard block
 block discarded – undo
196 196
         return $this;
197 197
     }
198 198
 
199
-  /**
200
-   * Define a type of data that will be presented on the report or metadata that
201
-   * will be used for calculations. In the latter case, within the options array
202
-   * set "visible" to false.
203
-   * At a minimum, the key needs to be set. In this case, the type will be string
204
-   * and the key converted in to a title
205
-   * .
206
-   *
207
-   * @param string $key          A reference key for the piece of data
208
-   * @param [type] $defaultValue The default also defines type of column
209
-   * @param array  $options      Additional parameters for the column to use
210
-   *
211
-   * @return [type] [description]
212
-   */
199
+    /**
200
+     * Define a type of data that will be presented on the report or metadata that
201
+     * will be used for calculations. In the latter case, within the options array
202
+     * set "visible" to false.
203
+     * At a minimum, the key needs to be set. In this case, the type will be string
204
+     * and the key converted in to a title
205
+     * .
206
+     *
207
+     * @param string $key          A reference key for the piece of data
208
+     * @param [type] $defaultValue The default also defines type of column
209
+     * @param array  $options      Additional parameters for the column to use
210
+     *
211
+     * @return [type] [description]
212
+     */
213 213
     public function column(
214 214
         $key,
215 215
         $defaultValue = '',
@@ -242,15 +242,15 @@  discard block
 block discarded – undo
242 242
     }
243 243
 
244 244
     /**
245
-   * Manually set the data which will be used for the current set. when
246
-   * using this function, it will expect an associative array of arrays where
247
-   * each entry has a further array of values which have a key matching that of
248
-   * the meta data.
249
-   * TODO - This is quite messy, rewrite more efficiently.
250
-   *
251
-   * @param [type] $inputData [description]
252
-   * @return $this
253
-   */
245
+     * Manually set the data which will be used for the current set. when
246
+     * using this function, it will expect an associative array of arrays where
247
+     * each entry has a further array of values which have a key matching that of
248
+     * the meta data.
249
+     * TODO - This is quite messy, rewrite more efficiently.
250
+     *
251
+     * @param [type] $inputData [description]
252
+     * @return $this
253
+     */
254 254
     public function setData($inputData)
255 255
     {
256 256
         // Combine raw data with the meta data
Please login to merge, or discard this patch.
Service/Nav.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -278,7 +278,7 @@
 block discarded – undo
278 278
      * @param string $input
279 279
      * @param string $axis
280 280
      *
281
-     * @return type
281
+     * @return integer
282 282
      */
283 283
     public function parseNavReference($input = '', $axis = 'column')
284 284
     {
Please login to merge, or discard this patch.
Service/ReportBuilder.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
     /**
200 200
      * Return the navigation service object
201 201
      *
202
-     * @return Nav
202
+     * @return NavInterface
203 203
      */
204 204
     public function nav()
205 205
     {
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
     /**
240 240
      * Return the data handling query service
241 241
      *
242
-     * @return Query
242
+     * @return QueryInterface
243 243
      */
244 244
     public function query()
245 245
     {
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,6 @@
 block discarded – undo
11 11
 
12 12
 namespace Symball\ReportBundle\Service;
13 13
 
14
-use Symball\ReportBundle\Service\ReportPattern;
15 14
 use Symball\ReportBundle\Service\ReportStyle;
16 15
 use Symball\ReportBundle\Service\Meta;
17 16
 use Symball\ReportBundle\Interfaces\NavInterface;
Please login to merge, or discard this patch.
Tests/Unit/MetaTest.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,6 @@
 block discarded – undo
10 10
 
11 11
 /* The base PHPUnit test class */
12 12
 use PHPUnit\Framework\TestCase;
13
-
14 13
 use Symball\ReportBundle\Service\Meta;
15 14
 
16 15
 /* Extend the default PHPUnit test case */
Please login to merge, or discard this patch.
Tests/Unit/ReportPatternTest.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,6 @@
 block discarded – undo
10 10
 
11 11
 /* The base PHPUnit test class */
12 12
 use PHPUnit\Framework\TestCase;
13
-
14 13
 use Symball\ReportBundle\Service\ReportPattern;
15 14
 use Symball\ReportBundle\Service\ReportBuilder;
16 15
 use Symball\ReportBundle\Interfaces\PatternInterface;
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
         $mockPattern->method('run')->willReturn(true);
44 44
         $reportPattern->addPattern($mockPattern, 'an_alias');
45 45
 
46
-        $mockReportBuilder= $this->createMock(ReportBuilder::class);
46
+        $mockReportBuilder = $this->createMock(ReportBuilder::class);
47 47
 
48 48
         $result = $reportPattern->run('an_alias', $mockReportBuilder);
49 49
 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         $reportPattern = new ReportPattern();
55 55
 
56 56
         try {
57
-            $mockReportBuilder= $this->createMock(ReportBuilder::class);
57
+            $mockReportBuilder = $this->createMock(ReportBuilder::class);
58 58
             $result = $reportPattern->run('an_alias', $mockReportBuilder);
59 59
         } catch (\Exception $ex) {
60 60
             // General exception
Please login to merge, or discard this patch.
Tests/Unit/ReportStyleTest.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,6 @@
 block discarded – undo
10 10
 
11 11
 /* The base PHPUnit test class */
12 12
 use PHPUnit\Framework\TestCase;
13
-
14 13
 use Symball\ReportBundle\Service\Meta;
15 14
 use Symball\ReportBundle\Service\ReportStyle;
16 15
 use Symball\ReportBundle\Service\ReportBuilder;
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
         $mockMeta = $this->createMock(Meta::class);
48 48
         $mockMeta->method('getOptions')->willReturn([]);
49 49
 
50
-        $mockReportBuilder= $this->createMock(ReportBuilder::class);
50
+        $mockReportBuilder = $this->createMock(ReportBuilder::class);
51 51
         $mockReportBuilder->method('meta')->will($this->returnValue($mockMeta));
52 52
 
53 53
         $result = $reportStyle->run('an_alias', $mockReportBuilder, 'A1');
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         $mockMeta = $this->createMock(Meta::class);
62 62
         $mockMeta->method('getOptions')->willReturn([]);
63 63
 
64
-        $mockReportBuilder= $this->createMock(ReportBuilder::class);
64
+        $mockReportBuilder = $this->createMock(ReportBuilder::class);
65 65
         $mockReportBuilder->method('meta')->will($this->returnValue($mockMeta));
66 66
 
67 67
         try {
Please login to merge, or discard this patch.
Interfaces/StyleInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,5 +22,5 @@
 block discarded – undo
22 22
      * @param string        $coordString
23 23
      * @param array         $options
24 24
      */
25
-    public function run(ReportBuilder &$context, $coordString, $options);
25
+    public function run(ReportBuilder&$context, $coordString, $options);
26 26
 }
Please login to merge, or discard this patch.
Interfaces/PatternInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,5 +20,5 @@
 block discarded – undo
20 20
      *
21 21
      * @param ReportBuilder $context
22 22
      */
23
-    public function run(ReportBuilder &$context);
23
+    public function run(ReportBuilder&$context);
24 24
 }
Please login to merge, or discard this patch.