Skip to content

Commit f1d8565

Browse files
committed
Fix typehint errors
1 parent 72021a2 commit f1d8565

3 files changed

Lines changed: 6 additions & 7 deletions

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
"test": "phpunit",
7777
"stan": "phpstan analyse src/ && psalm --show-info=false",
7878
"psalm": "psalm --show-info=false",
79-
"stan-setup": "cp composer.json composer.backup && composer require --dev phpstan/phpstan:^0.11 vimeo/psalm:^3.0 && mv composer.backup composer.json",
79+
"stan-setup": "cp composer.json composer.backup && composer require --dev phpstan/phpstan:^0.12 vimeo/psalm:^3.7 && mv composer.backup composer.json",
8080
"test-coverage": "phpunit --coverage-clover=clover.xml"
8181
}
8282
}

phpstan.neon

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
parameters:
22
level: 6
3+
checkMissingIterableValueType: false
34
autoload_files:
45
- tests/bootstrap.php
5-
ignoreErrors:
6-
- '#Parameter \#1 $fp of function fwrite expects resource, resource|false given#'

src/View/CsvView.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ public function __construct(
194194
*
195195
* @param array|string $serialize The name(s) of the view variable(s) that
196196
* need(s) to be serialized
197-
* @return string|false The serialized data or false.
197+
* @return string The serialized data or false.
198198
*/
199199
protected function _serialize($serialize): string
200200
{
@@ -272,17 +272,17 @@ protected function _renderContent(): void
272272
*
273273
* @param array|null $row Row data
274274
*
275-
* @return null|string CSV with all data to date
275+
* @return string CSV with all data to date
276276
*/
277-
protected function _renderRow(?array $row = null): ?string
277+
protected function _renderRow(?array $row = null): string
278278
{
279279
static $csv = '';
280280

281281
if ($this->_resetStaticVariables) {
282282
$csv = '';
283283
$this->_resetStaticVariables = false;
284284

285-
return null;
285+
return '';
286286
}
287287

288288
$csv .= (string)$this->_generateRow($row);

0 commit comments

Comments
 (0)