Skip to content
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

Chore(deps-dev): Bump psalm/phar from 4.30.0 to 5.25.0 #678

Merged
merged 2 commits into from
Jul 24, 2024
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
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
],
"require-dev": {
"phpunit/phpunit": "^9.5",
"psalm/phar": "^4.22",
"psalm/phar": "^5.25",
"nextcloud/coding-standard": "^1.0",
"nextcloud/ocp": "dev-master"
},
Expand Down
14 changes: 7 additions & 7 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions lib/Db/LockMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\IDBConnection;

/**
* @template-extends QBMapper<Entity>
*/
class LockMapper extends QBMapper {
public function __construct(IDBConnection $db) {
parent::__construct($db, 'e2e_encryption_lock');
Expand Down
8 changes: 1 addition & 7 deletions tests/psalm-baseline.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="4.x-dev@">
<file src="lib/AppInfo/Application.php">
<UndefinedClass occurrences="2">
<code>CreateVersionEvent</code>
<code>MoveToTrashEvent</code>
</UndefinedClass>
</file>
<file src="lib/Connector/Sabre/APlugin.php">
<UndefinedPropertyFetch occurrences="1">
<code>$this-&gt;server-&gt;tree</code>
Expand All @@ -31,4 +25,4 @@
<code>$this-&gt;server-&gt;tree</code>
</UndefinedPropertyFetch>
</file>
</files>
</files>
102 changes: 102 additions & 0 deletions tests/stub.phpstub
Original file line number Diff line number Diff line change
Expand Up @@ -866,3 +866,105 @@ namespace OCA\Files_Sharing {
}
}
}

namespace OCA\Files_Trashbin\Events {

use OCP\EventDispatcher\Event;
use OCP\Files\Node;

class MoveToTrashEvent extends Event {
/** @var bool */
private $moveToTrashBin;

/** @var Node */
private $node;

public function __construct(Node $node) {
$this->moveToTrashBin = true;
$this->node = $node;
}

/**
* get Node which will be deleted
*
* @return Node
*/
public function getNode() {
return $this->node;
}

/**
* disable trash bin for this operation
*/
public function disableTrashBin() {
$this->moveToTrashBin = false;
}

/**
* should the file be moved to the trash bin?
*
* @return bool
*/
public function shouldMoveToTrashBin() {
return $this->moveToTrashBin;
}
}
}

namespace OCA\Files_Versions\Events {

use OCP\EventDispatcher\Event;
use OCP\Files\Node;

/**
* Class CreateVersionEvent
*
* Event to allow other apps to disable versions for specific files
*
* @package OCA\Files_Versions
*/
class CreateVersionEvent extends Event {


/** @var bool */
private $createVersion;

/** @var Node */
private $node;

/**
* CreateVersionEvent constructor.
*
* @param Node $node
*/
public function __construct(Node $node) {
$this->createVersion = true;
$this->node = $node;
}

/**
* get Node of the file which should be versioned
*
* @return Node
*/
public function getNode(): Node {
return $this->node;
}

/**
* disable versions for this file
*/
public function disableVersions(): void {
$this->createVersion = false;
}

/**
* should a version be created for this file?
*
* @return bool
*/
public function shouldCreateVersion(): bool {
return $this->createVersion;
}
}
}
Loading