Skip to content

Commit

Permalink
CS Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
shinde-rahul committed Jan 2, 2023
1 parent 9edbf42 commit 1949b28
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/bundles/LeadBundle/Model/LeadModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -1209,9 +1209,9 @@ public function addToCategory(Lead $lead, $categories, $subscribedFlag = true)

$dispatchEvent = false;

/** @var LeadCategory $leadCategory */
/** @var ?LeadCategory $leadCategory */
$leadCategory = $this->getLeadCategoryRepository()->findOneBy(['lead' => $lead, 'category' => $category]);
if (!$leadCategory) {
if (is_null($leadCategory)) {
$dispatchEvent = true;

$newLeadCategory = new LeadCategory();
Expand All @@ -1226,7 +1226,7 @@ public function addToCategory(Lead $lead, $categories, $subscribedFlag = true)

$leadCategory->setManuallyAdded($subscribedFlag);
$leadCategory->setManuallyRemoved(!$subscribedFlag);
$newLeadCategory->setDateAdded(new \DateTime());
$leadCategory->setDateAdded(new \DateTime());
$results[$category->getId()] = $leadCategory;
}

Expand Down

0 comments on commit 1949b28

Please sign in to comment.