Skip to content

Commit

Permalink
Remove un-needed phpstan ignores.
Browse files Browse the repository at this point in the history
  • Loading branch information
erlarese authored and mstenta committed Jan 27, 2023
1 parent 391acb6 commit 69f1263
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 8 deletions.
2 changes: 0 additions & 2 deletions modules/core/ui/metrics/src/Plugin/Block/FarmMetricsBlock.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,6 @@ protected function getEntityMetrics($entity_type) {
$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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ public function access(RouteMatchInterface $route_match) {

// 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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ public function access(RouteMatchInterface $route_match) {
$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);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ public function validate($value, Constraint $constraint) {

// 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')
Expand Down

0 comments on commit 69f1263

Please sign in to comment.