Skip to content

Commit

Permalink
[skip ci] update DAORelationsAssignmentsTrait
Browse files Browse the repository at this point in the history
  • Loading branch information
jcheron committed May 10, 2023
1 parent 86216f1 commit 28ea538
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Ubiquity/orm/traits/DAORelationsAssignmentsTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ private static function affectsManyToOneFromArray($object, $member, $manyToOneOb
* @param string $class
* @param \ReflectionProperty $prop
*/
private static function affectsOneToManyFromArray($instance, $member, $array = null, $mappedByAccessor = null, $accessor = "", $class = "", $prop = null, $classPropKey = null) {
private static function affectsOneToManyFromArray($instance, $member, $array = null, $mappedByAccessor = null, $accessor = '', $class = '', $prop = null, $classPropKey = null) {
$ret = [ ];
self::_getOneToManyFromArray ( $ret, $array, Reflexion::getPropValue ( $instance, $classPropKey ), $mappedByAccessor, $prop );
self::setToMember ( $member, $instance, $ret, $accessor );
Expand All @@ -75,15 +75,15 @@ private static function affectsOneToManyFromArray($instance, $member, $array = n
private static function _affectsObjectsFromArray($queries, $included, $affectsCallback, $part, $useCache = NULL) {
$includedNext = false;
foreach ( $queries as $key => $pendingRelationsRequest ) {
list ( $class, $member, $fkField, $fkClass ) = \explode ( "|", $key );
if (is_array ( $included )) {
list ( $class, $member, $fkField, $fkClass ) = \explode ( '|', $key );
if (\is_array ( $included )) {
$includedNext = self::_getIncludedNext ( $included, $member );
}
$objectsParsers = $pendingRelationsRequest->getObjectsConditionParsers ();
$prop = null;
if ('getOneToMany' === $part) {
$prop = OrmUtils::getFirstPropKey ( $fkClass );
$fkField = "get" . ucfirst ( $fkField );
$fkField = 'get' . \ucfirst ( $fkField );
}
foreach ( $objectsParsers as $objectsConditionParser ) {
$objectsConditionParser->compileParts ();
Expand Down

0 comments on commit 28ea538

Please sign in to comment.