Passed
Push — master ( 7acf4e...727c5c )
by Stéphane
02:27
created
libs/Format/Confluence/Publisher.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 
57 57
         $this->run(
58 58
             'Getting already published pages...',
59
-            function () use (&$published) {
59
+            function() use (&$published) {
60 60
                 if ($published != null) {
61 61
                     $published['children'] = $this->client->getList($published['id'], true);
62 62
                 }
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 
66 66
         $published = $this->run(
67 67
             "Create placeholder pages...",
68
-            function () use ($tree, $published) {
68
+            function() use ($tree, $published) {
69 69
                 return $this->createRecursive($this->confluence['ancestor_id'], $tree, $published);
70 70
             }
71 71
         );
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 
147 147
     protected function createRecursive($parent_id, $entry, $published)
148 148
     {
149
-        $callback = function ($parent_id, $entry, $published) {
149
+        $callback = function($parent_id, $entry, $published) {
150 150
             // nothing to do if the ID already exists
151 151
             if (array_key_exists('id', $published)) {
152 152
                 return $published;
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 
168 168
     protected function updateRecursive($parent_id, $entry, $published)
169 169
     {
170
-        $callback = function ($parent_id, $entry, $published) {
170
+        $callback = function($parent_id, $entry, $published) {
171 171
             if (array_key_exists('id', $published) && array_key_exists('page', $entry)) {
172 172
                 $this->updatePage($parent_id, $entry, $published);
173 173
             }
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 
186 186
         $this->run(
187 187
             '- ' . PublisherUtilities::niceTitle($entry['file']->getUrl()),
188
-            function () use ($entry, $published, $parent_id, $updateThreshold) {
188
+            function() use ($entry, $published, $parent_id, $updateThreshold) {
189 189
                 $generated_content = $entry['page']->getContent();
190 190
                 if (PublisherUtilities::shouldUpdate($entry['page'], $generated_content, $published, $updateThreshold)) {
191 191
                     $this->client->updatePage(
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
             foreach ($entry['page']->attachments as $attachment) {
204 204
                 $this->run(
205 205
                     "  With attachment: $attachment[filename]",
206
-                    function ($write) use ($published, $attachment) {
206
+                    function($write) use ($published, $attachment) {
207 207
                         $this->client->uploadAttachment($published['id'], $attachment, $write);
208 208
                     }
209 209
                 );
Please login to merge, or discard this patch.
templates/home.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -10,11 +10,11 @@  discard block
 block discarded – undo
10 10
 
11 11
 <div class="Homepage">
12 12
     <div class="HomepageTitle Container">
13
-        <?= ($params['tagline'])? '<h2>' . $params['tagline'] . '</h2>' : '' ?>
13
+        <?= ($params['tagline']) ? '<h2>' . $params['tagline'] . '</h2>' : '' ?>
14 14
     </div>
15 15
 
16 16
     <div class="HomepageImage Container">
17
-        <?= ($params['image'])? '<img class="homepage-image img-responsive" src="' . $params['image'] . '" alt="' . $params['title'] . '">' : '' ?>
17
+        <?= ($params['image']) ? '<img class="homepage-image img-responsive" src="' . $params['image'] . '" alt="' . $params['title'] . '">' : '' ?>
18 18
     </div>
19 19
 
20 20
     <div class="HomepageButtons">
@@ -27,8 +27,8 @@  discard block
 block discarded – undo
27 27
             foreach ($page['entry_page'] as $key => $node) {
28 28
                 echo '<a href="' . $node . '" class="Button Button--primary Button--hero">' . str_replace("__VIEW_DOCUMENTATION__", $view_doc, $key) . '</a>';
29 29
             }
30
-            if(isset($params['html']['buttons']) && is_array($params['html']['buttons'])) {
31
-                foreach ($params['html']['buttons'] as $name => $link ) {
30
+            if (isset($params['html']['buttons']) && is_array($params['html']['buttons'])) {
31
+                foreach ($params['html']['buttons'] as $name => $link) {
32 32
                     echo '<a href="' . $link . '" class="Button Button--secondary Button--hero">' . $name . '</a>';
33 33
                 }
34 34
             }
Please login to merge, or discard this patch.
templates/layout/00_layout.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <!DOCTYPE html>
2 2
 <html class="no-js" lang="<?=$params['language'] ?>">
3 3
 <head>
4
-    <title><?= $page['title']; ?> <?= ($page['title'] != $params['title'])? '- ' . $params['title'] : "" ?></title>
4
+    <title><?= $page['title']; ?> <?= ($page['title'] != $params['title']) ? '- ' . $params['title'] : "" ?></title>
5 5
 <?php //SEO meta tags...
6 6
     if (array_key_exists('attributes', $page) && array_key_exists('description', $page['attributes'])) {
7 7
         echo "    <meta name=\"description\" content=\"{$page['attributes']['description']}\">\n";
Please login to merge, or discard this patch.
libs/Format/HTML/ContentTypes/Markdown/TOC/Processor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -139,7 +139,7 @@
 block discarded – undo
139 139
             }
140 140
         }
141 141
 
142
-        $node->data['attributes']['id'] = $this->getUniqueId($document,'page_'. $this->escaped($text));
142
+        $node->data['attributes']['id'] = $this->getUniqueId($document, 'page_' . $this->escaped($text));
143 143
     }
144 144
 
145 145
     /**
Please login to merge, or discard this patch.
libs/Format/HTMLFile/ContentPage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
                 $content,
19 19
                 $this->file,
20 20
                 function($src, array $attributes, Raw $file) {
21
-                    $content =  base64_encode(file_get_contents($file->getPath()));
21
+                    $content = base64_encode(file_get_contents($file->getPath()));
22 22
                     $attr = '';
23 23
                     foreach ($attributes as $name => $value) {
24 24
                         $attr .= ' ' . $name . '="' . htmlentities($value, ENT_QUOTES, 'UTF-8', false) . '"';
Please login to merge, or discard this patch.
libs/Format/HTMLFile/Generator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@
 block discarded – undo
90 90
             $this->runAction(
91 91
                 'Generating ' . $current->getTitle(),
92 92
                 $width,
93
-                function () use ($book, $current, $params) {
93
+                function() use ($book, $current, $params) {
94 94
                     $contentType = $this->daux->getContentTypeHandler()->getType($current);
95 95
                     $content = ContentPage::fromFile($current, $params, $contentType);
96 96
                     $content->templateRenderer = $this->templateRenderer;
Please login to merge, or discard this patch.
libs/Format/HTML/Template.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -77,13 +77,13 @@  discard block
 block discarded – undo
77 77
 
78 78
     protected function registerFunctions($engine)
79 79
     {
80
-        $engine->registerFunction('get_navigation', function ($tree, $path, $current_url, $base_page, $mode) {
80
+        $engine->registerFunction('get_navigation', function($tree, $path, $current_url, $base_page, $mode) {
81 81
             $nav = $this->buildNavigation($tree, $path, $current_url, $base_page, $mode);
82 82
 
83 83
             return $this->renderNavigation($nav);
84 84
         });
85 85
 
86
-        $engine->registerFunction('translate', function ($key) {
86
+        $engine->registerFunction('translate', function($key) {
87 87
             $language = $this->params['language'];
88 88
 
89 89
             if (isset($this->engine->getData('page')['page'])) {
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
             return "Unknown key $key";
107 107
         });
108 108
 
109
-        $engine->registerFunction('get_breadcrumb_title', function ($page, $base_page) {
109
+        $engine->registerFunction('get_breadcrumb_title', function($page, $base_page) {
110 110
             $title = '';
111 111
             $breadcrumb_trail = $page['breadcrumb_trail'];
112 112
             $separator = $this->getSeparator($page['breadcrumb_separator']);
Please login to merge, or discard this patch.
libs/Console/RunAction.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
         $padding = $width - $this->getLength($title) - 10;
20 20
 
21 21
         try {
22
-            $response = $closure(function ($content) use (&$padding, $verbose) {
22
+            $response = $closure(function($content) use (&$padding, $verbose) {
23 23
                 $padding -= $this->getLength($content);
24 24
                 Daux::write($content, $verbose);
25 25
             });
Please login to merge, or discard this patch.
templates/partials/search_script.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
             "Link_next",
14 14
         ];
15 15
         $search_translations = [];
16
-        foreach($search_strings as $key) {
16
+        foreach ($search_strings as $key) {
17 17
             $search_translations[$key] = $this->translate($key);
18 18
         }
19 19
         ?>
Please login to merge, or discard this patch.