Completed
Push — master ( 2653fe...0ddd24 )
by Marc
02:16
created
lib/PhpFlo/Test/TestUtilityTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
      * @param array $methods
32 32
      * @return \PHPUnit_Framework_MockObject_MockObject
33 33
      */
34
-    public function stub($class, array $methods = [])
34
+    public function stub($class, array $methods = [ ])
35 35
     {
36 36
         $stub = $this->getMockBuilder($class)
37 37
             ->disableOriginalConstructor()
Please login to merge, or discard this patch.
lib/PhpFlo/Logger/SimpleFile.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -40,14 +40,14 @@  discard block
 block discarded – undo
40 40
         $log = pathinfo($logFile);
41 41
         // check if $logFile is a dir because of possible stream url
42 42
         $isLogdir = is_dir($logFile);
43
-        if (!$isLogdir && (isset($log['dirname']) && !is_dir($log['dirname']))) {
43
+        if (!$isLogdir && (isset($log[ 'dirname' ]) && !is_dir($log[ 'dirname' ]))) {
44 44
             throw new \InvalidArgumentException(
45
-                "Directory does not exist: {$log['dirname']}"
45
+                "Directory does not exist: {$log[ 'dirname' ]}"
46 46
             );
47 47
         }
48 48
 
49
-        if ($isLogdir || !isset($log['filename'])) {
50
-            $logFile = $logFile . DIRECTORY_SEPARATOR . self::DEFAULT_FILENAME;
49
+        if ($isLogdir || !isset($log[ 'filename' ])) {
50
+            $logFile = $logFile.DIRECTORY_SEPARATOR.self::DEFAULT_FILENAME;
51 51
         }
52 52
         $this->logFile = $logFile;
53 53
 
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
     {
68 68
         if (in_array($level, $this->levels)) {
69 69
             file_put_contents(
70
-                $this->logFile, $message . PHP_EOL, FILE_APPEND
70
+                $this->logFile, $message.PHP_EOL, FILE_APPEND
71 71
             );
72 72
         }
73 73
     }
Please login to merge, or discard this patch.
examples/linecount/countFromFbp.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -5,20 +5,20 @@
 block discarded – undo
5 5
  * to "wc -l <filename>"
6 6
  */
7 7
 
8
-if (!isset($_SERVER['argv'][1])) {
8
+if (!isset($_SERVER[ 'argv' ][ 1 ])) {
9 9
     die("You must provide a filename\n");
10 10
 }
11
-$fileName = $_SERVER['argv'][1];
11
+$fileName = $_SERVER[ 'argv' ][ 1 ];
12 12
 
13 13
 // Include standard autoloader
14
-require __DIR__ . '/../../vendor/autoload.php';
14
+require __DIR__.'/../../vendor/autoload.php';
15 15
 
16 16
 // create network
17 17
 $traceableNetwork = new \PhpFlo\TraceableNetwork(
18 18
     new PhpFlo\Network(
19 19
         new PhpFlo\Builder\ComponentFactory()
20 20
     ),
21
-    new \PhpFlo\Logger\SimpleFile(__DIR__ . DIRECTORY_SEPARATOR . 'flow.log', 'info')
21
+    new \PhpFlo\Logger\SimpleFile(__DIR__.DIRECTORY_SEPARATOR.'flow.log', 'info')
22 22
 );
23 23
 $traceableNetwork
24 24
     ->boot(__DIR__.'/count.fbp')
Please login to merge, or discard this patch.
lib/PhpFlo/TraceableNetwork.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -90,21 +90,21 @@  discard block
 block discarded – undo
90 90
      */
91 91
     private function traceData(array $args, $type)
92 92
     {
93
-        $data   = $args[0];
94
-        $socket = $args[1];
93
+        $data   = $args[ 0 ];
94
+        $socket = $args[ 1 ];
95 95
 
96 96
         if (!is_string($data)) {
97 97
             $data = serialize($data);
98 98
         }
99 99
         $to = $socket->to();
100
-        $message = "-> {$to['port']} {$to['process']['id']}";
100
+        $message = "-> {$to[ 'port' ]} {$to[ 'process' ][ 'id' ]}";
101 101
 
102 102
         $from = $socket->from();
103
-        if (isset($from['process'])) {
104
-            $message = " {$from['process']['id']} {$from['port']} {$message}";
103
+        if (isset($from[ 'process' ])) {
104
+            $message = " {$from[ 'process' ][ 'id' ]} {$from[ 'port' ]} {$message}";
105 105
         }
106 106
 
107
-        $this->logger->info("{$message} {$this->actions[$type]} {$data}");
107
+        $this->logger->info("{$message} {$this->actions[ $type ]} {$data}");
108 108
     }
109 109
 
110 110
     /**
@@ -113,15 +113,15 @@  discard block
 block discarded – undo
113 113
      */
114 114
     private function traceAction(array $args, $type)
115 115
     {
116
-        $socket = $args[0];
116
+        $socket = $args[ 0 ];
117 117
         $to = $socket->to();
118
-        $message = "-> {$to['port']} {$to['process']['id']}";
118
+        $message = "-> {$to[ 'port' ]} {$to[ 'process' ][ 'id' ]}";
119 119
 
120 120
         $from = $socket->from();
121
-        if (isset($from['process'])) {
122
-            $message = " {$from['process']['id']} {$from['port']} {$message}";
121
+        if (isset($from[ 'process' ])) {
122
+            $message = " {$from[ 'process' ][ 'id' ]} {$from[ 'port' ]} {$message}";
123 123
         }
124 124
 
125
-        $this->logger->debug("{$message} {$this->actions[$type]}");
125
+        $this->logger->debug("{$message} {$this->actions[ $type ]}");
126 126
     }
127 127
 }
Please login to merge, or discard this patch.