3
0
Fork 0
mirror of https://github.com/farmOS/farmOS.git synced 2024-02-23 11:37:38 +01:00

Remove un-needed phpstan ignores.

See https://github.com/mglaman/phpstan-drupal/issues/474
This commit is contained in:
Eric Larese 2023-01-26 14:32:59 -05:00 committed by Michael Stenta
parent 391acb6511
commit 69f12631e2
4 changed files with 0 additions and 8 deletions

View file

@ -151,8 +151,6 @@ class FarmMetricsBlock extends BlockBase implements ContainerFactoryPluginInterf
$query->condition('status', 'active');
}
// @todo https://github.com/mglaman/phpstan-drupal/issues/474
// @phpstan-ignore-next-line
$count = $query->count()->execute();
$route_name = "view.farm_$entity_type.page_type";
$metrics[] = Link::createFromRoute($bundle_info['label'] . ': ' . $count, $route_name, ['arg_0' => $bundle], ['attributes' => ['class' => ['metric', 'button']]])->toString();

View file

@ -63,8 +63,6 @@ class FarmAssetChildrenViewsAccessCheck implements AccessInterface {
// Run a count query to see if there are any assets that reference this
// asset as a parent.
// @todo https://github.com/mglaman/phpstan-drupal/issues/474
// @phpstan-ignore-next-line
$count = $this->assetStorage->getAggregateQuery()
->accessCheck(TRUE)
->condition('parent.entity.id', $asset_id)

View file

@ -62,8 +62,6 @@ class FarmAssetLogViewsAccessCheck implements AccessInterface {
$query->condition($reference_condition);
// Determine access based on the log count.
// @todo https://github.com/mglaman/phpstan-drupal/issues/474
// @phpstan-ignore-next-line
$count = $query->execute();
$access = AccessResult::allowedIf($count > 0);

View file

@ -66,8 +66,6 @@ class UniqueBirthLogConstraintValidator extends ConstraintValidator implements C
// Query the number of birth logs that reference the asset.
// We do not check access to ensure that all matching logs are found.
// @todo https://github.com/mglaman/phpstan-drupal/issues/474
// @phpstan-ignore-next-line
$count = $this->entityTypeManager->getStorage('log')->getAggregateQuery()
->accessCheck(FALSE)
->condition('type', 'birth')