Completed
Push — master ( 27da95...1cbe19 )
by Ron
06:49
created
src/Common/IntervalParser.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -9,9 +9,9 @@  discard block
 block discarded – undo
9 9
 	 * @return int
10 10
 	 */
11 11
 	public static function parse($interval) {
12
-		if(is_array($interval)) {
12
+		if (is_array($interval)) {
13 13
 			$result = [];
14
-			foreach($interval as $intervalStr) {
14
+			foreach ($interval as $intervalStr) {
15 15
 				$result[] = self::parseString($intervalStr);
16 16
 			}
17 17
 			return min($result);
@@ -25,10 +25,10 @@  discard block
 block discarded – undo
25 25
 	 * @return int
26 26
 	 */
27 27
 	private static function parseString($interval) {
28
-		if(preg_match('/^\\d+$/', $interval)) {
28
+		if (preg_match('/^\\d+$/', $interval)) {
29 29
 			return $interval;
30 30
 		}
31
-		if(preg_match('/^(\\d{1,2}|\\*):(\\d{1,2}|\\*)(?::(\\d{1,2}|\\*))?$/', $interval, $matches)) {
31
+		if (preg_match('/^(\\d{1,2}|\\*):(\\d{1,2}|\\*)(?::(\\d{1,2}|\\*))?$/', $interval, $matches)) {
32 32
 			$matches[] = 0;
33 33
 			list($hours, $minutes, $seconds) = array_slice($matches, 1);
34 34
 			$possibleDates = [
@@ -45,9 +45,9 @@  discard block
 block discarded – undo
45 45
 	 * @throws Exception
46 46
 	 */
47 47
 	private static function nearst(array $possibleDates) {
48
-		foreach($possibleDates as $possibleDate) {
48
+		foreach ($possibleDates as $possibleDate) {
49 49
 			$time = strtotime($possibleDate);
50
-			if($time > time()) {
50
+			if ($time > time()) {
51 51
 				return $time - time();
52 52
 			}
53 53
 		}
Please login to merge, or discard this patch.