Skip to content

Commit

Permalink
Fix PHPStan: Variable $asset in empty() always exists and is not falsy.
Browse files Browse the repository at this point in the history
  • Loading branch information
mstenta committed Mar 15, 2024
1 parent a1fc543 commit 0a6de04
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/CropPlan.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,6 @@ public function getCropPlantingsByLocation(PlanInterface $plan): array {
* {@inheritdoc}
*/
public function getLogs(AssetInterface $asset, bool $access_check = TRUE): array {
if (empty($asset)) {
return [];
}
$query = $this->logQueryFactory->getQuery(['asset' => $asset]);
$query->accessCheck($access_check);
$log_ids = $query->execute();
Expand All @@ -108,9 +105,6 @@ public function getLogs(AssetInterface $asset, bool $access_check = TRUE): array
* {@inheritdoc}
*/
public function getFirstLog(AssetInterface $asset, string $log_type = NULL, bool $access_check = TRUE) {
if (empty($asset)) {
return [];
}
$options = [
'asset' => $asset,
'limit' => 1,
Expand Down

0 comments on commit 0a6de04

Please sign in to comment.