diff options
Diffstat (limited to 'apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php')
-rw-r--r-- | apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php b/apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php index 96b4371bd7c..2a28c9fc02c 100644 --- a/apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php +++ b/apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php @@ -125,7 +125,7 @@ abstract class AbstractPrincipalBackend implements BackendInterface { $metaDataRows = $metaDataStmt->fetchAll(\PDO::FETCH_ASSOC); $metaDataById = []; - foreach($metaDataRows as $metaDataRow) { + foreach ($metaDataRows as $metaDataRow) { if (!isset($metaDataById[$metaDataRow[$this->dbForeignKeyName]])) { $metaDataById[$metaDataRow[$this->dbForeignKeyName]] = []; } @@ -134,7 +134,7 @@ abstract class AbstractPrincipalBackend implements BackendInterface { $metaDataRow['value']; } - while($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { + while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { $id = $row['id']; if (isset($metaDataById[$id])) { @@ -142,7 +142,6 @@ abstract class AbstractPrincipalBackend implements BackendInterface { } else { $principals[] = $this->rowToPrincipal($row); } - } $stmt->closeCursor(); @@ -175,7 +174,7 @@ abstract class AbstractPrincipalBackend implements BackendInterface { $stmt = $query->execute(); $row = $stmt->fetch(\PDO::FETCH_ASSOC); - if(!$row) { + if (!$row) { return null; } @@ -187,7 +186,7 @@ abstract class AbstractPrincipalBackend implements BackendInterface { $metaDataRows = $metaDataStmt->fetchAll(\PDO::FETCH_ASSOC); $metadata = []; - foreach($metaDataRows as $metaDataRow) { + foreach ($metaDataRows as $metaDataRow) { $metadata[$metaDataRow['key']] = $metaDataRow['value']; } @@ -206,7 +205,7 @@ abstract class AbstractPrincipalBackend implements BackendInterface { $stmt = $query->execute(); $row = $stmt->fetch(\PDO::FETCH_ASSOC); - if(!$row) { + if (!$row) { return null; } @@ -218,7 +217,7 @@ abstract class AbstractPrincipalBackend implements BackendInterface { $metaDataRows = $metaDataStmt->fetchAll(\PDO::FETCH_ASSOC); $metadata = []; - foreach($metaDataRows as $metaDataRow) { + foreach ($metaDataRows as $metaDataRow) { $metadata[$metaDataRow['key']] = $metaDataRow['value']; } @@ -265,7 +264,7 @@ abstract class AbstractPrincipalBackend implements BackendInterface { $stmt = $query->execute(); $principals = []; - while($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { + while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { if (!$this->isAllowedToAccessResource($row, $usersGroups)) { continue; } @@ -284,7 +283,7 @@ abstract class AbstractPrincipalBackend implements BackendInterface { $stmt = $query->execute(); $principals = []; - while($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { + while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { if (!$this->isAllowedToAccessResource($row, $usersGroups)) { continue; } @@ -352,7 +351,7 @@ abstract class AbstractPrincipalBackend implements BackendInterface { $stmt = $query->execute(); $rows = []; - while($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { + while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { $id = $row[$this->dbForeignKeyName]; $principalRow = $this->getPrincipalById($id); @@ -388,7 +387,7 @@ abstract class AbstractPrincipalBackend implements BackendInterface { $stmt = $query->execute(); $row = $stmt->fetch(\PDO::FETCH_ASSOC); - if(!$row) { + if (!$row) { return null; } if (!$this->isAllowedToAccessResource($row, $usersGroups)) { @@ -415,7 +414,7 @@ abstract class AbstractPrincipalBackend implements BackendInterface { $stmt = $query->execute(); $row = $stmt->fetch(\PDO::FETCH_ASSOC); - if(!$row) { + if (!$row) { return null; } if (!$this->isAllowedToAccessResource($row, $usersGroups)) { |