Showing 4,504 of 4,504 total issues
Function createComment
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private function createComment($objectType, $objectId, $data, $contentType = 'application/json') {
if (\explode(';', $contentType)[0] === 'application/json') {
$data = \json_decode($data, true);
} else {
throw new UnsupportedMediaType();
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method createShare
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Address $ownerAddress,
Address $sharedByAddress,
$shareWith,
$remoteId,
$name,
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
$appName,
IRequest $request,
OcmMiddleware $ocmMiddleware,
IUserManager $userManager,
AddressHandler $addressHandler,
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
AddressHandler $addressHandler,
IClientService $httpClientService,
DiscoveryManager $discoveryManager,
NotificationManager $notificationManager,
IJobList $jobList,
Method sendOcmRemoteShare
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
protected function sendOcmRemoteShare(Address $shareWithAddress, Address $ownerAddress, Address $sharedByAddress, $token, $name, $remote_id) {
Method requestReShare
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function requestReShare($token, $id, $shareId, $remote, $shareWith, $permission) {
Function httpPost
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function httpPost(RequestInterface $request, ResponseInterface $response) {
$path = $request->getPath();
// Only handling xml
$contentType = $request->getHeader('Content-Type');
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
ISystemTag $tag,
$objectId,
$objectType,
IUser $user,
ISystemTagManager $tagManager,
Function logException
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function logException(\Throwable $ex) {
if ($ex->getPrevious() instanceof FileContentNotAllowedException) {
//Don't log because its already been logged may be by different
//app or so.
return null;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function copy
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function copy($source, $destination) {
if (!$this->fileView) {
throw new \Sabre\DAV\Exception\ServiceUnavailable('filesystem not setup');
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
$objectType,
ISystemTagManager $tagManager,
ISystemTagObjectMapper $tagMapper,
IUserSession $userSession,
IGroupManager $groupManager,
Method sendUpdateToRemote
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function sendUpdateToRemote($remote, $remoteId, $token, $action, $data = [], $try = 0) {
Method getSharesBy
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function getSharesBy($userId, $shareType, $node, $reshares, $limit, $offset) {
Function createCalendar
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function createCalendar($principalUri, $calendarUri, array $properties) {
$principalUri = $this->convertPrincipal($principalUri, true);
$values = [
'principaluri' => $principalUri,
'uri' => $calendarUri,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method addShare
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function addShare($remote, $token, $name, $owner, $shareWith, $remoteId) {
Function createSubscription
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function createSubscription($principalUri, $uri, array $properties) {
if (!isset($properties['{http://calendarserver.org/ns/}source'])) {
throw new Forbidden('The {http://calendarserver.org/ns/}source property is required when creating subscriptions');
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct(IConfig $config, IManager $notificationManager, IGroupManager $groupManager, IAppManager $appManager, IClientService $client, IURLGenerator $urlGenerator) {
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
IUserManager $userManager,
IGroupManager $groupManager,
IUserSession $userSession,
ILogger $logger,
IConfig $config,
Method sendRemoteShare
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Address $shareWithAddress,
Address $ownerAddress,
Address $sharedByAddress,
$token,
$name,
Method sendPreOcmRemoteShare
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
protected function sendPreOcmRemoteShare(Address $shareWithAddress, Address $ownerAddress, Address $sharedByAddress, $token, $name, $remote_id) {