Skip to content

Commit

Permalink
Updated mixed type with appropriate types
Browse files Browse the repository at this point in the history
  • Loading branch information
shinde-rahul committed Jun 19, 2023
1 parent e5f5bd6 commit 22689f7
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 40 deletions.
6 changes: 1 addition & 5 deletions app/bundles/CampaignBundle/Entity/Campaign.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,7 @@ public function convertToArray()
return get_object_vars($this);
}

/**
* @param string $prop
* @param mixed $val
*/
protected function isChanged($prop, $val)
protected function isChanged(string $prop, float|bool|int|string|null $val): void
{
$getter = 'get'.ucfirst($prop);
$current = $this->$getter();
Expand Down
6 changes: 1 addition & 5 deletions app/bundles/CoreBundle/Entity/CommonEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,7 @@ public function __toString()
return $string;
}

/**
* @param string $prop
* @param mixed $val
*/
protected function isChanged($prop, $val)
protected function isChanged(string $prop, float|bool|int|string|null $val): void
{
$getter = (method_exists($this, $prop)) ? $prop : 'get'.ucfirst($prop);
$current = $this->$getter();
Expand Down
2 changes: 1 addition & 1 deletion app/bundles/DynamicContentBundle/Entity/DynamicContent.php
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ public static function loadApiMetadata(ApiMetadataDriver $metadata)
->build();
}

protected function isChanged($prop, $val)
protected function isChanged(string $prop, float|bool|int|string|null $val): void
{
$getter = 'get'.ucfirst($prop);
$current = $this->$getter();
Expand Down
2 changes: 1 addition & 1 deletion app/bundles/EmailBundle/Entity/Email.php
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ public static function loadApiMetadata(ApiMetadataDriver $metadata)
->build();
}

protected function isChanged($prop, $val)
protected function isChanged(string $prop, float|bool|int|string|null $val): void
{
$getter = 'get'.ucfirst($prop);
$current = $this->$getter();
Expand Down
2 changes: 1 addition & 1 deletion app/bundles/FormBundle/Entity/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ public static function loadApiMetadata(ApiMetadataDriver $metadata)
->build();
}

protected function isChanged($prop, $val)
protected function isChanged(string $prop, float|bool|int|string|null $val): void
{
if ('actions' == $prop || 'fields' == $prop) {
// changes are already computed so just add them
Expand Down
6 changes: 1 addition & 5 deletions app/bundles/LeadBundle/Entity/Company.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,11 +181,7 @@ public static function getDefaultIdentifierFields(): array
];
}

/**
* @param string $prop
* @param mixed $val
*/
protected function isChanged($prop, $val)
protected function isChanged(string $prop, float|bool|int|string|null $val): void
{
$getter = 'get'.ucfirst($prop);
$current = $this->$getter();
Expand Down
7 changes: 1 addition & 6 deletions app/bundles/LeadBundle/Entity/Lead.php
Original file line number Diff line number Diff line change
Expand Up @@ -470,12 +470,7 @@ public static function getDefaultIdentifierFields(): array
];
}

/**
* @param string $prop
* @param mixed $val
* @param null $oldValue
*/
protected function isChanged($prop, $val, $oldValue = null)
protected function isChanged(string $prop, float|bool|int|string|null $val): void
{
$getter = 'get'.ucfirst($prop);
$current = null !== $oldValue ? $oldValue : $this->$getter();
Expand Down
2 changes: 1 addition & 1 deletion app/bundles/NotificationBundle/Entity/Notification.php
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ public static function loadApiMetadata(ApiMetadataDriver $metadata)
->build();
}

protected function isChanged($prop, $val)
protected function isChanged(string $prop, float|bool|int|string|null $val): void
{
$getter = 'get'.ucfirst($prop);
$current = $this->$getter();
Expand Down
2 changes: 1 addition & 1 deletion app/bundles/PageBundle/Entity/Page.php
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@ public function getTemplate()
return $this->template;
}

protected function isChanged($prop, $val)
protected function isChanged(string $prop, float|bool|int|string|null $val): void
{
$getter = 'get'.ucfirst($prop);
$current = $this->$getter();
Expand Down
6 changes: 1 addition & 5 deletions app/bundles/PointBundle/Entity/Trigger.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,7 @@ public static function loadApiMetadata(ApiMetadataDriver $metadata)
->build();
}

/**
* @param string $prop
* @param mixed $val
*/
protected function isChanged($prop, $val)
protected function isChanged(string $prop, float|bool|int|string|null $val): void
{
if ('events' == $prop) {
// changes are already computed so just add them
Expand Down
2 changes: 1 addition & 1 deletion app/bundles/SmsBundle/Entity/Sms.php
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ public static function loadApiMetadata(ApiMetadataDriver $metadata)
->build();
}

protected function isChanged($prop, $val)
protected function isChanged(string $prop, float|bool|int|string|null $val): void
{
$getter = 'get'.ucfirst($prop);
$current = $this->$getter();
Expand Down
5 changes: 1 addition & 4 deletions app/bundles/UserBundle/Entity/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -297,10 +297,7 @@ public static function loadApiMetadata(ApiMetadataDriver $metadata)
->build();
}

/**
* {@inheritdoc}
*/
protected function isChanged($prop, $val)
protected function isChanged(string $prop, float|bool|int|string|null $val): void
{
$getter = 'get'.ucfirst($prop);
$current = $this->$getter();
Expand Down
5 changes: 1 addition & 4 deletions app/bundles/WebhookBundle/Entity/Webhook.php
Original file line number Diff line number Diff line change
Expand Up @@ -514,10 +514,7 @@ public function wasModifiedRecently()
return true;
}

/**
* @param string $prop
*/
protected function isChanged($prop, $val)
protected function isChanged(string $prop, float|bool|int|string|null $val): void
{
$getter = 'get'.ucfirst($prop);
$current = $this->$getter();
Expand Down

0 comments on commit 22689f7

Please sign in to comment.