• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

nepada / file-upload-control / 6754031182

04 Nov 2023 09:26AM UTC coverage: 89.525%. Remained the same
6754031182

Pull #133

github

web-flow
Bump actions/setup-node from 3 to 4

Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3 to 4.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Pull Request #133: Bump actions/setup-node from 3 to 4

641 of 716 relevant lines covered (89.53%)

0.9 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

86.67
/src/FileUploadControl/Storage/FileUploadChunk.php
1
<?php
2
declare(strict_types = 1);
3

4
namespace Nepada\FileUploadControl\Storage;
5

6
use Nette;
7

8
final class FileUploadChunk
9
{
10

11
    use Nette\SmartObject;
12

13
    public readonly Nette\Http\FileUpload $fileUpload;
14

15
    public readonly ContentRange $contentRange;
16

17
    private function __construct(Nette\Http\FileUpload $fileUpload, ContentRange $contentRange)
1✔
18
    {
19
        if ($fileUpload->getSize() !== $contentRange->getRangeSize()) {
1✔
20
            throw new \InvalidArgumentException(sprintf(
1✔
21
                'Content range size of %d does not match file upload size %d.',
1✔
22
                $contentRange->getRangeSize(),
1✔
23
                $fileUpload->getSize(),
1✔
24
            ));
25
        }
26

27
        $this->fileUpload = $fileUpload;
1✔
28
        $this->contentRange = $contentRange;
1✔
29
    }
1✔
30

31
    public static function completeUpload(Nette\Http\FileUpload $fileUpload): self
1✔
32
    {
33
        return new self($fileUpload, ContentRange::ofSize($fileUpload->getSize()));
1✔
34
    }
35

36
    public static function partialUpload(Nette\Http\FileUpload $fileUpload, ContentRange $contentRange): self
1✔
37
    {
38
        return new self($fileUpload, $contentRange);
1✔
39
    }
40

41
    /**
42
     * @deprecated read the property directly instead
43
     */
44
    public function getFileUpload(): Nette\Http\FileUpload
45
    {
46
        return $this->fileUpload;
×
47
    }
48

49
    /**
50
     * @deprecated read the property directly instead
51
     */
52
    public function getContentRange(): ContentRange
53
    {
54
        return $this->contentRange;
×
55
    }
56

57
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc