Completed
Branch master (7532af)
by arto
50:48
created
example/local/parse_all.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,6 @@
 block discarded – undo
3 3
  * @author stev leibelt <[email protected]>
4 4
  * @since 2017-01-31
5 5
  */
6
-use JonasRudolph\PHPComponents\StringUtility\Implementation\StringUtility;
7 6
 use Net\Bazzline\Component\ApacheServerStatusParser\DomainModel\ReduceDataAbleToArrayInterface;
8 7
 
9 8
 require __DIR__ . '/../../vendor/autoload.php';
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 function dumpSectionIfThereIsSomeContent(array $lines, $name)
36 36
 {
37 37
     if (!empty($lines)) {
38
-        echo '==== ' . $name .' ====' . PHP_EOL;
38
+        echo '==== ' . $name . ' ====' . PHP_EOL;
39 39
         echo PHP_EOL;
40 40
 
41 41
         dumpArray($lines);
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 $parserBuilderFactory       = new \Net\Bazzline\Component\ApacheServerStatusParser\Service\Builder\ParserBuilderFactory();
54 54
 $storageBuilder             = new \Net\Bazzline\Component\ApacheServerStatusParser\Service\Builder\LocalStorageBuilder();
55 55
 
56
-$parserBuilder  = $parserBuilderFactory->create();
56
+$parserBuilder = $parserBuilderFactory->create();
57 57
 //end of dependencies
58 58
 
59 59
 //begin of business logic
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 $storageBuilder->selectParseModeAllUpfront();
64 64
 $storageBuilder->build();
65 65
 
66
-$listOfNameToElapsedTime['fetching']    = PHP_Timer::secondsToTimeString(
66
+$listOfNameToElapsedTime['fetching'] = PHP_Timer::secondsToTimeString(
67 67
     PHP_Timer::stop()
68 68
 );
69 69
 
Please login to merge, or discard this patch.
example/local/parse_detail_only.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,6 @@
 block discarded – undo
3 3
  * @author stev leibelt <[email protected]>
4 4
  * @since 2017-04-07
5 5
  */
6
-use JonasRudolph\PHPComponents\StringUtility\Implementation\StringUtility;
7 6
 use Net\Bazzline\Component\ApacheServerStatusParser\DomainModel\ReduceDataAbleToArrayInterface;
8 7
 
9 8
 require __DIR__ . '/../../vendor/autoload.php';
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 function dumpSectionIfThereIsSomeContent(array $lines, $name)
36 36
 {
37 37
     if (!empty($lines)) {
38
-        echo '==== ' . $name .' ====' . PHP_EOL;
38
+        echo '==== ' . $name . ' ====' . PHP_EOL;
39 39
         echo PHP_EOL;
40 40
 
41 41
         dumpArray($lines);
@@ -51,9 +51,9 @@  discard block
 block discarded – undo
51 51
     ? $argv[1]
52 52
     : __DIR__ . '/server-status?notable.html';
53 53
 $parserBuilderFactory       = new \Net\Bazzline\Component\ApacheServerStatusParser\Service\Builder\ParserBuilderFactory();
54
-$storageBuilder                    = new \Net\Bazzline\Component\ApacheServerStatusParser\Service\Builder\LocalStorageBuilder();
54
+$storageBuilder = new \Net\Bazzline\Component\ApacheServerStatusParser\Service\Builder\LocalStorageBuilder();
55 55
 
56
-$parserBuilder  = $parserBuilderFactory->create();
56
+$parserBuilder = $parserBuilderFactory->create();
57 57
 //end of dependencies
58 58
 
59 59
 //begin of business logic
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 $storageBuilder->selectParseModeDetailOnlyUpfront();
64 64
 $storageBuilder->build();
65 65
 
66
-$listOfNameToElapsedTime['fetching']    = PHP_Timer::secondsToTimeString(
66
+$listOfNameToElapsedTime['fetching'] = PHP_Timer::secondsToTimeString(
67 67
     PHP_Timer::stop()
68 68
 );
69 69
 
Please login to merge, or discard this patch.
example/remote/parse_all.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,6 @@
 block discarded – undo
3 3
  * @author stev leibelt <[email protected]>
4 4
  * @since 2017-01-31
5 5
  */
6
-use JonasRudolph\PHPComponents\StringUtility\Implementation\StringUtility;
7 6
 use Net\Bazzline\Component\ApacheServerStatusParser\DomainModel\ReduceDataAbleToArrayInterface;
8 7
 
9 8
 require __DIR__ . '/../../vendor/autoload.php';
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 function dumpSectionIfThereIsSomeContent(array $lines, $name)
36 36
 {
37 37
     if (!empty($lines)) {
38
-        echo '==== ' . $name .' ====' . PHP_EOL;
38
+        echo '==== ' . $name . ' ====' . PHP_EOL;
39 39
         echo PHP_EOL;
40 40
 
41 41
         dumpArray($lines);
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
     ? $argv[1]
54 54
     : 'http://testdata.bazzline.net/apache_server_status/index.html';
55 55
 
56
-$parserBuilder  = $parserBuilderFactory->create();
56
+$parserBuilder = $parserBuilderFactory->create();
57 57
 //end of dependencies
58 58
 
59 59
 //begin of business logic
@@ -63,11 +63,11 @@  discard block
 block discarded – undo
63 63
 $storageBuilder->selectParseModeAllUpfront();
64 64
 $storageBuilder->build();
65 65
 
66
-$listOfNameToElapsedTime['fetching']    = PHP_Timer::secondsToTimeString(
66
+$listOfNameToElapsedTime['fetching'] = PHP_Timer::secondsToTimeString(
67 67
     PHP_Timer::stop()
68 68
 );
69 69
 
70
-$storage    = $storageBuilder->andGetStorageAfterTheBuild();
70
+$storage = $storageBuilder->andGetStorageAfterTheBuild();
71 71
 
72 72
 dumpSectionIfThereIsSomeContent($storage->getListOfInformation(), 'Information');
73 73
 dumpSectionIfThereIsSomeContent($storage->getListOfDetail(), 'Detail');
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 $parserBuilder->setStorageUpfront($storage);
80 80
 $parserBuilder->build();
81 81
 
82
-$listOfNameToElapsedTime['parsing']    = PHP_Timer::secondsToTimeString(
82
+$listOfNameToElapsedTime['parsing'] = PHP_Timer::secondsToTimeString(
83 83
     PHP_Timer::stop()
84 84
 );
85 85
 
Please login to merge, or discard this patch.
source/Service/Builder/ParserBuilderFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
      */
21 21
     public function create()
22 22
     {
23
-        $stringUtility    = new StringUtility();
23
+        $stringUtility = new StringUtility();
24 24
 
25 25
         return new ParserBuilder(
26 26
             new DetailListOfLineParser(
Please login to merge, or discard this patch.
source/Service/Builder/RemoteStorageBuilder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
 
21 21
     public function __construct()
22 22
     {
23
-        $factory    = new BuilderFactory();
23
+        $factory = new BuilderFactory();
24 24
 
25 25
         $this->fetcher = new HttpFetcher(
26 26
             $factory->create()
Please login to merge, or discard this patch.
source/Service/Builder/ParserBuilder.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
      */
73 73
     public function setStorageUpfront(StorageInterface $storage)
74 74
     {
75
-        $this->storage  = $storage;
75
+        $this->storage = $storage;
76 76
     }
77 77
 
78 78
     /**
@@ -94,25 +94,25 @@  discard block
 block discarded – undo
94 94
 
95 95
         //begin of business logic
96 96
         if ($storage->hasListOfDetail()) {
97
-            $listOfDetailOrNull   = $detailListOfLineParser->parse(
97
+            $listOfDetailOrNull = $detailListOfLineParser->parse(
98 98
                 $storage->getListOfDetail()
99 99
             );
100 100
         }
101 101
 
102 102
         if ($storage->hasListOfInformation()) {
103
-            $informationOrNull  = $informationListOfLineParser->parse(
103
+            $informationOrNull = $informationListOfLineParser->parse(
104 104
                 $storage->getListOfInformation()
105 105
             );
106 106
         }
107 107
 
108 108
         if ($storage->hasListOfScoreboard()) {
109
-            $scoreboardOrNull   = $scoreboardListOfLineParser->parse(
109
+            $scoreboardOrNull = $scoreboardListOfLineParser->parse(
110 110
                 $storage->getListOfScoreboard()
111 111
             );
112 112
         }
113 113
 
114 114
         if ($storage->hasListOfStatistic()) {
115
-            $statisticOrNull    = $statisticListOfLineParser->parse(
115
+            $statisticOrNull = $statisticListOfLineParser->parse(
116 116
                 $storage->getListOfStatistic()
117 117
             );
118 118
         }
Please login to merge, or discard this patch.
source/Service/Content/Fetcher/AbstractFetcher.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,12 +17,12 @@
 block discarded – undo
17 17
     public function fetch()
18 18
     {
19 19
         //begin of business logic
20
-        $contentAsString        = strip_tags($this->fetchContentAsStringOrThrowRuntimeException());
20
+        $contentAsString = strip_tags($this->fetchContentAsStringOrThrowRuntimeException());
21 21
         $contentAsArray = explode(PHP_EOL, $contentAsString);
22 22
 
23 23
         $lines = array_filter(
24 24
             $contentAsArray,
25
-            function ($item) {
25
+            function($item) {
26 26
                 return (strlen(trim($item)) > 0);
27 27
             }
28 28
         );
Please login to merge, or discard this patch.
source/Service/Content/Fetcher/FileFetcher.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
     protected function fetchContentAsStringOrThrowRuntimeException()
29 29
     {
30 30
         //begin of dependencies
31
-        $path   = $this->path;
31
+        $path = $this->path;
32 32
         //end of dependencies
33 33
 
34 34
         //begin of business logic
Please login to merge, or discard this patch.
source/Service/Content/Fetcher/HttpFetcher.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
         Builder $builder
27 27
     )
28 28
     {
29
-        $this->requestBuilder   = $builder;
29
+        $this->requestBuilder = $builder;
30 30
     }
31 31
 
32 32
     /**
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
      */
35 35
     public function setUrl($url)
36 36
     {
37
-        $this->url  = $url;
37
+        $this->url = $url;
38 38
     }
39 39
 
40 40
     /**
Please login to merge, or discard this patch.