Passed
Push — develop ( 8c8a50...38b54f )
by nguereza
01:42
created
src/Convertor/NullConvertor.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,8 +52,7 @@
 block discarded – undo
52 52
  * @class NullConvertor
53 53
  * @package Platine\DocxTemplate\Convertor
54 54
  */
55
-class NullConvertor implements DocxConvertorInterface
56
-{
55
+class NullConvertor implements DocxConvertorInterface {
57 56
     /**
58 57
      * {@inheritodc}
59 58
      */
Please login to merge, or discard this patch.
src/Convertor/LibreOfficePDFConvertor.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,8 +52,7 @@
 block discarded – undo
52 52
  * @class LibreOfficePDFConvertor
53 53
  * @package Platine\DocxTemplate\Convertor
54 54
  */
55
-class LibreOfficePDFConvertor implements DocxConvertorInterface
56
-{
55
+class LibreOfficePDFConvertor implements DocxConvertorInterface {
57 56
 
58 57
     /**
59 58
      * {@inheritodc}
Please login to merge, or discard this patch.
src/DocxTemplateRendererInterface.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,8 +51,7 @@
 block discarded – undo
51 51
  * @class DocxTemplateRendererInterface
52 52
  * @package Platine\DocxTemplate
53 53
  */
54
-interface DocxTemplateRendererInterface
55
-{
54
+interface DocxTemplateRendererInterface {
56 55
 
57 56
     /**
58 57
      * Render the template content
Please login to merge, or discard this patch.
src/DocxTemplate.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -282,7 +282,7 @@
 block discarded – undo
282 282
             ZipArchive::CREATE | ZipArchive::OVERWRITE
283 283
         );
284 284
         if ($create === true) {
285
-             // Create recursive directory iterator
285
+                // Create recursive directory iterator
286 286
             $files = new RecursiveIteratorIterator(
287 287
                 new RecursiveDirectoryIterator($this->templateExtractDir, FilesystemIterator::SKIP_DOTS),
288 288
                 RecursiveIteratorIterator::LEAVES_ONLY
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -344,7 +344,7 @@
 block discarded – undo
344 344
             $total = $zip->numFiles;
345 345
             for ($i = 0; $i < $total; $i++) {
346 346
                 $stat = $zip->statIndex($i);
347
-                if($stat !== false ){
347
+                if ($stat !== false) {
348 348
                     foreach ($this->fileListToProcess as $fileToProcess) {
349 349
                         if (fnmatch($fileToProcess, $stat['name'])) {
350 350
                             $fileList[] = $stat['name'];
Please login to merge, or discard this patch.
Braces   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -60,8 +60,7 @@  discard block
 block discarded – undo
60 60
  * @class DocxTemplate
61 61
  * @package Platine\DocxTemplate
62 62
  */
63
-class DocxTemplate
64
-{
63
+class DocxTemplate {
65 64
 
66 65
     /**
67 66
      * The convertor instance to use
@@ -344,7 +343,7 @@  discard block
 block discarded – undo
344 343
             $total = $zip->numFiles;
345 344
             for ($i = 0; $i < $total; $i++) {
346 345
                 $stat = $zip->statIndex($i);
347
-                if($stat !== false ){
346
+                if($stat !== false ) {
348 347
                     foreach ($this->fileListToProcess as $fileToProcess) {
349 348
                         if (fnmatch($fileToProcess, $stat['name'])) {
350 349
                             $fileList[] = $stat['name'];
Please login to merge, or discard this patch.
src/Exception/DocxTemplateException.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,6 +39,5 @@
 block discarded – undo
39 39
  * @class DocxTemplateException
40 40
  * @package Platine\DocxTemplate\Exception
41 41
  */
42
-class DocxTemplateException extends Exception
43
-{
42
+class DocxTemplateException extends Exception {
44 43
 }
Please login to merge, or discard this patch.
src/DocxConvertorInterface.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,8 +51,7 @@
 block discarded – undo
51 51
  * @class DocxConvertorInterface
52 52
  * @package Platine\DocxTemplate
53 53
  */
54
-interface DocxConvertorInterface
55
-{
54
+interface DocxConvertorInterface {
56 55
 
57 56
     /**
58 57
      * Convert the template file
Please login to merge, or discard this patch.
src/Renderer/PlatineTemplateRenderer.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
         // coem with the expected content
98 98
         $variables = (string) preg_replace_callback(
99 99
             '/{{(.*?)}}/',
100
-            function ($match) {
100
+            function($match) {
101 101
                 return strip_tags($match[0]);
102 102
             },
103 103
             (string) preg_replace('/(?<!{){(?!{)<\/w:t>[\s\S]*?<w:t>{/', '{{', $content)
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 
106 106
         return (string) preg_replace_callback(
107 107
             '/{%(.*?)%}/',
108
-            function ($match) {
108
+            function($match) {
109 109
                 return strip_tags($match[0]);
110 110
             },
111 111
             (string) preg_replace('/(?<!{){(?!{)<\/w:t>[\s\S]*?<w:t>{/', '{%', $variables)
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,8 +53,7 @@  discard block
 block discarded – undo
53 53
  * @class PlatineTemplateRenderer
54 54
  * @package Platine\DocxTemplate\Renderer
55 55
  */
56
-class PlatineTemplateRenderer implements DocxTemplateRendererInterface
57
-{
56
+class PlatineTemplateRenderer implements DocxTemplateRendererInterface {
58 57
     /**
59 58
      * The template instance to use
60 59
      * @var Template
@@ -65,8 +64,7 @@  discard block
 block discarded – undo
65 64
      * Create new instance
66 65
      * @param Template $template
67 66
      */
68
-    public function __construct(Template $template)
69
-    {
67
+    public function __construct(Template $template) {
70 68
         $this->template = $template;
71 69
     }
72 70
 
Please login to merge, or discard this patch.
src/Renderer/NullRenderer.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,8 +52,7 @@
 block discarded – undo
52 52
  * @class NullRenderer
53 53
  * @package Platine\DocxTemplate\Renderer
54 54
  */
55
-class NullRenderer implements DocxTemplateRendererInterface
56
-{
55
+class NullRenderer implements DocxTemplateRendererInterface {
57 56
     /**
58 57
      * {@inheritodc}
59 58
      */
Please login to merge, or discard this patch.