Skip to content

Commit

Permalink
fix coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
ildyria committed Mar 11, 2025
1 parent 8d0f671 commit c62d6cd
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 2 additions & 0 deletions app/Legacy/V1/Resources/Models/PhotoResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,11 @@ public function toArray($request)
{
/** @var SizeVariants|MissingValue $size_variants */
$size_variants = $this->whenLoaded('size_variants');
// @codeCoverageIgnoreStart
if ($size_variants instanceof MissingValue) {
$size_variants = null;
}
// @codeCoverageIgnoreEnd
$downgrade = !Gate::check(PhotoPolicy::CAN_ACCESS_FULL_PHOTO, [Photo::class, $this->resource]) &&
!$this->resource->isVideo() &&
$size_variants?->hasMedium() === true;
Expand Down
7 changes: 7 additions & 0 deletions app/Services/Archives/Zip21Trait.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@
use Composer\Semver\VersionParser;
use ZipStream\ZipStream;

/**
* This code is untestable as it is tightly coupled with the ZipStream version.
* Tests are run with ZipStream version 3.1+.
* This code has been tested manually by the developer.
*
* @codeCoverageIgnore
*/
trait Zip21Trait
{
/**
Expand Down
4 changes: 2 additions & 2 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ coverage:
patch: off
project:
default:
target: 80%
target: 90%
ignore:
- "^app/Console/.*"
- "^app/Exceptions/.*"
Expand All @@ -32,7 +32,7 @@ ignore:
- "^app/Notifications/.*"
# Legacy shit
- "^app/Legacy/Actions/Photo/.*"
- "^app/Livewire/.*"
- "^app/Legacy/Lang/.*"
- "^app/View/.*"
parsers:
gcov:
Expand Down

0 comments on commit c62d6cd

Please sign in to comment.