From 68dce9dde569a039da68cd2c1244ca89984aba34 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thomas=20M=C3=BCller?= <thomas.mueller@tmit.eu>
Date: Wed, 4 Sep 2013 21:22:36 +0200
Subject: [PATCH] fixing style, var name & PHPDoc

---
 core/avatar/controller.php | 6 ++++--
 lib/avatar.php             | 2 +-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/core/avatar/controller.php b/core/avatar/controller.php
index 5264327b641..50ec50f19a5 100644
--- a/core/avatar/controller.php
+++ b/core/avatar/controller.php
@@ -72,12 +72,14 @@ class OC_Core_Avatar_Controller {
 			} else {
 				$l = new \OC_L10n('core');
 				$type = substr($image->mimeType(), -3);
-				if ($type === 'peg') { $type = 'jpg'; }
+				if ($type === 'peg') {
+					$type = 'jpg';
+				}
 				if ($type !== 'jpg' && $type !== 'png') {
 					\OC_JSON::error(array("data" => array("message" => $l->t("Unknown filetype")) ));
 				}
 
-				if (!$img->valid()) {
+				if (!$image->valid()) {
 					\OC_JSON::error(array("data" => array("message" => $l->t("Invalid image")) ));
 				}
 			}
diff --git a/lib/avatar.php b/lib/avatar.php
index 9b2a7fe07cf..5f73a9bf220 100644
--- a/lib/avatar.php
+++ b/lib/avatar.php
@@ -15,7 +15,7 @@ class OC_Avatar {
 	 * @brief get the users avatar
 	 * @param $user string which user to get the avatar for
 	 * @param $size integer size in px of the avatar, defaults to 64
-	 * @return mixed \OC_Image containing the avatar or false if there's no image
+	 * @return boolean|\OC_Image containing the avatar or false if there's no image
 	*/
 	public function get ($user, $size = 64) {
 		$view = new \OC\Files\View('/'.$user);
-- 
GitLab