@@ -227,7 +227,9 @@ |
||
227 | 227 | $found = false; |
228 | 228 | |
229 | 229 | foreach (array_merge($this->metaMappings, $this->fieldMappings) as $columnName => $columnFieldName) { |
230 | - if ( ! ($columnFieldName === $fieldName && $this->columnOwnerMap[$columnName] === $alias)) continue; |
|
230 | + if ( ! ($columnFieldName === $fieldName && $this->columnOwnerMap[$columnName] === $alias)) { |
|
231 | + continue; |
|
232 | + } |
|
231 | 233 | |
232 | 234 | $this->addIndexByColumn($alias, $columnName); |
233 | 235 | $found = true; |
@@ -786,7 +786,11 @@ |
||
786 | 786 | foreach ($last25queries as $i => $query) { |
787 | 787 | $params = array_map( |
788 | 788 | function($p) { |
789 | - if (is_object($p)) return get_class($p); else return var_export($p, true); |
|
789 | + if (is_object($p)) { |
|
790 | + return get_class($p); |
|
791 | + } else { |
|
792 | + return var_export($p, true); |
|
793 | + } |
|
790 | 794 | }, |
791 | 795 | $query['params'] ?: [] |
792 | 796 | ); |
@@ -48,7 +48,9 @@ |
||
48 | 48 | public function fetchColumn($columnNumber = 0) |
49 | 49 | { |
50 | 50 | $row = current($this->resultSet); |
51 | - if ( ! is_array($row)) return false; |
|
51 | + if ( ! is_array($row)) { |
|
52 | + return false; |
|
53 | + } |
|
52 | 54 | $val = array_shift($row); |
53 | 55 | return $val !== null ? $val : false; |
54 | 56 | } |
@@ -73,7 +73,11 @@ discard block |
||
73 | 73 | $first = true; |
74 | 74 | |
75 | 75 | foreach ($owningAssociation->getJoinColumns() as $joinColumn) { |
76 | - if ($first) $first = false; else $sql .= ' AND '; |
|
76 | + if ($first) { |
|
77 | + $first = false; |
|
78 | + } else { |
|
79 | + $sql .= ' AND '; |
|
80 | + } |
|
77 | 81 | |
78 | 82 | $sql .= sprintf('%s.%s = %s.%s', |
79 | 83 | $targetTableAlias, |
@@ -106,7 +110,11 @@ discard block |
||
106 | 110 | $first = true; |
107 | 111 | |
108 | 112 | foreach ($joinColumns as $joinColumn) { |
109 | - if ($first) $first = false; else $sql .= ' AND '; |
|
113 | + if ($first) { |
|
114 | + $first = false; |
|
115 | + } else { |
|
116 | + $sql .= ' AND '; |
|
117 | + } |
|
110 | 118 | |
111 | 119 | $sql .= sprintf('%s.%s = %s.%s', |
112 | 120 | $joinTableAlias, |
@@ -298,7 +298,7 @@ |
||
298 | 298 | |
299 | 299 | if ($property instanceof FieldMetadata) { |
300 | 300 | $output = array_merge($output, $this->formatColumn($property)); |
301 | - } else if ($property instanceof AssociationMetadata) { |
|
301 | + } else if ($property instanceof AssociationMetadata) { |
|
302 | 302 | // @todo guilhermeblanco Fix me! We are trying to iterate through an AssociationMetadata instance |
303 | 303 | foreach ($property as $field => $value) { |
304 | 304 | $output[] = $this->formatField(sprintf(' %s', $field), $this->formatValue($value)); |