Completed
Pull Request — master (#41)
by Vladimir
04:25
created
tests/allejo/stakx/Test/StreamInterceptor.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
 {
17 17
     public static $output = '';
18 18
 
19
-    public function filter($in, $out, &$consumed, $closing)
19
+    public function filter ($in, $out, &$consumed, $closing)
20 20
     {
21 21
         while ($bucket = stream_bucket_make_writeable($in)) {
22 22
             self::$output .= $bucket->data;
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,8 @@
 block discarded – undo
18 18
 
19 19
     public function filter($in, $out, &$consumed, $closing)
20 20
     {
21
-        while ($bucket = stream_bucket_make_writeable($in)) {
21
+        while ($bucket = stream_bucket_make_writeable($in))
22
+        {
22 23
             self::$output .= $bucket->data;
23 24
             $consumed += $bucket->datalen;
24 25
         }
Please login to merge, or discard this patch.
tests/allejo/stakx/Test/PHPUnit_Stakx_TestCase.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
      */
37 37
     protected $fs;
38 38
 
39
-    public function setUp()
39
+    public function setUp ()
40 40
     {
41 41
         $this->dummyFile = vfsStream::newFile('stakx.html.twig');
42 42
         $this->rootDir = vfsStream::setup();
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     // Utility Functions
51 51
     //
52 52
 
53
-    protected function bookCollectionProvider($jailed = false)
53
+    protected function bookCollectionProvider ($jailed = false)
54 54
     {
55 55
         $cm = new CollectionManager();
56 56
         $cm->setLogger($this->getMockLogger());
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
      *
72 72
      * @return mixed
73 73
      */
74
-    protected function createVirtualFile($classType, $frontMatter = array(), $body = 'Body Text')
74
+    protected function createVirtualFile ($classType, $frontMatter = array(), $body = 'Body Text')
75 75
     {
76 76
         $this->dummyFile
77 77
             ->setContent($this->generateFM($frontMatter, $body))
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
         return new $classType($this->dummyFile->url());
81 81
     }
82 82
 
83
-    protected function createMultipleVirtualFiles($classType, $elements)
83
+    protected function createMultipleVirtualFiles ($classType, $elements)
84 84
     {
85 85
         $results = array();
86 86
 
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
      *
106 106
      * @return LoggerInterface
107 107
      */
108
-    protected function getMockLogger()
108
+    protected function getMockLogger ()
109 109
     {
110 110
         return $this->getMock(LoggerInterface::class);
111 111
     }
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
      *
116 116
      * @return StakxLogger
117 117
      */
118
-    protected function getReadableLogger()
118
+    protected function getReadableLogger ()
119 119
     {
120 120
         stream_filter_register('intercept', StreamInterceptor::class);
121 121
         $stakxLogger = new StakxLogger(new ConsoleOutput());
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
      *
133 133
      * @return string
134 134
      */
135
-    protected function generateFM(array $frontMatter = array(), $body = 'Body text')
135
+    protected function generateFM (array $frontMatter = array(), $body = 'Body text')
136 136
     {
137 137
         $fm = (empty($frontMatter)) ? '' : Yaml::dump($frontMatter, 2);
138 138
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -84,7 +84,8 @@
 block discarded – undo
84 84
     {
85 85
         $results = array();
86 86
 
87
-        foreach ($elements as $element) {
87
+        foreach ($elements as $element)
88
+        {
88 89
             $filename = (isset($element['filename'])) ? $element['filename'] : hash('sha256', uniqid(mt_rand(), true), false);
89 90
             $frontMatter = (empty($element['frontmatter'])) ? '' : Yaml::dump($element['frontmatter'], 2);
90 91
             $body = (isset($element['body'])) ? $element['body'] : 'Body Text';
Please login to merge, or discard this patch.