Skip to content

Commit

Permalink
Fix typehint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Dec 21, 2019
1 parent 72021a2 commit f1d8565
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"test": "phpunit",
"stan": "phpstan analyse src/ && psalm --show-info=false",
"psalm": "psalm --show-info=false",
"stan-setup": "cp composer.json composer.backup && composer require --dev phpstan/phpstan:^0.11 vimeo/psalm:^3.0 && mv composer.backup composer.json",
"stan-setup": "cp composer.json composer.backup && composer require --dev phpstan/phpstan:^0.12 vimeo/psalm:^3.7 && mv composer.backup composer.json",
"test-coverage": "phpunit --coverage-clover=clover.xml"
}
}
3 changes: 1 addition & 2 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
parameters:
level: 6
checkMissingIterableValueType: false
autoload_files:
- tests/bootstrap.php
ignoreErrors:
- '#Parameter \#1 $fp of function fwrite expects resource, resource|false given#'
8 changes: 4 additions & 4 deletions src/View/CsvView.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ public function __construct(
*
* @param array|string $serialize The name(s) of the view variable(s) that
* need(s) to be serialized
* @return string|false The serialized data or false.
* @return string The serialized data or false.
*/
protected function _serialize($serialize): string
{
Expand Down Expand Up @@ -272,17 +272,17 @@ protected function _renderContent(): void
*
* @param array|null $row Row data
*
* @return null|string CSV with all data to date
* @return string CSV with all data to date
*/
protected function _renderRow(?array $row = null): ?string
protected function _renderRow(?array $row = null): string
{
static $csv = '';

if ($this->_resetStaticVariables) {
$csv = '';
$this->_resetStaticVariables = false;

return null;
return '';
}

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

0 comments on commit f1d8565

Please sign in to comment.