euromark 12 years ago
parent
commit
210b60c8a9

+ 43 - 26
Lib/Misc/ZodiacLib.php

@@ -1,13 +1,13 @@
 <?php
 <?php
 
 
 /**
 /**
- * @from
+ * Zodiac Signs
  */
  */
 class ZodiacLib {
 class ZodiacLib {
 
 
 	public $error = null;
 	public $error = null;
 
 
-	static $res = array(
+	public static $res = array(
 		self::SIGN_AQUARIUS	=> 'aquarius',
 		self::SIGN_AQUARIUS	=> 'aquarius',
 		self::SIGN_ARIES	=> 'aries',
 		self::SIGN_ARIES	=> 'aries',
 		self::SIGN_CANCER	=> 'cancer',
 		self::SIGN_CANCER	=> 'cancer',
@@ -29,7 +29,6 @@ class ZodiacLib {
 	/**
 	/**
 	 * @param integer $sign
 	 * @param integer $sign
 	 * @return array(array(m, d), array(m, d)) (first is min, second is max)
 	 * @return array(array(m, d), array(m, d)) (first is min, second is max)
-	 * 2011-07-13
 	 */
 	 */
 	public function getRange($sign) {
 	public function getRange($sign) {
 		$range = null;
 		$range = null;
@@ -76,6 +75,8 @@ class ZodiacLib {
 	}
 	}
 
 
 	/**
 	/**
+	 * Zodiac Sign for given day and month
+	 *
 	 * @param month
 	 * @param month
 	 * @param day
 	 * @param day
 	 * expects valid values
 	 * expects valid values
@@ -84,63 +85,72 @@ class ZodiacLib {
 	public function getSign($month, $day) {
 	public function getSign($month, $day) {
 		switch ($month) {
 		switch ($month) {
 			case 1:
 			case 1:
-				$this->zodiac = ($day <= 20) ? self::SIGN_CAPRICORN : self::SIGN_AQUARIUS;
+				$zodiac = ($day <= 20) ? self::SIGN_CAPRICORN : self::SIGN_AQUARIUS;
 				break;
 				break;
 			case 2:
 			case 2:
-				$this->zodiac = ($day <= 19) ? self::SIGN_AQUARIUS : self::SIGN_PISCES;
+				$zodiac = ($day <= 19) ? self::SIGN_AQUARIUS : self::SIGN_PISCES;
 				break;
 				break;
 			case 3:
 			case 3:
-				$this->zodiac = ($day <= 20) ? self::SIGN_PISCES : self::SIGN_ARIES;
+				$zodiac = ($day <= 20) ? self::SIGN_PISCES : self::SIGN_ARIES;
 				break;
 				break;
 			case 4:
 			case 4:
-				$this->zodiac = ($day <= 20) ? self::SIGN_ARIES:
-				self::SIGN_TAURUS;
+				$zodiac = ($day <= 20) ? self::SIGN_ARIES : self::SIGN_TAURUS;
 				break;
 				break;
 			case 5 :
 			case 5 :
-				$this->zodiac = ($day <= 21) ? self::SIGN_TAURUS:
-				self::SIGN_GEMINI;
+				$zodiac = ($day <= 21) ? self::SIGN_TAURUS : self::SIGN_GEMINI;
 				break;
 				break;
 			case 6 :
 			case 6 :
-				$this->zodiac = ($day <= 21) ? self::SIGN_GEMINI:
-				self::SIGN_CANCER;
+				$zodiac = ($day <= 21) ? self::SIGN_GEMINI : self::SIGN_CANCER;
 				break;
 				break;
 			case 7 :
 			case 7 :
-				$this->zodiac = ($day <= 23) ? self::SIGN_CANCER:
-				self::SIGN_LEO;
+				$zodiac = ($day <= 23) ? self::SIGN_CANCER : self::SIGN_LEO;
 				break;
 				break;
 			case 8 :
 			case 8 :
-				$this->zodiac = ($day <= 23) ? self::SIGN_LEO:
-				self::SIGN_VIRGO;
+				$zodiac = ($day <= 23) ? self::SIGN_LEO : self::SIGN_VIRGO;
 				break;
 				break;
 			case 9 :
 			case 9 :
-				$this->zodiac = ($day <= 23) ? self::SIGN_VIRGO:
-				self::SIGN_LIBRA;
+				$zodiac = ($day <= 23) ? self::SIGN_VIRGO : self::SIGN_LIBRA;
 				break;
 				break;
 			case 10 :
 			case 10 :
-				$this->zodiac = ($day <= 23) ? self::SIGN_LIBRA:
-				self::SIGN_SCORPIO;
+				$zodiac = ($day <= 23) ? self::SIGN_LIBRA : self::SIGN_SCORPIO;
 				break;
 				break;
 			case 11 :
 			case 11 :
-				$this->zodiac = ($day <= 22) ? self::SIGN_SCORPIO:
-				self::SIGN_SAGITTARIUS;
+				$zodiac = ($day <= 22) ? self::SIGN_SCORPIO : self::SIGN_SAGITTARIUS;
 				break;
 				break;
 			case 12 :
 			case 12 :
-				$this->zodiac = ($day <= 21) ? self::SIGN_SAGITTARIUS : self::SIGN_CAPRICORN;
+				$zodiac = ($day <= 21) ? self::SIGN_SAGITTARIUS : self::SIGN_CAPRICORN;
 				break;
 				break;
 		}
 		}
-		return $this->zodiac;
+		return $zodiac;
 	}
 	}
 
 
+	/**
+	 * ZodiacLib::getChineseSign()
+	 *
+	 * @param mixed $year
+	 * @param mixed $month
+	 * @param mixed $day
+	 * @return void
+	 */
 	public function getChineseSign($year, $month, $day) {
 	public function getChineseSign($year, $month, $day) {
 		//TODO
 		//TODO
 	}
 	}
 
 
+	/**
+	 * ZodiacLib::getNativeAmericanSign()
+	 *
+	 * @param mixed $month
+	 * @param mixed $day
+	 * @return void
+	 */
 	public function getNativeAmericanSign($month, $day) {
 	public function getNativeAmericanSign($month, $day) {
 		//TODO
 		//TODO
 	}
 	}
 
 
 	/**
 	/**
 	 * List of all signs
 	 * List of all signs
+	 *
+	 * @return mixed
 	 */
 	 */
 	public static function signs($value = null) {
 	public static function signs($value = null) {
 		$res = array(
 		$res = array(
@@ -163,6 +173,12 @@ class ZodiacLib {
 		return $res[$value];
 		return $res[$value];
 	}
 	}
 
 
+	/**
+	 * ZodiacLib::image()
+	 *
+	 * @param integer $sign
+	 * @return string
+	 */
 	public static function image($sign) {
 	public static function image($sign) {
 		return self::$res[$sign];
 		return self::$res[$sign];
 	}
 	}
@@ -180,6 +196,8 @@ class ZodiacLib {
 	const SIGN_SAGITTARIUS = 11;
 	const SIGN_SAGITTARIUS = 11;
 	const SIGN_CAPRICORN = 12;
 	const SIGN_CAPRICORN = 12;
 
 
+}
+
 /*
 /*
 	2 aries1.gif from 21 Marzo to 20 Aprile
 	2 aries1.gif from 21 Marzo to 20 Aprile
 	3 cancer1.gif from 22 Giugno to 22 luglio
 	3 cancer1.gif from 22 Giugno to 22 luglio
@@ -205,5 +223,4 @@ Skorpion (24. Oktober - 22. November)
 Schütze (23. November - 21. Dezember)
 Schütze (23. November - 21. Dezember)
 Steinbock (22. Dezember - 20. Januar)
 Steinbock (22. Dezember - 20. Januar)
 
 
-*/
-}
+*/

+ 0 - 5
Test/Case/Controller/Component/AutoLoginComponentTest.php

@@ -96,11 +96,6 @@ class AutoLoginComponentTest extends CakeTestCase {
  *
  *
  */
  */
 class AutoLoginTestController extends Controller {
 class AutoLoginTestController extends Controller {
-	/**
-	 * Name property
-	 *
-	 * @var string 'SecurityTest'
-	 */
 
 
 	/**
 	/**
 	 * Components property
 	 * Components property

+ 0 - 2
View/Helper/FormExtHelper.php

@@ -901,8 +901,6 @@ class FormExtHelper extends FormHelper {
 		return '<div class="input date' . (!empty($error) ? ' error' : '') . '">' . $this->label($model . '.' . $field, $options['label']) . '' . $select . '' . $error . '</div>' . $script;
 		return '<div class="input date' . (!empty($error) ? ' error' : '') . '">' . $this->label($model . '.' . $field, $options['label']) . '' . $select . '' . $error . '</div>' . $script;
 	}
 	}
 
 
-/** maxLength **/
-
 	public $maxLengthOptions = array(
 	public $maxLengthOptions = array(
 		'maxCharacters' => 255,
 		'maxCharacters' => 255,
 		//'events' => array(),
 		//'events' => array(),