Skip to content

Commit e952198

Browse files
authored
minor #874 Increase phpstan to level 4 (acrobat)
This PR was merged into the 2.14.x-dev branch. Discussion ---------- Commits ------- 877386b Phpstan level 2 fixes 92cad4d Phpstan level 4 fixes cc3972b Use phpstan level 4 as default
2 parents f2abf32 + cc3972b commit e952198

File tree

4 files changed

+11
-12
lines changed

4 files changed

+11
-12
lines changed

lib/Github/Api/Apps.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function findInstallations()
5858
*
5959
* @link https://developer.github.com/v3/apps/#get-an-installation
6060
*
61-
* @param $installationId An integration installation id
61+
* @param int $installationId An integration installation id
6262
*
6363
* @return array
6464
*/
@@ -74,7 +74,7 @@ public function getInstallation($installationId)
7474
*
7575
* @link https://developer.github.com/v3/apps/#get-an-organization-installation
7676
*
77-
* @param $org An organization
77+
* @param string $org An organization
7878
*
7979
* @return array
8080
*/
@@ -90,8 +90,8 @@ public function getInstallationForOrganization($org)
9090
*
9191
* @link https://developer.github.com/v3/apps/#get-a-repository-installation
9292
*
93-
* @param $owner the owner of a repository
94-
* @param $repo the name of the repository
93+
* @param string $owner the owner of a repository
94+
* @param string $repo the name of the repository
9595
*
9696
* @return array
9797
*/
@@ -107,7 +107,7 @@ public function getInstallationForRepo($owner, $repo)
107107
*
108108
* @link https://developer.github.com/v3/apps/#get-a-user-installation
109109
*
110-
* @param $username
110+
* @param string $username
111111
*
112112
* @return array
113113
*/
@@ -123,7 +123,7 @@ public function getInstallationForUser($username)
123123
*
124124
* @link https://developer.github.com/v3/apps/#delete-an-installation
125125
*
126-
* @param $installationId An integration installation id
126+
* @param int $installationId An integration installation id
127127
*/
128128
public function removeInstallation($installationId)
129129
{

lib/Github/Api/Repository/Assets.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ public function show($username, $repository, $id)
6767
*/
6868
public function create($username, $repository, $id, $name, $contentType, $content)
6969
{
70-
if (!defined('OPENSSL_TLSEXT_SERVER_NAME') || !OPENSSL_TLSEXT_SERVER_NAME) {
71-
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.');
70+
if (!defined('OPENSSL_TLSEXT_SERVER_NAME') || OPENSSL_TLSEXT_SERVER_NAME == 0) {
71+
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.');
7272
}
7373

7474
// Asset creation requires a separate endpoint, uploads.github.com.

lib/Github/HttpClient/Plugin/Authentication.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ public function doHandleRequest(RequestInterface $request, callable $next, calla
7979

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

8584
return $next($request);

phpstan.neon.dist

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
parameters:
2-
level: 0
3-
paths:
4-
- lib
2+
level: 4
3+
paths:
4+
- lib

0 commit comments

Comments
 (0)