Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/gallery.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Paroz <github@oparoz.com>2015-01-10 00:00:20 +0300
committerOlivier Paroz <github@oparoz.com>2015-01-10 00:00:20 +0300
commitb73f5cce23e875c99cb66e6bcbaa3249b1d255b6 (patch)
tree555b66ab2492c2eeb08745999590dec9b552a6aa /utility
parent0e9271b1424837b8de44c47eea14867ea2dce28d (diff)
Some optimisations
Diffstat (limited to 'utility')
-rw-r--r--utility/normalizer.php11
1 files changed, 4 insertions, 7 deletions
diff --git a/utility/normalizer.php b/utility/normalizer.php
index 09dcaace..a5228756 100644
--- a/utility/normalizer.php
+++ b/utility/normalizer.php
@@ -31,23 +31,20 @@ class Normalizer {
* @return string|array
*/
public function normalize($data, $depth = 0) {
-
$scalar = $this->normalizeScalar($data);
+ $traversable = $this->normalizeTraversable($data, $depth);
+ $object = $this->normalizeObject($data, $depth);
+ $resource = $this->normalizeResource($data);
+
if (!is_array($scalar)) {
return $scalar;
}
-
- $traversable = $this->normalizeTraversable($data, $depth);
if ($traversable !== null) {
return $traversable;
}
-
- $object = $this->normalizeObject($data, $depth);
if ($object !== null) {
return $object;
}
-
- $resource = $this->normalizeResource($data);
if ($resource !== null) {
return $resource;
}