Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 4 additions & 10 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/8.5/phpunit.xsd"
backupGlobals="false"
bootstrap="vendor/autoload.php"
colors="true"
verbose="true"
timeoutForSmallTests="5"
timeoutForMediumTests="10"
timeoutForLargeTests="15"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
>
stopOnFailure="false">
<testsuites>
<testsuite name="http">
<directory>tests</directory>
Expand Down
2 changes: 1 addition & 1 deletion src/Cookies/CookieJar.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public function has(string $name, bool $checkQueued = false): bool
return isset($this->_requestCookies[$name]) || ($checkQueued && isset($this->_responseCookies[$name]));
}

public function store(string $name, string $value = null, $expireSeconds = 0)
public function store(string $name, ?string $value = null, $expireSeconds = 0)
{
unset($this->_deleteCookies[$name]);
$this->_responseCookies[$name] = ['v' => $value, 'e' => $expireSeconds > 0 ? (time() + $expireSeconds) : 0];
Expand Down
4 changes: 2 additions & 2 deletions src/LinkBuilder/LinkBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ public function asUrl(): string
. ($this->_fragment ? '#' . $this->_fragment : null);
}

protected function _isStandardPort($scheme, $port)
protected function _isStandardPort($scheme, $port): bool
{
return ('http' === $scheme && $port === 80) || ('https' === $scheme && $port === 443);
return ('http' === $scheme && (int)$port === 80) || ('https' === $scheme && (int)$port === 443);
}

/**
Expand Down