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

More fixes #13

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
3 changes: 2 additions & 1 deletion src/Model/UploadModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace VC4A\Model;

use InvalidArgumentException;
use VC4A\Model\DocumentsModel;

class UploadModel extends ModelAbstract
{
Expand Down Expand Up @@ -44,6 +43,7 @@ public function create(array $data): array

/**
* @return array
* @throws InvalidArgumentException
*/
public function validate(array $data): array
{
Expand All @@ -60,6 +60,7 @@ public function validate(array $data): array
/**
* @param array $data
* @return array
* @throws InvalidArgumentException
*/
public function sanitize(array $data) : array
{
Expand Down
3 changes: 3 additions & 0 deletions src/Repository/MySQLRepositoryAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@

abstract class MySQLRepositoryAbstract implements MySQLRepositoryInterface
{
/** @var PDO */
private $pdo;

/**
* @param PDO $pdo
*/
Expand Down
8 changes: 7 additions & 1 deletion src/Repository/UploadRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace VC4A\Repository;

use Exception;
use RuntimeException;

class UploadRepository implements RepositoryInterface
{
Expand All @@ -12,6 +13,7 @@ class UploadRepository implements RepositoryInterface
/**
* @param array $data
* @return array
* @throws Exception
*/
public function create(array $data): array
{
Expand All @@ -32,8 +34,12 @@ protected function moveUploadedFile(string $from, string $to): bool
return move_uploaded_file($from, self::UPLOADS_DIR . basename($to));
}

/**
* @return array
* @throws RuntimeException
*/
public function all(): array
{
throw new Exception('Method not implemented');
throw new RuntimeException('Method not implemented');
}
}