Skip to content
Snippets Groups Projects
Commit 78736678 authored by Bojan Zivanovic's avatar Bojan Zivanovic
Browse files

Make phpcs happier.

parent ec97e587
No related branches found
No related tags found
No related merge requests found
......@@ -69,6 +69,20 @@ class EntityRevisionRouteAccessChecker implements AccessInterface {
}
}
/**
* Performs access checks.
*
* @param \Drupal\Core\Entity\ContentEntityInterface $entity
* The entity for which to check access.
* @param \Drupal\Core\Session\AccountInterface $account
* The user for which to check access.
* @param string $operation
* The entity operation. Usually one of 'view', 'view label', 'update' or
* 'delete'.
*
* @return bool
* The access result.
*/
protected function checkAccess(ContentEntityInterface $entity, AccountInterface $account, $operation = 'view') {
$entity_type = $entity->getEntityType();
$entity_type_id = $entity->getEntityTypeId();
......@@ -126,7 +140,6 @@ class EntityRevisionRouteAccessChecker implements AccessInterface {
return $this->accessCache[$cid];
}
/**
* Counts the number of revisions in the default language.
*
......
......@@ -60,7 +60,7 @@ class BundlePluginUninstallValidator implements ModuleUninstallValidatorInterfac
});
$bundles_with_content = array_intersect_key($bundles_filtered_by_module, array_flip($bundle_keys_with_content));
foreach ($bundles_with_content as $bundle) {
$reasons[] = $this->t('There is data for the bundle @bundle on the entity type @entity_type. Please remove all content before uninstalling the module.', [
'@bundle' => $bundle['label'],
......
......@@ -3,12 +3,10 @@
namespace Drupal\entity;
use Drupal\Core\Access\AccessResult;
use Drupal\Core\Entity\EntityAccessControlHandler as CoreEntityAccessControlHandler;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Entity\EntityPublishedInterface;
use Drupal\Core\Entity\EntityTypeInterface;
use Drupal\Core\Session\AccountInterface;
use Drupal\user\EntityOwnerInterface;
/**
* Controls access based on the generic entity permissions.
......
......@@ -43,9 +43,10 @@ class RevisionableContentEntityForm extends ContentEntityForm {
}
/**
* Returns the bundle entity of the entity, or NULL if there is none.
* Gets the bundle entity of the current entity.
*
* @return \Drupal\Core\Entity\EntityInterface|null
* The bundle entity, or NULL if there is none.
*/
protected function getBundleEntity() {
if ($bundle_key = $this->entity->getEntityType()->getKey('bundle')) {
......
......@@ -44,7 +44,7 @@ class DeleteAction extends ActionBase implements ContainerFactoryPluginInterface
* The plugin implementation definition.
* @param \Drupal\Core\TempStore\PrivateTempStoreFactory $temp_store_factory
* The tempstore factory.
* @param AccountInterface $current_user
* @param \Drupal\Core\Session\AccountInterface $current_user
* Current user.
*/
public function __construct(array $configuration, $plugin_id, $plugin_definition, PrivateTempStoreFactory $temp_store_factory, AccountInterface $current_user) {
......
......@@ -3,12 +3,10 @@
namespace Drupal\entity;
use Drupal\Core\Access\AccessResult;
use Drupal\Core\Entity\EntityAccessControlHandler as CoreEntityAccessControlHandler;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Entity\EntityPublishedInterface;
use Drupal\Core\Entity\EntityTypeInterface;
use Drupal\Core\Session\AccountInterface;
use Drupal\user\EntityOwnerInterface;
/**
* Controls access based on the uncacheable entity permissions.
......
......@@ -23,7 +23,7 @@ class RevisionRouteAccessTest extends BrowserTestBase {
/**
* The current user.
*
* @var \Drupal\Core\Session\AccountInterface;
* @var \Drupal\Core\Session\AccountInterface
*/
protected $account;
......
......@@ -11,6 +11,7 @@ use Drupal\KernelTests\KernelTestBase;
/**
* Tests the delete entity action.
*
* @group entity
*/
class DeleteActionTest extends KernelTestBase {
......@@ -25,8 +26,9 @@ class DeleteActionTest extends KernelTestBase {
/**
* {@inheritdoc}
*/
public static $modules = ['action', 'node', 'entity_module_test', 'entity',
'user', 'system'];
public static $modules = [
'action', 'node', 'entity_module_test', 'entity', 'user', 'system',
];
/**
* {@inheritdoc}
......
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