Skip to content

Conversation

@smesterheide
Copy link
Contributor

No description provided.

@smesterheide smesterheide mentioned this pull request Feb 21, 2023
Signed-off-by: Sandro Mesterheide <sandro.mesterheide@extern.publicplan.de>
Signed-off-by: Sandro Mesterheide <sandro.mesterheide@extern.publicplan.de>
Signed-off-by: Sandro Mesterheide <sandro.mesterheide@extern.publicplan.de>
Signed-off-by: Sandro Mesterheide <sandro.mesterheide@extern.publicplan.de>
Signed-off-by: Sandro Mesterheide <sandro.mesterheide@extern.publicplan.de>
"bamarni/composer-bin-plugin": true
},
"platform": {
"php": "7.4"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Put 8.0 or remove this block

"bamarni/composer-bin-plugin": "^1.4",
"nextcloud/coding-standard": "^1.0.0",
"phpunit/phpunit": "^9.5",
"christophwurst/nextcloud": "dev-master",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be replaced by nextcloud/ocp I think, for psalm to work.

@@ -0,0 +1,189 @@
<?php
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

strict_types

Comment on lines +44 to +60
/** @var IL10N */
private $l;

/** @var IURLGenerator */
private $urlGenerator;

/** @var ICloudIdManager */
private $cloudIdManager;

/** @var GroupBackend */
private $voGroupBackend;

/** @var ProviderService */
private $providerService;

/** @var IGroupManager */
private $groupManager;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/** @var IL10N */
private $l;
/** @var IURLGenerator */
private $urlGenerator;
/** @var ICloudIdManager */
private $cloudIdManager;
/** @var GroupBackend */
private $voGroupBackend;
/** @var ProviderService */
private $providerService;
/** @var IGroupManager */
private $groupManager;
private IL10N $l;
private IURLGenerator $urlGenerator;
private ICloudIdManager $cloudIdManager;
private GroupBackend $voGroupBackend;
private ProviderService $providerService;
private IGroupManager $groupManager;

* @return array [user, remoteURL]
* @throws HintException
*/
public function splitUserRemote($address) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public function splitUserRemote($address) {
public function splitUserRemote(string $address): array {

$qb = $this->dbConn->getQueryBuilder();
$qb->delete('vo_groups')
->where($qb->expr()->eq('gid', $qb->createNamedParameter($gid)))
->execute();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
->execute();
->executeStatement();

$qb = $this->dbConn->getQueryBuilder();
$qb->delete('vo_group_user')
->where($qb->expr()->eq('gid', $qb->createNamedParameter($gid)))
->execute();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
->execute();
->executeStatement();

$qb->insert('vo_group_user')
->setValue('uid', $qb->createNamedParameter($uid))
->setValue('gid', $qb->createNamedParameter($gid))
->execute();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
->execute();
->executeStatement();

->from('vo_group_user')
->where($qb->expr()->eq('gid', $qb->createNamedParameter($gid)))
->andWhere($qb->expr()->eq('uid', $qb->createNamedParameter($uid)))
->execute();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
->execute();
->executeQuery();

@@ -0,0 +1,199 @@
<?php
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

strict_types

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants