Skip to content
Snippets Groups Projects
Verified Commit 9b485ec7 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3283794 by mondrake, longwave: Fix 'should return {type} but return...

Issue #3283794 by mondrake, longwave: Fix 'should return {type} but return statement is missing' PHPStan L0 errors in test code
parent 60d6c151
No related branches found
No related tags found
No related merge requests found
Showing
with 23 additions and 6 deletions
......@@ -109,6 +109,7 @@ protected function getExpectedNormalizedEntity() {
*/
protected function getNormalizedPostEntity() {
// @todo Update in https://www.drupal.org/node/2300677.
return [];
}
/**
......
......@@ -66,6 +66,7 @@ protected function getExpectedNormalizedEntity() {
*/
protected function getNormalizedPostEntity() {
// @todo Update in https://www.drupal.org/node/2300677.
return [];
}
}
......@@ -179,9 +179,7 @@ public function postComment(EntityInterface $entity, $comment, $subject = '', $c
$this->assertArrayHasKey(1, $match);
}
if (isset($match[1])) {
return Comment::load($match[1]);
}
return Comment::load($match[1]);
}
/**
......
......@@ -317,16 +317,17 @@ public function testPostDxWithoutCriticalBaseFields() {
*/
protected function getExpectedUnauthorizedAccessMessage($method) {
switch ($method) {
case 'GET';
case 'GET':
return "The 'access comments' permission is required and the comment must be published.";
case 'POST';
case 'POST':
return "The 'post comments' permission is required.";
case 'PATCH';
case 'PATCH':
return "The 'edit own comments' permission is required, the user must be the comment author, and the comment must be published.";
case 'DELETE':
default:
// \Drupal\comment\CommentAccessControlHandler::checkAccess() does not
// specify a reason for not allowing a comment to be deleted.
return '';
......
......@@ -72,6 +72,7 @@ protected function getExpectedNormalizedEntity() {
*/
protected function getNormalizedPostEntity() {
// @todo Update in https://www.drupal.org/node/2300677.
return [];
}
}
......@@ -68,6 +68,7 @@ protected function getExpectedNormalizedEntity() {
*/
protected function getNormalizedPostEntity() {
// @todo Update in https://www.drupal.org/node/2300677.
return [];
}
/**
......
......@@ -85,6 +85,7 @@ protected function getExpectedNormalizedEntity() {
*/
protected function getNormalizedPostEntity() {
// @todo Update in https://www.drupal.org/node/2300677.
return [];
}
/**
......
......@@ -122,6 +122,7 @@ protected function getExpectedNormalizedEntity() {
*/
protected function getNormalizedPostEntity() {
// @todo Update in https://www.drupal.org/node/2300677.
return [];
}
/**
......
......@@ -94,6 +94,7 @@ protected function getExpectedNormalizedEntity() {
*/
protected function getNormalizedPostEntity() {
// @todo Update in https://www.drupal.org/node/2300677.
return [];
}
/**
......
......@@ -73,6 +73,7 @@ protected function getExpectedNormalizedEntity() {
*/
protected function getNormalizedPostEntity() {
// @todo Update in https://www.drupal.org/node/2300677.
return [];
}
/**
......
......@@ -83,6 +83,7 @@ protected function getExpectedNormalizedEntity() {
*/
protected function getNormalizedPostEntity() {
// @todo Update in https://www.drupal.org/node/2300677.
return [];
}
}
......@@ -99,6 +99,7 @@ protected function getExpectedNormalizedEntity() {
*/
protected function getNormalizedPostEntity() {
// @todo Update in https://www.drupal.org/node/2300677.
return [];
}
/**
......
......@@ -112,6 +112,7 @@ protected function getExpectedDocument() {
*/
protected function getPostDocument() {
// @todo Update in https://www.drupal.org/node/2300677.
return [];
}
}
......@@ -123,6 +123,7 @@ protected function getExpectedDocument() {
*/
protected function getPostDocument() {
// @todo Update in https://www.drupal.org/node/2300677.
return [];
}
/**
......
......@@ -103,6 +103,7 @@ protected function getExpectedDocument() {
*/
protected function getPostDocument() {
// @todo Update in https://www.drupal.org/node/2300677.
return [];
}
}
......@@ -136,6 +136,7 @@ protected function getExpectedDocument() {
*/
protected function getPostDocument() {
// @todo Update once https://www.drupal.org/node/2300677 is fixed.
return [];
}
/**
......
......@@ -104,6 +104,7 @@ protected function getExpectedDocument() {
*/
protected function getPostDocument() {
// @todo Update in https://www.drupal.org/node/2300677.
return [];
}
}
......@@ -116,6 +116,7 @@ protected function getExpectedDocument() {
*/
protected function getPostDocument() {
// @todo Update in https://www.drupal.org/node/2300677.
return [];
}
}
......@@ -105,6 +105,7 @@ protected function getExpectedDocument() {
*/
protected function getPostDocument() {
// @todo Update in https://www.drupal.org/node/2300677.
return [];
}
/**
......
......@@ -112,6 +112,7 @@ protected function getExpectedDocument() {
*/
protected function getPostDocument() {
// @todo Update in https://www.drupal.org/node/2300677.
return [];
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment