Completed
Push — master ( 5ee980...f98a74 )
by Vladimir
06:16 queued 03:33
created
src/Object/Configuration.php 2 patches
Doc Comments   +10 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
      * Configuration constructor.
35 35
      *
36 36
      * @param string                                $configFile
37
-     * @param ConsoleInterface|OutputInterface|null $output
37
+     * @param ConsoleInterface $output
38 38
      */
39 39
     public function __construct($configFile, $output = null)
40 40
     {
@@ -83,11 +83,17 @@  discard block
 block discarded – undo
83 83
         return $base;
84 84
     }
85 85
 
86
+    /**
87
+     * @return string[]
88
+     */
86 89
     public function getDataFolders ()
87 90
     {
88 91
         return $this->returnConfigOption('data');
89 92
     }
90 93
 
94
+    /**
95
+     * @return string[]
96
+     */
91 97
     public function getDataSets ()
92 98
     {
93 99
         return $this->returnConfigOption('datasets');
@@ -133,6 +139,9 @@  discard block
 block discarded – undo
133 139
         return $this->configuration['twig']['autoescape'];
134 140
     }
135 141
 
142
+    /**
143
+     * @param string $name
144
+     */
136 145
     private function returnConfigOption ($name, $default = null)
137 146
     {
138 147
         return (isset($this->configuration[$name]) ? $this->configuration[$name] : $default);
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
      * @param string                                $configFile
37 37
      * @param ConsoleInterface|OutputInterface|null $output
38 38
      */
39
-    public function __construct($configFile, $output = null)
39
+    public function __construct ($configFile, $output = null)
40 40
     {
41 41
         $this->configuration = array();
42 42
         $this->output        = new ConsoleInterface($output);
Please login to merge, or discard this patch.
src/System/FileSystem.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -140,6 +140,9 @@
 block discarded – undo
140 140
         return pathinfo($filename, PATHINFO_EXTENSION);
141 141
     }
142 142
 
143
+    /**
144
+     * @param string $folderPath
145
+     */
143 146
     public function isDir ($folderPath)
144 147
     {
145 148
         return is_dir($folderPath);
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -66,9 +66,9 @@  discard block
 block discarded – undo
66 66
     {
67 67
         $finder = new Finder();
68 68
         $finder->files()
69
-               ->ignoreVCS(true)
70
-               ->ignoreDotFiles(true)
71
-               ->ignoreUnreadableDirs();
69
+                ->ignoreVCS(true)
70
+                ->ignoreDotFiles(true)
71
+                ->ignoreUnreadableDirs();
72 72
 
73 73
         $finder->in(
74 74
             empty(trim($searchIn)) ? getcwd() : $searchIn
@@ -155,9 +155,9 @@  discard block
 block discarded – undo
155 155
     public function removeExtension ($filename)
156 156
     {
157 157
         return $this->appendPath(
158
-                   $this->getFolderPath($filename),
159
-                   $this->getBaseName($filename)
160
-               );
158
+                    $this->getFolderPath($filename),
159
+                    $this->getBaseName($filename)
160
+                );
161 161
     }
162 162
 
163 163
     /**
Please login to merge, or discard this patch.
src/System/Folder.php 1 patch
Doc Comments   +11 added lines patch added patch discarded remove patch
@@ -62,6 +62,10 @@  discard block
 block discarded – undo
62 62
         }
63 63
     }
64 64
 
65
+    /**
66
+     * @param string $absolutePath
67
+     * @param string $targetPath
68
+     */
65 69
     public function copyFile ($absolutePath, $targetPath)
66 70
     {
67 71
         $targetPath = ltrim($targetPath, DIRECTORY_SEPARATOR);
@@ -73,6 +77,10 @@  discard block
 block discarded – undo
73 77
         );
74 78
     }
75 79
 
80
+    /**
81
+     * @param string $targetPath
82
+     * @param string $fileContent
83
+     */
76 84
     public function writeFile ($targetPath, $fileContent)
77 85
     {
78 86
         $outputFolder   = $this->fs->getFolderPath($targetPath);
@@ -98,6 +106,9 @@  discard block
 block discarded – undo
98 106
         ));
99 107
     }
100 108
 
109
+    /**
110
+     * @param string $pathFragments
111
+     */
101 112
     private function buildPath ($pathFragments)
102 113
     {
103 114
         $paths = func_get_args();
Please login to merge, or discard this patch.
src/Twig/TextFilter.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
     /**
16 16
      * Returns a list of filters.
17 17
      *
18
-     * @return array
18
+     * @return Twig_SimpleFilter[]
19 19
      */
20 20
     public function getFilters()
21 21
     {
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
      *
18 18
      * @return array
19 19
      */
20
-    public function getFilters()
20
+    public function getFilters ()
21 21
     {
22 22
         return array(
23 23
             new Twig_SimpleFilter('truncate', 'twig_truncate_filter', array('needs_environment' => true)),
@@ -30,14 +30,14 @@  discard block
 block discarded – undo
30 30
      *
31 31
      * @return string
32 32
      */
33
-    public function getName()
33
+    public function getName ()
34 34
     {
35 35
         return 'Text';
36 36
     }
37 37
 }
38 38
 
39 39
 if (function_exists('mb_get_info')) {
40
-    function twig_truncate_filter(Twig_Environment $env, $value, $length = 30, $preserve = false, $separator = '...')
40
+    function twig_truncate_filter (Twig_Environment $env, $value, $length = 30, $preserve = false, $separator = '...')
41 41
     {
42 42
         if (mb_strlen($value, $env->getCharset()) > $length) {
43 43
             if ($preserve) {
@@ -49,13 +49,13 @@  discard block
 block discarded – undo
49 49
                 $length = $breakpoint;
50 50
             }
51 51
 
52
-            return rtrim(mb_substr($value, 0, $length, $env->getCharset())).$separator;
52
+            return rtrim(mb_substr($value, 0, $length, $env->getCharset())) . $separator;
53 53
         }
54 54
 
55 55
         return $value;
56 56
     }
57 57
 
58
-    function twig_wordwrap_filter(Twig_Environment $env, $value, $length = 80, $separator = "\n", $preserve = false)
58
+    function twig_wordwrap_filter (Twig_Environment $env, $value, $length = 80, $separator = "\n", $preserve = false)
59 59
     {
60 60
         $sentences = array();
61 61
 
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
         return implode($separator, $sentences);
78 78
     }
79 79
 } else {
80
-    function twig_truncate_filter(Twig_Environment $env, $value, $length = 30, $preserve = false, $separator = '...')
80
+    function twig_truncate_filter (Twig_Environment $env, $value, $length = 30, $preserve = false, $separator = '...')
81 81
     {
82 82
         if (strlen($value) > $length) {
83 83
             if ($preserve) {
@@ -86,13 +86,13 @@  discard block
 block discarded – undo
86 86
                 }
87 87
             }
88 88
 
89
-            return rtrim(substr($value, 0, $length)).$separator;
89
+            return rtrim(substr($value, 0, $length)) . $separator;
90 90
         }
91 91
 
92 92
         return $value;
93 93
     }
94 94
 
95
-    function twig_wordwrap_filter(Twig_Environment $env, $value, $length = 80, $separator = "\n", $preserve = false)
95
+    function twig_wordwrap_filter (Twig_Environment $env, $value, $length = 80, $separator = "\n", $preserve = false)
96 96
     {
97 97
         return wordwrap($value, $length, $separator, !$preserve);
98 98
     }
Please login to merge, or discard this patch.
Braces   +21 added lines, -10 removed lines patch added patch discarded remove patch
@@ -36,13 +36,17 @@  discard block
 block discarded – undo
36 36
     }
37 37
 }
38 38
 
39
-if (function_exists('mb_get_info')) {
39
+if (function_exists('mb_get_info'))
40
+{
40 41
     function twig_truncate_filter(Twig_Environment $env, $value, $length = 30, $preserve = false, $separator = '...')
41 42
     {
42
-        if (mb_strlen($value, $env->getCharset()) > $length) {
43
-            if ($preserve) {
43
+        if (mb_strlen($value, $env->getCharset()) > $length)
44
+        {
45
+            if ($preserve)
46
+            {
44 47
                 // If breakpoint is on the last word, return the value without separator.
45
-                if (false === ($breakpoint = mb_strpos($value, ' ', $length, $env->getCharset()))) {
48
+                if (false === ($breakpoint = mb_strpos($value, ' ', $length, $env->getCharset())))
49
+                {
46 50
                     return $value;
47 51
                 }
48 52
 
@@ -65,8 +69,10 @@  discard block
 block discarded – undo
65 69
         $pieces = mb_split($separator, $value);
66 70
         mb_regex_encoding($previous);
67 71
 
68
-        foreach ($pieces as $piece) {
69
-            while (!$preserve && mb_strlen($piece, $env->getCharset()) > $length) {
72
+        foreach ($pieces as $piece)
73
+        {
74
+            while (!$preserve && mb_strlen($piece, $env->getCharset()) > $length)
75
+            {
70 76
                 $sentences[] = mb_substr($piece, 0, $length, $env->getCharset());
71 77
                 $piece = mb_substr($piece, $length, 2048, $env->getCharset());
72 78
             }
@@ -76,12 +82,17 @@  discard block
 block discarded – undo
76 82
 
77 83
         return implode($separator, $sentences);
78 84
     }
79
-} else {
85
+}
86
+else
87
+{
80 88
     function twig_truncate_filter(Twig_Environment $env, $value, $length = 30, $preserve = false, $separator = '...')
81 89
     {
82
-        if (strlen($value) > $length) {
83
-            if ($preserve) {
84
-                if (false !== ($breakpoint = strpos($value, ' ', $length))) {
90
+        if (strlen($value) > $length)
91
+        {
92
+            if ($preserve)
93
+            {
94
+                if (false !== ($breakpoint = strpos($value, ' ', $length)))
95
+                {
85 96
                     $length = $breakpoint;
86 97
                 }
87 98
             }
Please login to merge, or discard this patch.
src/Manager/PageManager.php 3 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -76,10 +76,10 @@
 block discarded – undo
76 76
 
77 77
             $finder = new Finder();
78 78
             $finder->files()
79
-                   ->name('/\.(html|twig)/')
80
-                   ->ignoreDotFiles(true)
81
-                   ->ignoreUnreadableDirs()
82
-                   ->in($pageViewFolder);
79
+                    ->name('/\.(html|twig)/')
80
+                    ->ignoreDotFiles(true)
81
+                    ->ignoreUnreadableDirs()
82
+                    ->in($pageViewFolder);
83 83
 
84 84
             foreach ($finder as $viewFile)
85 85
             {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
     /**
33 33
      * PageManager constructor
34 34
      */
35
-    public function __construct()
35
+    public function __construct ()
36 36
     {
37 37
         parent::__construct();
38 38
 
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,7 +58,9 @@  discard block
 block discarded – undo
58 58
      */
59 59
     public function parsePageViews ($pageViewFolders)
60 60
     {
61
-        if (empty($pageViewFolders)) { return; }
61
+        if (empty($pageViewFolders))
62
+        {
63
+return; }
62 64
 
63 65
         /**
64 66
          * The name of the folder where PageViews are located
@@ -109,7 +111,9 @@  discard block
 block discarded – undo
109 111
      */
110 112
     public function prepareDynamicPageViews ($collections)
111 113
     {
112
-        if (empty($collections)) { return; }
114
+        if (empty($collections))
115
+        {
116
+return; }
113 117
 
114 118
         foreach ($this->dynamicPageViews as $pageView)
115 119
         {
Please login to merge, or discard this patch.
src/Manager/DataManager.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -112,9 +112,9 @@
 block discarded – undo
112 112
         $dataItems = array();
113 113
         $finder    = new Finder();
114 114
         $finder->files()
115
-               ->ignoreDotFiles(true)
116
-               ->ignoreUnreadableDirs()
117
-               ->in($this->fs->absolutePath($folder));
115
+                ->ignoreDotFiles(true)
116
+                ->ignoreUnreadableDirs()
117
+                ->in($this->fs->absolutePath($folder));
118 118
 
119 119
         foreach ($finder as $dataItem)
120 120
         {
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -64,7 +64,9 @@  discard block
 block discarded – undo
64 64
      */
65 65
     public function parseDataItems ($folders)
66 66
     {
67
-        if ($folders === null) { return; }
67
+        if ($folders === null)
68
+        {
69
+return; }
68 70
 
69 71
         foreach ($folders as $folder)
70 72
         {
@@ -84,7 +86,9 @@  discard block
 block discarded – undo
84 86
      */
85 87
     public function parseDataSets ($dataSets)
86 88
     {
87
-        if ($dataSets === null) { return; }
89
+        if ($dataSets === null)
90
+        {
91
+return; }
88 92
 
89 93
         /**
90 94
          * The information which each DataSet has from the configuration file
Please login to merge, or discard this patch.
src/Command/BuildableCommand.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
      *
61 61
      * @param  InputInterface  $input
62 62
      *
63
-     * @return bool True if the website was configured properly
63
+     * @return boolean|null True if the website was configured properly
64 64
      */
65 65
     protected function configureBuild (InputInterface $input)
66 66
     {
Please login to merge, or discard this patch.
src/Manager/CollectionManager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
      */
13 13
     private $collections;
14 14
 
15
-    public function __construct()
15
+    public function __construct ()
16 16
     {
17 17
         parent::__construct();
18 18
 
Please login to merge, or discard this patch.
src/Engines/Markdown/TwigMarkdownEngine.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 {
9 9
     protected $engine;
10 10
 
11
-    public function __construct($instanceName = null)
11
+    public function __construct ($instanceName = null)
12 12
     {
13 13
         $this->engine = MarkdownEngine::instance($instanceName);
14 14
     }
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
     /**
17 17
      * {@inheritdoc}
18 18
      */
19
-    public function transform($content)
19
+    public function transform ($content)
20 20
     {
21 21
         return $this->engine->parse($content);
22 22
     }
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
     /**
25 25
      * {@inheritdoc}
26 26
      */
27
-    public function getName()
27
+    public function getName ()
28 28
     {
29 29
         return 'stakx/parsedown';
30 30
     }
Please login to merge, or discard this patch.