@@ -63,23 +63,23 @@ |
||
| 63 | 63 | |
| 64 | 64 | // On compte le nombre total d'entrées dans la BDD |
| 65 | 65 | $queryBuilder->select('count(o.id)'); |
| 66 | - foreach ($findBy as $key => $values){ |
|
| 66 | + foreach ($findBy as $key => $values) { |
|
| 67 | 67 | $andCount = 0; |
| 68 | 68 | $and = ''; |
| 69 | - foreach($values as $value){ |
|
| 70 | - if($andCount > 0){ |
|
| 69 | + foreach ($values as $value) { |
|
| 70 | + if ($andCount > 0) { |
|
| 71 | 71 | $and .= ' OR '; |
| 72 | 72 | } |
| 73 | - $and .= 'o.' . $key . ' = :' . $key . $andCount; |
|
| 74 | - $queryBuilder->setParameter($key . $andCount, $value); |
|
| 73 | + $and .= 'o.'.$key.' = :'.$key.$andCount; |
|
| 74 | + $queryBuilder->setParameter($key.$andCount, $value); |
|
| 75 | 75 | |
| 76 | 76 | $andCount++; |
| 77 | 77 | } |
| 78 | 78 | $queryBuilder->andWhere($and); |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | - foreach($sortBy as $field => $order){ |
|
| 82 | - $queryBuilder->addOrderBy('o.' . $field, $order); |
|
| 81 | + foreach ($sortBy as $field => $order) { |
|
| 82 | + $queryBuilder->addOrderBy('o.'.$field, $order); |
|
| 83 | 83 | } |
| 84 | 84 | |
| 85 | 85 | $count = $queryBuilder->getQuery()->getSingleScalarResult(); |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | ->setReplyTo([$from->getEmail() => $from->getFirstName().' '.$from->getLastName()]) |
| 28 | 28 | ; |
| 29 | 29 | |
| 30 | - foreach($attachments as $attachment){ |
|
| 30 | + foreach ($attachments as $attachment) { |
|
| 31 | 31 | $message->attach(Swift_Attachment::fromPath($attachment['path'])->setFilename($attachment['name'])); |
| 32 | 32 | } |
| 33 | 33 | |