Skip to content

Commit

Permalink
Merge pull request #37 from davidglezz/fix-cs-fixer-errors
Browse files Browse the repository at this point in the history
style: fix cs fixer error
  • Loading branch information
0x346e3730 authored Mar 3, 2023
2 parents ff718dd + b5cfd62 commit 0381ce6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
/composer.phar
/vendor/
/generated_data/
.php_cs.cache
8 changes: 2 additions & 6 deletions src/Generator/EntityGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -859,13 +859,9 @@ private function getRandomRelationId($relationName, $relationConditions, $entity
// a random relation value
$randomRelation = $this->relations[$relationName][array_rand($this->relations[$relationName])];
if ($try >= $maxRetry) {
throw new RuntimeException(
'A '. $relationName . ' relation can\'t be found for entity ' . $entityName
. ' with these conditions : ' . http_build_query($relationConditions,'',', ')
. ' try to adapt config.yml or entity files in src/Model'
);
throw new RuntimeException('A ' . $relationName . ' relation can\'t be found for entity ' . $entityName . ' with these conditions : ' . http_build_query($relationConditions, '', ', ') . ' try to adapt config.yml or entity files in src/Model');
}
$try++;
++$try;
} while (!$this->isMatchingConditions($relationConditions, $randomRelation));

return (string) ($randomRelation['id']);
Expand Down

0 comments on commit 0381ce6

Please sign in to comment.