@@ -22,7 +22,6 @@ |
||
22 | 22 | use Symfony\Component\Console\Command\Command; |
23 | 23 | use Symfony\Component\Console\Input\InputArgument; |
24 | 24 | use Symfony\Component\Console\Input\InputInterface; |
25 | -use Symfony\Component\Console\Input\InputOption; |
|
26 | 25 | use Symfony\Component\Console\Output\OutputInterface; |
27 | 26 | use Wicked\Timely\Entities\Booking; |
28 | 27 | use Wicked\Timely\Storage\StorageFactory; |
@@ -70,7 +70,7 @@ |
||
70 | 70 | $booking->getTicketId(), |
71 | 71 | $booking->getComment() |
72 | 72 | ) |
73 | - ) . self::LINE_BREAK . ' |
|
73 | + ).self::LINE_BREAK.' |
|
74 | 74 | '; |
75 | 75 | } |
76 | 76 | return $result; |
@@ -46,7 +46,7 @@ |
||
46 | 46 | $startBooking = null; |
47 | 47 | $intermediateBookings = array(); |
48 | 48 | $bookingsCount = count($bookings) - 1; |
49 | - for ($i = $bookingsCount; $i >= 0; $i --) { |
|
49 | + for ($i = $bookingsCount; $i >= 0; $i--) { |
|
50 | 50 | $booking = $bookings[$i]; |
51 | 51 | // set the start booking |
52 | 52 | if (is_null($startBooking) && $booking->canStartTask($includePauses)) { |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | public function __construct() |
70 | 70 | { |
71 | 71 | // calculate the default file path |
72 | - $this->logFilePath = dirname(dirname(__DIR__)) . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . self::DATA_NAME; |
|
72 | + $this->logFilePath = dirname(dirname(__DIR__)).DIRECTORY_SEPARATOR.'data'.DIRECTORY_SEPARATOR.self::DATA_NAME; |
|
73 | 73 | // check if the file exists, if not create it |
74 | 74 | if (!is_file($this->logFilePath)) { |
75 | 75 | touch($this->logFilePath); |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | |
102 | 102 | // write the new booking to the beginning of the file |
103 | 103 | $path = $this->getLogFilePath(); |
104 | - file_put_contents($path, $bookString . file_get_contents($path)); |
|
104 | + file_put_contents($path, $bookString.file_get_contents($path)); |
|
105 | 105 | } |
106 | 106 | |
107 | 107 | /** |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | |
178 | 178 | // increase the booking counter |
179 | 179 | if (!$booking->isMetaBooking() || $countMeta) { |
180 | - $bookingCount ++; |
|
180 | + $bookingCount++; |
|
181 | 181 | } |
182 | 182 | |
183 | 183 | // if clipping is not omitted we will add the rear clipping to our collection. |
@@ -118,8 +118,6 @@ discard block |
||
118 | 118 | /** |
119 | 119 | * Assert that a given "resume" command makes sense |
120 | 120 | * |
121 | - * @param \Symfony\Component\Console\Input\InputInterface $input The command input |
|
122 | - * @param \Symfony\Component\Console\Output\OutputInterface $output The command output |
|
123 | 121 | * |
124 | 122 | * @return void |
125 | 123 | * |
@@ -137,8 +135,6 @@ discard block |
||
137 | 135 | /** |
138 | 136 | * Assert that a given "start" command makes sense |
139 | 137 | * |
140 | - * @param \Symfony\Component\Console\Input\InputInterface $input The command input |
|
141 | - * @param \Symfony\Component\Console\Output\OutputInterface $output The command output |
|
142 | 138 | * |
143 | 139 | * @return void |
144 | 140 | * |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | * {@inheritDoc} |
127 | 127 | * @see \Symfony\Component\Console\Command\Command::execute() |
128 | 128 | */ |
129 | - protected function assertConsistentResume () { |
|
129 | + protected function assertConsistentResume() { |
|
130 | 130 | $storage = StorageFactory::getStorage(); |
131 | 131 | $lastBooking = $storage->retrieveLast(true); |
132 | 132 | if ($lastBooking->getTicketId() !== PauseEntity::PAUSE_TAG_START) { |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | * {@inheritDoc} |
146 | 146 | * @see \Symfony\Component\Console\Command\Command::execute() |
147 | 147 | */ |
148 | - protected function assertConsistentPause () { |
|
148 | + protected function assertConsistentPause() { |
|
149 | 149 | $storage = StorageFactory::getStorage(); |
150 | 150 | $lastBooking = $storage->retrieveLast(true); |
151 | 151 | if ($lastBooking->getTicketId() === PauseEntity::PAUSE_TAG_START) { |
@@ -20,9 +20,7 @@ |
||
20 | 20 | namespace Wicked\Timely\Command; |
21 | 21 | |
22 | 22 | use Symfony\Component\Console\Command\Command; |
23 | -use Symfony\Component\Console\Input\InputArgument; |
|
24 | 23 | use Symfony\Component\Console\Input\InputInterface; |
25 | -use Symfony\Component\Console\Input\InputOption; |
|
26 | 24 | use Symfony\Component\Console\Output\OutputInterface; |
27 | 25 | use Wicked\Timely\Storage\StorageFactory; |
28 | 26 | use Wicked\Timely\Formatter\FormatterFactory; |
@@ -67,7 +67,6 @@ |
||
67 | 67 | /** |
68 | 68 | * Whether or not this booking can be the start of a task |
69 | 69 | * |
70 | - * @param boolean $includePause Whether or not pauses are included as task building bookings |
|
71 | 70 | * |
72 | 71 | * @return boolean |
73 | 72 | */ |
@@ -18,6 +18,6 @@ |
||
18 | 18 | */ |
19 | 19 | public function __construct($path = '.') |
20 | 20 | { |
21 | - parent::__construct(realpath(__DIR__ . '/../')); |
|
21 | + parent::__construct(realpath(__DIR__.'/../')); |
|
22 | 22 | } |
23 | 23 | } |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | // print the total amount of time spent |
92 | 92 | $result .= ' |
93 | 93 | ==================================================== |
94 | -Total: ca. ' . Date::secondsToUnits(Date::roundByInterval($this->totalDuration, 900)) . ' |
|
94 | +Total: ca. ' . Date::secondsToUnits(Date::roundByInterval($this->totalDuration, 900)).' |
|
95 | 95 | ===================================================='; |
96 | 96 | |
97 | 97 | // return the string |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | Date::secondsToUnits($task->getDuration()), |
123 | 123 | $task->getComment() |
124 | 124 | ) |
125 | - ) . ' |
|
125 | + ).' |
|
126 | 126 | '; |
127 | 127 | $total += $task->getDuration(); |
128 | 128 | } |
@@ -132,13 +132,13 @@ discard block |
||
132 | 132 | $lastBooking = end($tasks)->getEndBooking(); |
133 | 133 | |
134 | 134 | // begin the string generation |
135 | - $result = $ticketId . ' ' . $startTime . ' -> ' . $lastBooking->getTime() . ' |
|
135 | + $result = $ticketId.' '.$startTime.' -> '.$lastBooking->getTime().' |
|
136 | 136 | ==================================================== |
137 | 137 | ' . $ticketList; |
138 | 138 | |
139 | 139 | // print the total and end with another linebreak without indention to break groups apart |
140 | 140 | $result .= '------------------------------------------------- |
141 | - ' . Date::secondsToUnits(Date::roundByInterval($total, 900)) . ' |
|
141 | + ' . Date::secondsToUnits(Date::roundByInterval($total, 900)).' |
|
142 | 142 | |
143 | 143 | '; |
144 | 144 | $this->totalDuration += $total; |