@@ -41,9 +41,11 @@ |
||
| 41 | 41 | return self::getInstance()->scriptFilter->output(); |
| 42 | 42 | } |
| 43 | 43 | |
| 44 | - public static function do() |
|
| 44 | + public static function do { |
|
| 45 | + () |
|
| 45 | 46 | { |
| 46 | 47 | $action = getenv('timer_action'); |
| 48 | + } |
|
| 47 | 49 | |
| 48 | 50 | if ($timerId = getenv('timer_id')) { |
| 49 | 51 | return Timer::$action($timerId); |
@@ -146,6 +146,9 @@ |
||
| 146 | 146 | return __NAMESPACE__ . "\\Menus\\" . (self::getMenuClassName(getenv('action')) ?: 'Entrance'); |
| 147 | 147 | } |
| 148 | 148 | |
| 149 | + /** |
|
| 150 | + * @param string $action |
|
| 151 | + */ |
|
| 149 | 152 | private static function getMenuClassName($action) |
| 150 | 153 | { |
| 151 | 154 | return str_replace('_', '', ucwords($action === false ? 'entrance' : $action, '_')); |
@@ -103,6 +103,9 @@ |
||
| 103 | 103 | return false; |
| 104 | 104 | } |
| 105 | 105 | |
| 106 | + /** |
|
| 107 | + * @return integer |
|
| 108 | + */ |
|
| 106 | 109 | public function runningTimer() |
| 107 | 110 | { |
| 108 | 111 | try { |
@@ -79,6 +79,9 @@ discard block |
||
| 79 | 79 | return false; |
| 80 | 80 | } |
| 81 | 81 | |
| 82 | + /** |
|
| 83 | + * @return integer |
|
| 84 | + */ |
|
| 82 | 85 | public function runningTimer() |
| 83 | 86 | { |
| 84 | 87 | $timer = $this->client->getRunningTimeEntry(); |
@@ -106,6 +109,9 @@ discard block |
||
| 106 | 109 | return true; |
| 107 | 110 | } |
| 108 | 111 | |
| 112 | + /** |
|
| 113 | + * @param string $needle |
|
| 114 | + */ |
|
| 109 | 115 | private function extractFromData($needle) |
| 110 | 116 | { |
| 111 | 117 | $data = $this->getData(); |
@@ -5,7 +5,9 @@ |
||
| 5 | 5 | use Godbout\Alfred\Time\Workflow; |
| 6 | 6 | |
| 7 | 7 | if (getenv('action') === 'do') { |
| 8 | - $result = Workflow::do(); |
|
| 8 | + $result = Workflow::do { |
|
| 9 | + (); |
|
| 10 | + } |
|
| 9 | 11 | |
| 10 | 12 | if (getenv('timer_action') !== 'exit') { |
| 11 | 13 | print Workflow::notify($result); |