Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

Commit

Permalink
Add extra type declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
samdark committed Jul 10, 2019
1 parent b8cf687 commit bcb5c77
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/ErrorHandler/HtmlRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ private function renderTemplate(string $template, array $params): string
throw new \RuntimeException("$template not found at $path");
}

$renderer = function () use ($path, $params) {
$renderer = function () use ($path, $params): void {
extract($params, EXTR_OVERWRITE);
require $path;
};
Expand Down Expand Up @@ -59,7 +59,7 @@ private function renderTemplate(string $template, array $params): string
* Empty string if there are none.
* @throws \Throwable
*/
private function renderPreviousExceptions(\Throwable $t)
private function renderPreviousExceptions(\Throwable $t): string
{
if (($previous = $t->getPrevious()) !== null) {
return $this->renderTemplate('previousException', ['throwable' => $previous]);
Expand Down Expand Up @@ -111,7 +111,7 @@ private function renderCallStackItem(?string $file, ?int $line, ?string $class,
* @return string HTML content of the rendered call stack.
* @throws \Throwable
*/
private function renderCallStack(\Throwable $t)
private function renderCallStack(\Throwable $t): string
{
$out = '<ul>';
$out .= $this->renderCallStackItem($t->getFile(), $t->getLine(), null, null, [], 1);
Expand Down
2 changes: 1 addition & 1 deletion src/ErrorHandler/ThrowableRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ abstract class ThrowableRenderer implements ThrowableRendererInterface
*/
protected $request;

protected function getThrowableName(\Throwable $t)
protected function getThrowableName(\Throwable $t): string
{
$name = get_class($t);

Expand Down
2 changes: 1 addition & 1 deletion src/ServerRequestFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ private function getUploadedFilesArray(array $filesArray): array
* @param mixed $sizes file sizes provided by PHP
* @param mixed $errors uploading issues provided by PHP
*/
private function populateUploadedFileRecursive(&$files, $names, $tempNames, $types, $sizes, $errors): void
private function populateUploadedFileRecursive(array &$files, $names, $tempNames, $types, $sizes, $errors): void
{
if (\is_array($names)) {
foreach ($names as $i => $name) {
Expand Down

0 comments on commit bcb5c77

Please sign in to comment.