Completed
Branch master (c96135)
by Ekin
03:10
created
src/Normalizer.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 /**
3 3
  * Time string normalizer
4 4
  *
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
     public function normalize(string $input): string
50 50
     {
51 51
         $output = preg_replace_callback(self::$pattern,
52
-            function ($matches) {
52
+            function($matches) {
53 53
                 $int = $matches['int'];
54 54
                 switch ($matches['time']) {
55 55
                     case 's':
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
                 # rebuild the interval string
80 80
                 $time = $int . $t;
81 81
 
82
-                if(isset($matches['text'])){
82
+                if (isset($matches['text'])) {
83 83
                     $time .= trim($matches['text']);
84 84
                 }
85 85
 
Please login to merge, or discard this patch.
src/IntervalIterator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 
3 3
 namespace IntervalParser;
4 4
 
Please login to merge, or discard this patch.
src/IntervalFlags.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 
3 3
 namespace IntervalParser;
4 4
 
Please login to merge, or discard this patch.
src/Pattern.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 /**
3 3
  * Set of regular expressions utilized to match/replace/validate parts of a given input.
4 4
  *
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
     const DEFINE = "/(?(DEFINE)";
19 19
 
20 20
     # Definitions of sub patterns for a valid interval
21
-    const INTEGER  = <<<'REGEX'
21
+    const INTEGER = <<<'REGEX'
22 22
     (?<integer>
23 23
        (?:\G|(?!\n))
24 24
        (\s*\b)?
Please login to merge, or discard this patch.
src/InvalidFlagException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 
3 3
 namespace IntervalParser;
4 4
 
Please login to merge, or discard this patch.
src/Exception.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 
3 3
 namespace IntervalParser;
4 4
 
Please login to merge, or discard this patch.
src/FormatException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 
3 3
 namespace IntervalParser;
4 4
 
Please login to merge, or discard this patch.
src/Parser.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 /**
3 3
  * Main IntervalParser class
4 4
  *
@@ -39,10 +39,10 @@  discard block
 block discarded – undo
39 39
     {
40 40
         $input = trim($this->normalizer->normalize($input));
41 41
 
42
-        $definition = Pattern::DEFINE . Pattern::INTEGER . Pattern::TIME_PART .')';
42
+        $definition = Pattern::DEFINE . Pattern::INTEGER . Pattern::TIME_PART . ')';
43 43
         $expression = $definition . Pattern::INTERVAL_ONLY;
44 44
 
45
-        if(preg_match($expression, $input, $matches)){
45
+        if (preg_match($expression, $input, $matches)) {
46 46
             return \DateInterval::createFromDateString($input);
47 47
         }
48 48
 
Please login to merge, or discard this patch.
src/ParserSettings.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 /** Parser Settings
3 3
  *
4 4
  * IntervalParser takes a ParserSettings object which is handy for when you want to deal with multiple intervals.
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         string $leadingSeparationString = "in",
38 38
         bool $keepLeadingSeparator = false,
39 39
         int $multipleSeparationType = self::SYMBOL,
40
-        string $multipleSeparationSymbol  = ",",
40
+        string $multipleSeparationSymbol = ",",
41 41
         string $multipleSeparationWord = null
42 42
     )
43 43
     {
Please login to merge, or discard this patch.