Skip to content

Commit bde312a

Browse files
jenkins-botGerrit Code Review
authored andcommitted
Merge "REST: Rename newStatementNotFoundError() method"
2 parents fd05f74 + 7d8c01b commit bde312a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

repo/rest-api/src/UseCases/GetItemStatement/GetItemStatement.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,16 @@ public function execute( GetItemStatementRequest $statementRequest ): GetItemSta
5252
"Could not find an item with the ID: {$itemId}"
5353
);
5454
}
55-
$this->newStatementNotFoundError( $statementRequest->getStatementId() );
55+
$this->throwStatementNotFoundException( $statementRequest->getStatementId() );
5656
}
5757

5858
if ( !$itemId->equals( $statementId->getEntityId() ) ) {
59-
$this->newStatementNotFoundError( $statementRequest->getStatementId() );
59+
$this->throwStatementNotFoundException( $statementRequest->getStatementId() );
6060
}
6161

6262
$statement = $this->statementRetriever->getStatement( $statementId );
6363
if ( !$statement ) {
64-
$this->newStatementNotFoundError( $statementRequest->getStatementId() );
64+
$this->throwStatementNotFoundException( $statementRequest->getStatementId() );
6565
}
6666

6767
return new GetItemStatementResponse(
@@ -74,7 +74,7 @@ public function execute( GetItemStatementRequest $statementRequest ): GetItemSta
7474
/**
7575
* @throws UseCaseException
7676
*/
77-
private function newStatementNotFoundError( string $statementId ): void {
77+
private function throwStatementNotFoundException( string $statementId ): void {
7878
throw new UseCaseException(
7979
ErrorResponse::STATEMENT_NOT_FOUND,
8080
"Could not find a statement with the ID: $statementId"

0 commit comments

Comments
 (0)