-
Notifications
You must be signed in to change notification settings - Fork 3
Enable php phan #117
base: master
Are you sure you want to change the base?
Enable php phan #117
Conversation
@@ -164,7 +164,7 @@ public function __construct($appName, | |||
|
|||
/** | |||
* @param IUser $user | |||
* @param array $userGroups | |||
* @param array|null $userGroups |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes:
lib/Controller/UsersController.php:167 PhanTypeMismatchDeclaredParamNullable Doc-block of $userGroups in formatUserForIndex is phpdoc param type array which is not a permitted
@@ -23,7 +23,7 @@ | |||
|
|||
class UserTokenMismatchException extends UserTokenException { | |||
public function __construct($message = "", $code = 0, \Exception $previous = null) { | |||
$this->previousException = $this; | |||
$this->previous = $this; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes
lib/Exception/UserTokenMismatchException.php:26 PhanUndeclaredProperty Reference to undeclared property \OCA\UserManagement\Exception\UserTokenMismatchException->previousException
/** @var bool */ | ||
protected $sorting = false; | ||
/** @var int */ | ||
protected $sorting = self::SORT_NONE; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes:
lib/MetaData.php:127 PhanTypeMismatchProperty Assigning 1|2 to property but \OCA\UserManagement\MetaData->sorting is bool|false
lib/MetaData.php:131 PhanTypeMismatchProperty Assigning 0 to property but \OCA\UserManagement\MetaData->sorting is bool|false
|
|
a7c277e
to
3551ff7
Compare
b73903f
to
9d5f903
Compare
Codecov Report
@@ Coverage Diff @@
## master #117 +/- ##
=========================================
Coverage 79.11% 79.11%
Complexity 214 214
=========================================
Files 26 26
Lines 905 905
=========================================
Hits 716 716
Misses 189 189
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #117 +/- ##
===========================================
+ Coverage 78.63% 78.73% +0.1%
Complexity 214 214
===========================================
Files 26 26
Lines 922 917 -5
===========================================
- Hits 725 722 -3
+ Misses 197 195 -2
Continue to review full report at Codecov.
|
these two routes https://github.com/owncloud/user_management/blob/3cd7c282ae55c1752f87d3d36940e41e178d9c50/appinfo/routes.php#L20 need to be refactored and put into a controller ..... |
@PVince81 @DeepDiver1975 this is a demonstration PR for enabling I will leave this here so people can see how to enable |
9d5f903
to
b7035ce
Compare
b7035ce
to
6c8eeb9
Compare
and add the pipeline step in drone ready for
phpstan
.Issue #118
A first run of
phan
reported: