mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
phpstan and php cs fixer
This commit is contained in:
parent
9979378e78
commit
535409e529
@ -101,7 +101,7 @@ class ThirdpartyDuplicateController extends AbstractController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private function validateThirdpartyMerge(Thirdparty $thirdparty1, Thirdparty $thirdparty2): void
|
private function validateThirdpartyMerge(ThirdParty $thirdparty1, ThirdParty $thirdparty2): void
|
||||||
{
|
{
|
||||||
$constraints = [
|
$constraints = [
|
||||||
[$thirdparty1 === $thirdparty2, 'thirdparty_duplicate.You cannot merge a thirdparty with itself. Please choose a different thirdparty'],
|
[$thirdparty1 === $thirdparty2, 'thirdparty_duplicate.You cannot merge a thirdparty with itself. Please choose a different thirdparty'],
|
||||||
|
@ -85,8 +85,8 @@ class ThirdpartyMergeService
|
|||||||
if (ThirdParty::class !== $assoc['targetEntity'] && ThirdParty::class !== $assoc['sourceEntity']) {
|
if (ThirdParty::class !== $assoc['targetEntity'] && ThirdParty::class !== $assoc['sourceEntity']) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
// phpstan wants boolean for if condition
|
||||||
if ($assoc['type'] & ClassMetadata::TO_ONE) {
|
if (($assoc['type'] & ClassMetadata::TO_ONE) !== 0) {
|
||||||
$joinColumn = $meta->getSingleAssociationJoinColumnName($assoc['fieldName']);
|
$joinColumn = $meta->getSingleAssociationJoinColumnName($assoc['fieldName']);
|
||||||
|
|
||||||
if (ThirdParty::class === $assoc['sourceEntity'] && 'parent_id' !== $joinColumn) {
|
if (ThirdParty::class === $assoc['sourceEntity'] && 'parent_id' !== $joinColumn) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user