Skip to content

Increase phpstan to level 4 #874

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 14, 2020
Merged
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
12 changes: 6 additions & 6 deletions lib/Github/Api/Apps.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function findInstallations()
*
* @link https://developer.github.com/v3/apps/#get-an-installation
*
* @param $installationId An integration installation id
* @param int $installationId An integration installation id
*
* @return array
*/
Expand All @@ -74,7 +74,7 @@ public function getInstallation($installationId)
*
* @link https://developer.github.com/v3/apps/#get-an-organization-installation
*
* @param $org An organization
* @param string $org An organization
*
* @return array
*/
Expand All @@ -90,8 +90,8 @@ public function getInstallationForOrganization($org)
*
* @link https://developer.github.com/v3/apps/#get-a-repository-installation
*
* @param $owner the owner of a repository
* @param $repo the name of the repository
* @param string $owner the owner of a repository
* @param string $repo the name of the repository
*
* @return array
*/
Expand All @@ -107,7 +107,7 @@ public function getInstallationForRepo($owner, $repo)
*
* @link https://developer.github.com/v3/apps/#get-a-user-installation
*
* @param $username
* @param string $username
*
* @return array
*/
Expand All @@ -123,7 +123,7 @@ public function getInstallationForUser($username)
*
* @link https://developer.github.com/v3/apps/#delete-an-installation
*
* @param $installationId An integration installation id
* @param int $installationId An integration installation id
*/
public function removeInstallation($installationId)
{
Expand Down
4 changes: 2 additions & 2 deletions lib/Github/Api/Repository/Assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ public function show($username, $repository, $id)
*/
public function create($username, $repository, $id, $name, $contentType, $content)
{
if (!defined('OPENSSL_TLSEXT_SERVER_NAME') || !OPENSSL_TLSEXT_SERVER_NAME) {
throw new ErrorException('Asset upload support requires Server Name Indication. This is not supported by your PHP version. See http://php.net/manual/en/openssl.constsni.php.');
if (!defined('OPENSSL_TLSEXT_SERVER_NAME') || OPENSSL_TLSEXT_SERVER_NAME == 0) {
throw new ErrorException('Asset upload support requires Server Name Indication. This is not supported by your PHP version. See https://www.php.net/manual/en/openssl.constsni.php.');
}

// Asset creation requires a separate endpoint, uploads.github.com.
Expand Down
1 change: 0 additions & 1 deletion lib/Github/HttpClient/Plugin/Authentication.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ public function doHandleRequest(RequestInterface $request, callable $next, calla

default:
throw new RuntimeException(sprintf('%s not yet implemented', $this->method));
break;
}

return $next($request);
Expand Down
6 changes: 3 additions & 3 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
parameters:
level: 0
paths:
- lib
level: 4
paths:
- lib