Completed
Pull Request — master (#48)
by Vladimir
02:38
created
src/allejo/stakx/System/FileExplorer.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,8 +63,8 @@
 block discarded – undo
63 63
      * FileExplorer constructor.
64 64
      *
65 65
      * @param \RecursiveIterator $iterator
66
-     * @param array              $excludes
67
-     * @param array              $includes
66
+     * @param string[]              $excludes
67
+     * @param string[]              $includes
68 68
      * @param int|null           $flags
69 69
      */
70 70
     public function __construct(\RecursiveIterator $iterator, array $excludes = array(), array $includes = array(), $flags = null)
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -203,7 +203,8 @@
 block discarded – undo
203 203
             }
204 204
 
205 205
             if (strpos($haystack, $query, $offset) !== false)
206
-            { // stop on first true result
206
+            {
207
+// stop on first true result
207 208
                 return true;
208 209
             }
209 210
         }
Please login to merge, or discard this patch.
src/allejo/stakx/Manager/ThemeManager.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 
25 25
         if (!$this->fs->exists($this->themeFolder))
26 26
         {
27
-            throw new FileNotFoundException("The '${themeName}' theme folder could not be found.'");
27
+            throw new FileNotFoundException("The '${themename}' theme folder could not be found.'");
28 28
         }
29 29
 
30 30
         if ($this->fs->exists($this->themeFile))
Please login to merge, or discard this patch.
src/allejo/stakx/Twig/TextExtension.php 1 patch
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.
tests/allejo/stakx/Test/StreamInterceptor.php 1 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
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.
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -50,6 +50,9 @@
 block discarded – undo
50 50
     // Assertion functions
51 51
     ///
52 52
 
53
+    /**
54
+     * @param string $haystack
55
+     */
53 56
     protected function assertStringContains($needle, $haystack, $message = '')
54 57
     {
55 58
         $this->assertNotFalse(strpos($haystack, $needle), $message);
Please login to merge, or discard this patch.
src/allejo/stakx/Engines/PlainTextEngine.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -9,6 +9,9 @@
 block discarded – undo
9 9
 
10 10
 class PlainTextEngine implements ParsingEngine
11 11
 {
12
+    /**
13
+     * @param string $context
14
+     */
12 15
     public function parse($context)
13 16
     {
14 17
         return $context;
Please login to merge, or discard this patch.
src/allejo/stakx/System/StakxResource.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -14,6 +14,9 @@
 block discarded – undo
14 14
      */
15 15
     private static $fs;
16 16
 
17
+    /**
18
+     * @param string $fileName
19
+     */
17 20
     public static function getResource($fileName)
18 21
     {
19 22
         self::initFileSystem();
Please login to merge, or discard this patch.
src/allejo/stakx/Twig/WhereFilter.php 1 patch
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
      * @param array|\ArrayAccess[] $array      The elements to filter through
90 90
      * @param string               $key        The key value in an associative array or FrontMatter
91 91
      * @param string               $comparison The actual comparison symbols being used
92
-     * @param mixed                $value      The value we're searching for
92
+     * @param string                $value      The value we're searching for
93 93
      *
94 94
      * @throws Twig_Error_Syntax
95 95
      *
@@ -147,6 +147,9 @@  discard block
 block discarded – undo
147 147
         return false;
148 148
     }
149 149
 
150
+    /**
151
+     * @param string $comparison
152
+     */
150 153
     private function comparisonSymbol($lhs, $comparison, $rhs)
151 154
     {
152 155
         switch ($comparison)
Please login to merge, or discard this patch.
src/allejo/stakx/Utilities/ArrayUtilities.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -22,6 +22,9 @@
 block discarded – undo
22 22
         return false;
23 23
     }
24 24
 
25
+    /**
26
+     * @param string $keyField
27
+     */
25 28
     public static function array_merge_defaults(array &$array1, array &$array2, $keyField)
26 29
     {
27 30
         $merged = $array1;
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -78,10 +78,10 @@
 block discarded – undo
78 78
      */
79 79
     public static function associative_array_split($key, array &$array, $considerOffset = true)
80 80
     {
81
-        $offset = array_search($key, array_keys($array)) + (int)$considerOffset;
81
+        $offset = array_search($key, array_keys($array)) + (int) $considerOffset;
82 82
         $result = array();
83 83
 
84
-        $result[0] = array_slice($array, 0 , $offset, true);
84
+        $result[0] = array_slice($array, 0, $offset, true);
85 85
         $result[1] = array_slice($array, $offset, null, true);
86 86
 
87 87
         return $result;
Please login to merge, or discard this patch.