Skip to content
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
17 changes: 0 additions & 17 deletions build/psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3679,23 +3679,6 @@
<code>count($obd_values) &gt; 0</code>
</RedundantCondition>
</file>
<file src="lib/private/legacy/OC_Image.php">
<ImplementedReturnTypeMismatch occurrences="1">
<code>null|string</code>
</ImplementedReturnTypeMismatch>
<InvalidArrayOffset occurrences="2">
<code>$data[floor($p)]</code>
<code>$data[floor($p)]</code>
</InvalidArrayOffset>
<InvalidScalarArgument occurrences="3">
<code>$this-&gt;bitDepth</code>
<code>$x</code>
<code>$y</code>
</InvalidScalarArgument>
<RedundantCondition occurrences="1">
<code>$isWritable</code>
</RedundantCondition>
</file>
<file src="lib/private/legacy/OC_User.php">
<UndefinedClass occurrences="1">
<code>\Test\Util\User\Dummy</code>
Expand Down
34 changes: 17 additions & 17 deletions lib/private/StreamImage.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class StreamImage implements IStreamImage {
/** @var resource The internal stream */
private $stream;

/** @var string */
/** @var null|string */
private $mimeType;

/** @var int */
Expand All @@ -55,82 +55,82 @@ public function __construct($stream, string $mimeType, int $width, int $height)
}

/** @inheritDoc */
public function valid() {
public function valid(): bool {
return is_resource($this->stream);
}

/** @inheritDoc */
public function mimeType() {
public function mimeType(): ?string {
return $this->mimeType;
}

/** @inheritDoc */
public function width() {
public function width(): int {
return $this->width;
}

/** @inheritDoc */
public function height() {
public function height(): int {
return $this->height;
}

public function widthTopLeft() {
public function widthTopLeft(): int {
throw new \BadMethodCallException('Not implemented');
}

public function heightTopLeft() {
public function heightTopLeft(): int {
throw new \BadMethodCallException('Not implemented');
}

public function show($mimeType = null) {
public function show(?string $mimeType = null): bool {
throw new \BadMethodCallException('Not implemented');
}

public function save($filePath = null, $mimeType = null) {
public function save(?string $filePath = null, ?string $mimeType = null): bool {
throw new \BadMethodCallException('Not implemented');
}

public function resource() {
return $this->stream;
}

public function dataMimeType() {
public function dataMimeType(): ?string {
return $this->mimeType;
}

public function data() {
public function data(): ?string {
return '';
}

public function getOrientation() {
public function getOrientation(): int {
throw new \BadMethodCallException('Not implemented');
}

public function fixOrientation() {
public function fixOrientation(): bool {
throw new \BadMethodCallException('Not implemented');
}

public function resize($maxSize) {
public function resize(int $maxSize): bool {
throw new \BadMethodCallException('Not implemented');
}

public function preciseResize(int $width, int $height): bool {
throw new \BadMethodCallException('Not implemented');
}

public function centerCrop($size = 0) {
public function centerCrop(int $size = 0): bool {
throw new \BadMethodCallException('Not implemented');
}

public function crop(int $x, int $y, int $w, int $h): bool {
throw new \BadMethodCallException('Not implemented');
}

public function fitIn($maxWidth, $maxHeight) {
public function fitIn(int $maxWidth, int $maxHeight): bool {
throw new \BadMethodCallException('Not implemented');
}

public function scaleDownToFit($maxWidth, $maxHeight) {
public function scaleDownToFit(int $maxWidth, int $maxHeight): bool {
throw new \BadMethodCallException('Not implemented');
}

Expand Down
Loading