Completed
Push — master ( 5c3876...859b6d )
by Thierry
01:35
created
src/Utils/Session/Manager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@
 block discarded – undo
97 97
      */
98 98
     public function delete($sKey)
99 99
     {
100
-        if(key_exists($sKey, $_SESSION))
100
+        if (key_exists($sKey, $_SESSION))
101 101
         {
102 102
             unset($_SESSION[$sKey]);
103 103
         }
Please login to merge, or discard this patch.
src/Utils/Pagination/Renderer.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
      */
47 47
     protected function getPrevLink($xPaginator)
48 48
     {
49
-        if(!($sCall = $xPaginator->getPrevCall()))
49
+        if (!($sCall = $xPaginator->getPrevCall()))
50 50
         {
51 51
             return $this->xRenderer->render('pagination::links/disabled', ['text' => $xPaginator->getPreviousText()]);
52 52
         }
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
      */
64 64
     protected function getNextLink($xPaginator)
65 65
     {
66
-        if(!($sCall = $xPaginator->getNextCall()))
66
+        if (!($sCall = $xPaginator->getNextCall()))
67 67
         {
68 68
             return $this->xRenderer->render('pagination::links/disabled', ['text' => $xPaginator->getNextText()]);
69 69
         }
@@ -81,9 +81,9 @@  discard block
 block discarded – undo
81 81
     protected function getLinks($xPaginator)
82 82
     {
83 83
         $sLinks = '';
84
-        foreach($xPaginator->getPages() as $page)
84
+        foreach ($xPaginator->getPages() as $page)
85 85
         {
86
-            if($page['call'])
86
+            if ($page['call'])
87 87
             {
88 88
                 $sTemplate = ($page['isCurrent'] ? 'pagination::links/current' : 'pagination::links/enabled');
89 89
                 $sLinks .= $this->xRenderer->render($sTemplate, ['call' => $page['call'], 'text' => $page['num']]);
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -87,8 +87,7 @@
 block discarded – undo
87 87
             {
88 88
                 $sTemplate = ($page['isCurrent'] ? 'pagination::links/current' : 'pagination::links/enabled');
89 89
                 $sLinks .= $this->xRenderer->render($sTemplate, ['call' => $page['call'], 'text' => $page['num']]);
90
-            }
91
-            else
90
+            } else
92 91
             {
93 92
                 $sLinks .= $this->xRenderer->render('pagination::links/disabled', ['text' => $page['num']]);
94 93
             }
Please login to merge, or discard this patch.
src/Utils/Config/Json.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,13 +26,13 @@
 block discarded – undo
26 26
     public static function read($sConfigFile)
27 27
     {
28 28
         $sConfigFile = realpath($sConfigFile);
29
-        if(!is_readable($sConfigFile))
29
+        if (!is_readable($sConfigFile))
30 30
         {
31 31
             throw new \Jaxon\Utils\Config\Exception\File(jaxon_trans('config.errors.file.access', ['path' => $sConfigFile]));
32 32
         }
33 33
         $sFileContent = file_get_contents($sConfigFile);
34 34
         $aConfigOptions = json_decode($sFileContent, true);
35
-        if(!is_array($aConfigOptions))
35
+        if (!is_array($aConfigOptions))
36 36
         {
37 37
             throw new \Jaxon\Utils\Config\Exception\File(jaxon_trans('config.errors.file.content', ['path' => $sConfigFile]));
38 38
         }
Please login to merge, or discard this patch.
src/Utils/Config/Config.php 1 patch
Spacing   +10 added lines, -11 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
      */
34 34
     public function __construct(array $aOptions = [], $sKeys = '')
35 35
     {
36
-        if(count($aOptions) > 0)
36
+        if (count($aOptions) > 0)
37 37
         {
38 38
             $this->setOptions($aOptions, $sKeys);
39 39
         }
@@ -66,14 +66,14 @@  discard block
 block discarded – undo
66 66
         $sPrefix = trim((string)$sPrefix);
67 67
         $nDepth = intval($nDepth);
68 68
         // Check the max depth
69
-        if($nDepth < 0 || $nDepth > 9)
69
+        if ($nDepth < 0 || $nDepth > 9)
70 70
         {
71 71
             throw new \Jaxon\Utils\Config\Exception\Data(jaxon_trans('config.errors.data.depth',
72 72
                 ['key' => $sPrefix, 'depth' => $nDepth]));
73 73
         }
74
-        foreach($aOptions as $sName => $xOption)
74
+        foreach ($aOptions as $sName => $xOption)
75 75
         {
76
-            if(is_int($sName))
76
+            if (is_int($sName))
77 77
             {
78 78
                 continue;
79 79
             }
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
             // Save the value of this option
84 84
             $this->aOptions[$sFullName] = $xOption;
85 85
             // Save the values of its sub-options
86
-            if(is_array($xOption))
86
+            if (is_array($xOption))
87 87
             {
88 88
                 // Recursively read the options in the array
89 89
                 $this->_setOptions($xOption, $sFullName, $nDepth + 1);
@@ -105,9 +105,9 @@  discard block
 block discarded – undo
105 105
         $aKeys = explode('.', (string)$sKeys);
106 106
         foreach ($aKeys as $sKey)
107 107
         {
108
-            if(($sKey))
108
+            if (($sKey))
109 109
             {
110
-                if(!array_key_exists($sKey, $aOptions) || !is_array($aOptions[$sKey]))
110
+                if (!array_key_exists($sKey, $aOptions) || !is_array($aOptions[$sKey]))
111 111
                 {
112 112
                     return;
113 113
                 }
@@ -157,13 +157,12 @@  discard block
 block discarded – undo
157 157
         $sPrefix = rtrim($sPrefix, '.') . '.';
158 158
         $sPrefixLen = strlen($sPrefix);
159 159
         $aOptions = [];
160
-        foreach($this->aOptions as $sName => $xValue)
160
+        foreach ($this->aOptions as $sName => $xValue)
161 161
         {
162
-            if(substr($sName, 0, $sPrefixLen) == $sPrefix)
162
+            if (substr($sName, 0, $sPrefixLen) == $sPrefix)
163 163
             {
164 164
                 $iNextDotPos = strpos($sName, '.', $sPrefixLen);
165
-                $sOptionName = $iNextDotPos === false ? substr($sName, $sPrefixLen) :
166
-                    substr($sName, $sPrefixLen, $iNextDotPos - $sPrefixLen);
165
+                $sOptionName = $iNextDotPos === false ? substr($sName, $sPrefixLen) : substr($sName, $sPrefixLen, $iNextDotPos - $sPrefixLen);
167 166
                 $aOptions[$sOptionName] = $sPrefix . $sOptionName;
168 167
             }
169 168
         }
Please login to merge, or discard this patch.
src/Utils/Config/Php.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,12 +26,12 @@
 block discarded – undo
26 26
     public static function read($sConfigFile)
27 27
     {
28 28
         $sConfigFile = realpath($sConfigFile);
29
-        if(!is_readable($sConfigFile))
29
+        if (!is_readable($sConfigFile))
30 30
         {
31 31
             throw new \Jaxon\Utils\Config\Exception\File(jaxon_trans('config.errors.file.access', ['path' => $sConfigFile]));
32 32
         }
33 33
         $aConfigOptions = include($sConfigFile);
34
-        if(!is_array($aConfigOptions))
34
+        if (!is_array($aConfigOptions))
35 35
         {
36 36
             throw new \Jaxon\Utils\Config\Exception\File(jaxon_trans('config.errors.file.content', ['path' => $sConfigFile]));
37 37
         }
Please login to merge, or discard this patch.
src/Utils/Config/Yaml.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,16 +26,16 @@
 block discarded – undo
26 26
     public static function read($sConfigFile)
27 27
     {
28 28
         $sConfigFile = realpath($sConfigFile);
29
-        if(!extension_loaded('yaml'))
29
+        if (!extension_loaded('yaml'))
30 30
         {
31 31
             throw new \Jaxon\Utils\Config\Exception\Yaml(jaxon_trans('config.errors.yaml.install'));
32 32
         }
33
-        if(!is_readable($sConfigFile))
33
+        if (!is_readable($sConfigFile))
34 34
         {
35 35
             throw new \Jaxon\Utils\Config\Exception\File(jaxon_trans('config.errors.file.access', ['path' => $sConfigFile]));
36 36
         }
37 37
         $aConfigOptions = yaml_parse_file($sConfigFile);
38
-        if(!is_array($aConfigOptions))
38
+        if (!is_array($aConfigOptions))
39 39
         {
40 40
             throw new \Jaxon\Utils\Config\Exception\File(jaxon_trans('config.errors.file.content', ['path' => $sConfigFile]));
41 41
         }
Please login to merge, or discard this patch.
src/Utils/Config/Reader.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
     public function read($sConfigFile)
25 25
     {
26 26
         $sExt = pathinfo($sConfigFile, PATHINFO_EXTENSION);
27
-        switch($sExt)
27
+        switch ($sExt)
28 28
         {
29 29
         case 'php':
30 30
             $aConfigOptions = Php::read($sConfigFile);
Please login to merge, or discard this patch.
src/Utils/View/Renderer.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
      */
41 41
     protected function store()
42 42
     {
43
-        if(!$this->xStore)
43
+        if (!$this->xStore)
44 44
         {
45 45
             $this->xStore = new Store();
46 46
         }
@@ -93,12 +93,12 @@  discard block
 block discarded – undo
93 93
         $sNamespace = $this->xManager->getDefaultNamespace();
94 94
         // Get the namespace from the view name
95 95
         $iSeparatorPosition = strrpos($sViewName, '::');
96
-        if($iSeparatorPosition !== false)
96
+        if ($iSeparatorPosition !== false)
97 97
         {
98 98
             $sNamespace = substr($sViewName, 0, $iSeparatorPosition);
99 99
         }
100 100
         $aRenderers = $this->xManager->getRenderers();
101
-        if(!key_exists($sNamespace, $aRenderers))
101
+        if (!key_exists($sNamespace, $aRenderers))
102 102
         {
103 103
             // Cannot render a view if there's no renderer corresponding to the namespace.
104 104
             return null;
Please login to merge, or discard this patch.
src/Utils/View/View.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
         $sViewName = $store->getViewName();
49 49
         $sNamespace = $store->getNamespace();
50 50
         // In this view renderer, the namespace must always be prepended to the view name.
51
-        if(substr($sViewName, 0, strlen($sNamespace) + 2) != $sNamespace . '::')
51
+        if (substr($sViewName, 0, strlen($sNamespace) + 2) != $sNamespace . '::')
52 52
         {
53 53
             $sViewName = $sNamespace . '::' . $sViewName;
54 54
         }
Please login to merge, or discard this patch.