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: Address review comments #37150

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

juliushaertl
Copy link
Member

@juliushaertl juliushaertl commented Mar 9, 2023

Addressing review follow ups from #27034

@juliushaertl juliushaertl added the 2. developing Work in progress label Mar 9, 2023
apps/dav/lib/Upload/ChunkingV2Plugin.php Fixed Show fixed Hide fixed
try {
$this->prepareUpload(dirname($sourcePath));
$this->checkPrerequisites();
} catch (StorageInvalidException|BadRequest|NotFound|PreconditionFailed $e) {
return true;
}
[$storage, $storagePath] = $this->getUploadStorage($this->uploadPath);
[$storage, ] = $this->getUploadStorage($this->uploadPath);

Check notice

Code scanning / Psalm

PossiblyNullArgument Note

Argument 1 of OCA\DAV\Upload\ChunkingV2Plugin::getUploadStorage cannot be null, possibly null value provided
public function prepareUpload($path): void {
$this->uploadFolder = $this->server->tree->getNodeForPath($path);
public function prepareUpload(string $path): void {
$uploadFolder = $this->server->tree->getNodeForPath($path);

Check notice

Code scanning / Psalm

PossiblyNullPropertyFetch Note

Cannot get property on possibly null variable $this->server of type Sabre\DAV\Server|null
public function prepareUpload($path): void {
$this->uploadFolder = $this->server->tree->getNodeForPath($path);
public function prepareUpload(string $path): void {
$uploadFolder = $this->server->tree->getNodeForPath($path);

Check notice

Code scanning / Psalm

PossiblyNullReference Note

Cannot call method getNodeForPath on possibly null value
@blizzz blizzz added this to the Nextcloud 29 milestone Nov 23, 2023
@blizzz
Copy link
Member

blizzz commented Nov 23, 2023

Please don't forget to set the milestone when opening a PR 😃

/** @var ICache */
private $cache;
private ?Server $server = null;
private ?UploadFolder $uploadFolder;

Check notice

Code scanning / Psalm

PropertyNotSetInConstructor Note

Property OCA\DAV\Upload\ChunkingV2Plugin::$uploadFolder is not defined in constructor of OCA\DAV\Upload\ChunkingV2Plugin or in any private or final methods called in the constructor
This was referenced Mar 12, 2024
@Altahrim Altahrim mentioned this pull request Mar 20, 2024
@skjnldsv skjnldsv modified the milestones: Nextcloud 29, Nextcloud 30 Mar 28, 2024
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2. developing Work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants