Skip to content

Commit

Permalink
Merge "REST: Move request validation code to a new namespace"
Browse files Browse the repository at this point in the history
  • Loading branch information
jenkins-bot authored and Gerrit Code Review committed Sep 20, 2023
2 parents 6afafbe + 9996623 commit 185e205
Show file tree
Hide file tree
Showing 140 changed files with 325 additions and 340 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php declare( strict_types=1 );

namespace Wikibase\Repo\RestApi\Application\UseCases;
namespace Wikibase\Repo\RestApi\Application\UseCaseRequestValidation;

use Wikibase\Repo\RestApi\Domain\Model\UserProvidedEditMetadata;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php declare( strict_types=1 );

namespace Wikibase\Repo\RestApi\Application\UseCases;
namespace Wikibase\Repo\RestApi\Application\UseCaseRequestValidation;

use Wikibase\DataModel\Term\Term;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php declare( strict_types=1 );

namespace Wikibase\Repo\RestApi\Application\UseCases;
namespace Wikibase\Repo\RestApi\Application\UseCaseRequestValidation;

/**
* @license GPL-2.0-or-later
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php declare( strict_types=1 );

namespace Wikibase\Repo\RestApi\Application\UseCases;
namespace Wikibase\Repo\RestApi\Application\UseCaseRequestValidation;

use Wikibase\DataModel\Entity\ItemId;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php declare( strict_types=1 );

namespace Wikibase\Repo\RestApi\Application\UseCases;
namespace Wikibase\Repo\RestApi\Application\UseCaseRequestValidation;

use Wikibase\DataModel\Term\Term;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php declare( strict_types=1 );

namespace Wikibase\Repo\RestApi\Application\UseCases;
namespace Wikibase\Repo\RestApi\Application\UseCaseRequestValidation;

/**
* @license GPL-2.0-or-later
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php declare( strict_types=1 );

namespace Wikibase\Repo\RestApi\Application\UseCases;
namespace Wikibase\Repo\RestApi\Application\UseCaseRequestValidation;

/**
* @license GPL-2.0-or-later
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php declare( strict_types=1 );

namespace Wikibase\Repo\RestApi\Application\UseCases;
namespace Wikibase\Repo\RestApi\Application\UseCaseRequestValidation;

/**
* @license GPL-2.0-or-later
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php declare( strict_types=1 );

namespace Wikibase\Repo\RestApi\Application\UseCases;
namespace Wikibase\Repo\RestApi\Application\UseCaseRequestValidation;

use Wikibase\DataModel\Entity\PropertyId;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php declare( strict_types=1 );

namespace Wikibase\Repo\RestApi\Application\UseCases;
namespace Wikibase\Repo\RestApi\Application\UseCaseRequestValidation;

use Wikibase\DataModel\Entity\NumericPropertyId;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php declare( strict_types=1 );

namespace Wikibase\Repo\RestApi\Application\UseCases\RequestValidation;
namespace Wikibase\Repo\RestApi\Application\UseCaseRequestValidation;

use LogicException;
use Wikibase\DataModel\Entity\ItemId;
Expand All @@ -11,7 +11,6 @@
use Wikibase\DataModel\Term\Term;
use Wikibase\Repo\RestApi\Application\UseCases\AddItemStatement\DeserializedAddItemStatementRequest;
use Wikibase\Repo\RestApi\Application\UseCases\AddPropertyStatement\DeserializedAddPropertyStatementRequest;
use Wikibase\Repo\RestApi\Application\UseCases\EditMetadataRequest;
use Wikibase\Repo\RestApi\Application\UseCases\GetItem\DeserializedGetItemRequest;
use Wikibase\Repo\RestApi\Application\UseCases\GetItemAliases\DeserializedGetItemAliasesRequest;
use Wikibase\Repo\RestApi\Application\UseCases\GetItemAliasesInLanguage\DeserializedGetItemAliasesInLanguageRequest;
Expand All @@ -25,26 +24,15 @@
use Wikibase\Repo\RestApi\Application\UseCases\GetPropertyLabels\DeserializedGetPropertyLabelsRequest;
use Wikibase\Repo\RestApi\Application\UseCases\GetPropertyStatement\DeserializedGetPropertyStatementRequest;
use Wikibase\Repo\RestApi\Application\UseCases\GetPropertyStatements\DeserializedGetPropertyStatementsRequest;
use Wikibase\Repo\RestApi\Application\UseCases\ItemDescriptionEditRequest;
use Wikibase\Repo\RestApi\Application\UseCases\ItemFieldsRequest;
use Wikibase\Repo\RestApi\Application\UseCases\ItemIdRequest;
use Wikibase\Repo\RestApi\Application\UseCases\ItemLabelEditRequest;
use Wikibase\Repo\RestApi\Application\UseCases\LanguageCodeRequest;
use Wikibase\Repo\RestApi\Application\UseCases\PatchItemLabels\DeserializedPatchItemLabelsRequest;
use Wikibase\Repo\RestApi\Application\UseCases\PatchItemStatement\DeserializedPatchItemStatementRequest;
use Wikibase\Repo\RestApi\Application\UseCases\PatchPropertyStatement\DeserializedPatchPropertyStatementRequest;
use Wikibase\Repo\RestApi\Application\UseCases\PatchRequest;
use Wikibase\Repo\RestApi\Application\UseCases\PropertyFieldsRequest;
use Wikibase\Repo\RestApi\Application\UseCases\PropertyIdFilterRequest;
use Wikibase\Repo\RestApi\Application\UseCases\PropertyIdRequest;
use Wikibase\Repo\RestApi\Application\UseCases\RemoveItemStatement\DeserializedRemoveItemStatementRequest;
use Wikibase\Repo\RestApi\Application\UseCases\RemovePropertyStatement\DeserializedRemovePropertyStatementRequest;
use Wikibase\Repo\RestApi\Application\UseCases\ReplaceItemStatement\DeserializedReplaceItemStatementRequest;
use Wikibase\Repo\RestApi\Application\UseCases\ReplacePropertyStatement\DeserializedReplacePropertyStatementRequest;
use Wikibase\Repo\RestApi\Application\UseCases\SetItemDescription\DeserializedSetItemDescriptionRequest;
use Wikibase\Repo\RestApi\Application\UseCases\SetItemLabel\DeserializedSetItemLabelRequest;
use Wikibase\Repo\RestApi\Application\UseCases\StatementIdRequest;
use Wikibase\Repo\RestApi\Application\UseCases\StatementSerializationRequest;
use Wikibase\Repo\RestApi\Domain\Model\UserProvidedEditMetadata;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php declare( strict_types=1 );

namespace Wikibase\Repo\RestApi\Application\UseCases;
namespace Wikibase\Repo\RestApi\Application\UseCaseRequestValidation;

use Wikibase\DataModel\Statement\StatementGuid;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php declare( strict_types=1 );

namespace Wikibase\Repo\RestApi\Application\UseCases;
namespace Wikibase\Repo\RestApi\Application\UseCaseRequestValidation;

use Wikibase\DataModel\Statement\Statement;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php declare( strict_types=1 );

namespace Wikibase\Repo\RestApi\Application\UseCases;
namespace Wikibase\Repo\RestApi\Application\UseCaseRequestValidation;

/**
* @license GPL-2.0-or-later
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<?php declare( strict_types=1 );

namespace Wikibase\Repo\RestApi\Application\UseCases\RequestValidation;
namespace Wikibase\Repo\RestApi\Application\UseCaseRequestValidation;

use Wikibase\Repo\RestApi\Application\UseCases\EditMetadataRequest;
use Wikibase\Repo\RestApi\Application\UseCases\UseCaseError;
use Wikibase\Repo\RestApi\Application\Validation\EditMetadataValidator;
use Wikibase\Repo\RestApi\Domain\Model\User;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php declare( strict_types=1 );

namespace Wikibase\Repo\RestApi\Application\UseCases\RequestValidation;
namespace Wikibase\Repo\RestApi\Application\UseCaseRequestValidation;

use Wikibase\Repo\RestApi\Application\UseCases\UseCaseError;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php declare( strict_types=1 );

namespace Wikibase\Repo\RestApi\Application\UseCases;
namespace Wikibase\Repo\RestApi\Application\UseCaseRequestValidation;

/**
* @license GPL-2.0-or-later
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<?php declare( strict_types=1 );

namespace Wikibase\Repo\RestApi\Application\UseCases\RequestValidation;
namespace Wikibase\Repo\RestApi\Application\UseCaseRequestValidation;

use LogicException;
use Wikibase\DataModel\Entity\ItemId;
use Wikibase\DataModel\Term\Term;
use Wikibase\Repo\RestApi\Application\UseCases\ItemDescriptionEditRequest;
use Wikibase\Repo\RestApi\Application\UseCases\UseCaseError;
use Wikibase\Repo\RestApi\Application\Validation\ItemDescriptionValidator;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php declare( strict_types=1 );

namespace Wikibase\Repo\RestApi\Application\UseCases;
namespace Wikibase\Repo\RestApi\Application\UseCaseRequestValidation;

/**
* @license GPL-2.0-or-later
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php declare( strict_types=1 );

namespace Wikibase\Repo\RestApi\Application\UseCases;
namespace Wikibase\Repo\RestApi\Application\UseCaseRequestValidation;

/**
* @license GPL-2.0-or-later
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<?php declare( strict_types=1 );

namespace Wikibase\Repo\RestApi\Application\UseCases\RequestValidation;
namespace Wikibase\Repo\RestApi\Application\UseCaseRequestValidation;

use Wikibase\DataModel\Entity\ItemId;
use Wikibase\Repo\RestApi\Application\UseCases\ItemIdRequest;
use Wikibase\Repo\RestApi\Application\UseCases\UseCaseError;
use Wikibase\Repo\RestApi\Application\Validation\ItemIdValidator;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php declare( strict_types=1 );

namespace Wikibase\Repo\RestApi\Application\UseCases;
namespace Wikibase\Repo\RestApi\Application\UseCaseRequestValidation;

/**
* @license GPL-2.0-or-later
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<?php declare( strict_types=1 );

namespace Wikibase\Repo\RestApi\Application\UseCases\RequestValidation;
namespace Wikibase\Repo\RestApi\Application\UseCaseRequestValidation;

use LogicException;
use Wikibase\DataModel\Entity\ItemId;
use Wikibase\DataModel\Term\Term;
use Wikibase\Repo\RestApi\Application\UseCases\ItemLabelEditRequest;
use Wikibase\Repo\RestApi\Application\UseCases\UseCaseError;
use Wikibase\Repo\RestApi\Application\Validation\ItemLabelValidator;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php declare( strict_types=1 );

namespace Wikibase\Repo\RestApi\Application\UseCases;
namespace Wikibase\Repo\RestApi\Application\UseCaseRequestValidation;

/**
* @license GPL-2.0-or-later
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<?php declare( strict_types=1 );

namespace Wikibase\Repo\RestApi\Application\UseCases\RequestValidation;
namespace Wikibase\Repo\RestApi\Application\UseCaseRequestValidation;

use Wikibase\Repo\RestApi\Application\UseCases\LanguageCodeRequest;
use Wikibase\Repo\RestApi\Application\UseCases\UseCaseError;
use Wikibase\Repo\RestApi\Application\Validation\LanguageCodeValidator;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<?php declare( strict_types=1 );

namespace Wikibase\Repo\RestApi\Application\UseCases\RequestValidation;
namespace Wikibase\Repo\RestApi\Application\UseCaseRequestValidation;

use Wikibase\Repo\RestApi\Application\UseCases\UseCaseError;
use Wikibase\Repo\RestApi\Application\UseCases\UseCaseRequest;

/**
* @license GPL-2.0-or-later
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php declare( strict_types=1 );

namespace Wikibase\Repo\RestApi\Application\UseCases;
namespace Wikibase\Repo\RestApi\Application\UseCaseRequestValidation;

/**
* @license GPL-2.0-or-later
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<?php declare( strict_types=1 );

namespace Wikibase\Repo\RestApi\Application\UseCases\RequestValidation;
namespace Wikibase\Repo\RestApi\Application\UseCaseRequestValidation;

use LogicException;
use Wikibase\Repo\RestApi\Application\UseCases\PatchRequest;
use Wikibase\Repo\RestApi\Application\UseCases\UseCaseError;
use Wikibase\Repo\RestApi\Application\Validation\JsonPatchValidator;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php declare( strict_types=1 );

namespace Wikibase\Repo\RestApi\Application\UseCases;
namespace Wikibase\Repo\RestApi\Application\UseCaseRequestValidation;

/**
* @license GPL-2.0-or-later
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php declare( strict_types=1 );

namespace Wikibase\Repo\RestApi\Application\UseCases;
namespace Wikibase\Repo\RestApi\Application\UseCaseRequestValidation;

/**
* @license GPL-2.0-or-later
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php declare( strict_types=1 );

namespace Wikibase\Repo\RestApi\Application\UseCases;
namespace Wikibase\Repo\RestApi\Application\UseCaseRequestValidation;

/**
* @license GPL-2.0-or-later
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php declare( strict_types=1 );

namespace Wikibase\Repo\RestApi\Application\UseCases\RequestValidation;
namespace Wikibase\Repo\RestApi\Application\UseCaseRequestValidation;

use Wikibase\DataModel\Entity\NumericPropertyId;
use Wikibase\Repo\RestApi\Application\UseCases\UseCaseError;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php declare( strict_types=1 );

namespace Wikibase\Repo\RestApi\Application\UseCases;
namespace Wikibase\Repo\RestApi\Application\UseCaseRequestValidation;

/**
* @license GPL-2.0-or-later
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<?php declare( strict_types=1 );

namespace Wikibase\Repo\RestApi\Application\UseCases\RequestValidation;
namespace Wikibase\Repo\RestApi\Application\UseCaseRequestValidation;

use Wikibase\DataModel\Services\Statement\StatementGuidParser;
use Wikibase\DataModel\Statement\StatementGuid;
use Wikibase\Repo\RestApi\Application\UseCases\StatementIdRequest;
use Wikibase\Repo\RestApi\Application\UseCases\UseCaseError;
use Wikibase\Repo\RestApi\Application\Validation\StatementIdValidator;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php declare( strict_types=1 );

namespace Wikibase\Repo\RestApi\Application\UseCases;
namespace Wikibase\Repo\RestApi\Application\UseCaseRequestValidation;

/**
* @license GPL-2.0-or-later
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<?php declare( strict_types=1 );

namespace Wikibase\Repo\RestApi\Application\UseCases\RequestValidation;
namespace Wikibase\Repo\RestApi\Application\UseCaseRequestValidation;

use LogicException;
use Wikibase\DataModel\Statement\Statement;
use Wikibase\Repo\RestApi\Application\UseCases\StatementSerializationRequest;
use Wikibase\Repo\RestApi\Application\UseCases\UseCaseError;
use Wikibase\Repo\RestApi\Application\Validation\StatementValidator;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php declare( strict_types=1 );

namespace Wikibase\Repo\RestApi\Application\UseCases;
namespace Wikibase\Repo\RestApi\Application\UseCaseRequestValidation;

/**
* @license GPL-2.0-or-later
Expand Down
Loading

0 comments on commit 185e205

Please sign in to comment.