@@ -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 { |
@@ -5,8 +5,8 @@ |
||
| 5 | 5 | use Carbon\Carbon; |
| 6 | 6 | use Carbon\CarbonInterval; |
| 7 | 7 | use Required\Harvest\Client; |
| 8 | -use Required\Harvest\Exception\NotFoundException; |
|
| 9 | 8 | use Required\Harvest\Exception\AuthenticationException; |
| 9 | +use Required\Harvest\Exception\NotFoundException; |
|
| 10 | 10 | use Required\Harvest\Exception\ValidationFailedException; |
| 11 | 11 | |
| 12 | 12 | class Harvest extends TimerService |
@@ -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(); |
@@ -2,9 +2,9 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Godbout\Alfred\Time\Services; |
| 4 | 4 | |
| 5 | -use Exception; |
|
| 6 | 5 | use Carbon\Carbon; |
| 7 | 6 | use Carbon\CarbonInterval; |
| 7 | +use Exception; |
|
| 8 | 8 | use MorningTrain\TogglApi\TogglApi; |
| 9 | 9 | |
| 10 | 10 | class Toggl extends TimerService |
@@ -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, '_')); |
@@ -2,9 +2,9 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Godbout\Alfred\Time; |
| 4 | 4 | |
| 5 | -use Godbout\Alfred\Workflow\Config; |
|
| 6 | -use Godbout\Alfred\Time\Services\Toggl; |
|
| 7 | 5 | use Godbout\Alfred\Time\Services\Harvest; |
| 6 | +use Godbout\Alfred\Time\Services\Toggl; |
|
| 7 | +use Godbout\Alfred\Workflow\Config; |
|
| 8 | 8 | use Godbout\Alfred\Workflow\ScriptFilter; |
| 9 | 9 | |
| 10 | 10 | class Workflow |