update recurring

This commit is contained in:
DavidBadura
2015-02-08 13:29:44 +00:00
parent fb3da0face
commit 6d13ee7d3a
5 changed files with 11 additions and 11 deletions

View File

@@ -32,7 +32,7 @@ class Recurring
*/
public function __construct($recurring)
{
if ($this->isValid($recurring)) {
if (self::isValid($recurring)) {
$this->recurring = $recurring;
} else {
throw new TaskwarriorException();
@@ -51,7 +51,7 @@ class Recurring
* @param string $recur
* @return bool
*/
private function isValid($recur)
public static function isValid($recur)
{
$refClass = new \ReflectionClass(__CLASS__);
$constants = $refClass->getConstants();

View File

@@ -263,7 +263,7 @@ class Task
/**
* @return string
*/
public function getRecur()
public function getRecurring()
{
return $this->recur;
}
@@ -272,7 +272,7 @@ class Task
* @param string|Recurring $recur
* @throws TaskwarriorException
*/
public function setRecur($recur)
public function setRecurring($recur)
{
if (is_string($recur)) {
$this->recur = new Recurring($recur);

View File

@@ -264,10 +264,10 @@ class TaskManager
*/
private function setValue(Task $task, $attr, $value)
{
$reflectionClass = new \ReflectionClass('DavidBadura\Taskwarrior\Task');
$prop = $reflectionClass->getProperty($attr);
$prop->setAccessible(true);
$prop->setValue($task, $value);
$refClass = new \ReflectionClass('DavidBadura\Taskwarrior\Task');
$refProp = $refClass->getProperty($attr);
$refProp->setAccessible(true);
$refProp->setValue($task, $value);
}
/**