@@ -26,7 +26,7 @@ |
||
26 | 26 | */ |
27 | 27 | protected function alert($message, $title) |
28 | 28 | { |
29 | - if($this->getReturn()) |
|
29 | + if ($this->getReturn()) |
|
30 | 30 | { |
31 | 31 | return 'alert(' . $message . ')'; |
32 | 32 | } |
@@ -22,7 +22,7 @@ |
||
22 | 22 | */ |
23 | 23 | public function confirm($question, $yesScript, $noScript) |
24 | 24 | { |
25 | - if(!$noScript) |
|
25 | + if (!$noScript) |
|
26 | 26 | { |
27 | 27 | return 'if(confirm(' . $question . ')){' . $yesScript . ';}'; |
28 | 28 | } |
@@ -25,8 +25,7 @@ |
||
25 | 25 | if(!$noScript) |
26 | 26 | { |
27 | 27 | return 'if(confirm(' . $question . ')){' . $yesScript . ';}'; |
28 | - } |
|
29 | - else |
|
28 | + } else |
|
30 | 29 | { |
31 | 30 | return 'if(confirm(' . $question . ')){' . $yesScript . ';}else{' . $noScript . ';}'; |
32 | 31 | } |
@@ -119,11 +119,11 @@ discard block |
||
119 | 119 | $sEventPrefix = $this->getOption('core.prefix.event'); |
120 | 120 | $sMode = ''; |
121 | 121 | $sMethod = ''; |
122 | - if(isset($this->aConfiguration['mode'])) |
|
122 | + if (isset($this->aConfiguration['mode'])) |
|
123 | 123 | { |
124 | 124 | $sMode = $this->aConfiguration['mode']; |
125 | 125 | } |
126 | - if(isset($this->aConfiguration['method'])) |
|
126 | + if (isset($this->aConfiguration['method'])) |
|
127 | 127 | { |
128 | 128 | $sMethod = $this->aConfiguration['method']; |
129 | 129 | } |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | */ |
146 | 146 | public function fire($aArgs) |
147 | 147 | { |
148 | - foreach($this->aHandlers as $xHandler) |
|
148 | + foreach ($this->aHandlers as $xHandler) |
|
149 | 149 | { |
150 | 150 | $xHandler->call($aArgs); |
151 | 151 | } |
@@ -27,7 +27,7 @@ |
||
27 | 27 | public function render($sPath, array $aVars = array()) |
28 | 28 | { |
29 | 29 | // Make the template vars available as attributes |
30 | - foreach($aVars as $sName => $xValue) |
|
30 | + foreach ($aVars as $sName => $xValue) |
|
31 | 31 | { |
32 | 32 | $sName = (string)$sName; |
33 | 33 | $this->$sName = $xValue; |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | public function addNamespace($sNamespace, $sDirectory, $sExtension = '') |
46 | 46 | { |
47 | 47 | // The 'jaxon' key cannot be overriden |
48 | - if($sNamespace == 'jaxon') |
|
48 | + if ($sNamespace == 'jaxon') |
|
49 | 49 | { |
50 | 50 | return; |
51 | 51 | } |
@@ -82,18 +82,18 @@ discard block |
||
82 | 82 | // Get the namespace name |
83 | 83 | $sNamespace = ''; |
84 | 84 | $iSeparatorPosition = strrpos($sTemplate, '::'); |
85 | - if($iSeparatorPosition !== false) |
|
85 | + if ($iSeparatorPosition !== false) |
|
86 | 86 | { |
87 | 87 | $sNamespace = substr($sTemplate, 0, $iSeparatorPosition); |
88 | 88 | $sTemplate = substr($sTemplate, $iSeparatorPosition + 2); |
89 | 89 | } |
90 | 90 | // The default namespace is 'jaxon' |
91 | - if(!($sNamespace = trim($sNamespace))) |
|
91 | + if (!($sNamespace = trim($sNamespace))) |
|
92 | 92 | { |
93 | 93 | $sNamespace = 'jaxon'; |
94 | 94 | } |
95 | 95 | // Check if the namespace is defined |
96 | - if(!key_exists($sNamespace, $this->aNamespaces)) |
|
96 | + if (!key_exists($sNamespace, $this->aNamespaces)) |
|
97 | 97 | { |
98 | 98 | return false; |
99 | 99 | } |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | */ |
56 | 56 | protected function getPrevLink() |
57 | 57 | { |
58 | - if(!($sCall = $this->xPaginator->getPrevCall())) |
|
58 | + if (!($sCall = $this->xPaginator->getPrevCall())) |
|
59 | 59 | { |
60 | 60 | return ''; |
61 | 61 | } |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | */ |
70 | 70 | protected function getNextLink() |
71 | 71 | { |
72 | - if(!($sCall = $this->xPaginator->getNextCall())) |
|
72 | + if (!($sCall = $this->xPaginator->getNextCall())) |
|
73 | 73 | { |
74 | 74 | return ''; |
75 | 75 | } |
@@ -84,9 +84,9 @@ discard block |
||
84 | 84 | protected function getLinks() |
85 | 85 | { |
86 | 86 | $sLinks = ''; |
87 | - foreach($this->xPaginator->getPages() as $page) |
|
87 | + foreach ($this->xPaginator->getPages() as $page) |
|
88 | 88 | { |
89 | - if($page['call']) |
|
89 | + if ($page['call']) |
|
90 | 90 | { |
91 | 91 | $sTemplate = ($page['isCurrent'] ? 'pagination::links/current' : 'pagination::links/enabled'); |
92 | 92 | $sLinks .= $this->_render($sTemplate, ['call' => $page['call'], 'text' => $page['num']]); |
@@ -90,8 +90,7 @@ |
||
90 | 90 | { |
91 | 91 | $sTemplate = ($page['isCurrent'] ? 'pagination::links/current' : 'pagination::links/enabled'); |
92 | 92 | $sLinks .= $this->_render($sTemplate, ['call' => $page['call'], 'text' => $page['num']]); |
93 | - } |
|
94 | - else |
|
93 | + } else |
|
95 | 94 | { |
96 | 95 | $sLinks .= $this->_render('pagination::links/disabled', ['text' => $page['num']]); |
97 | 96 | } |
@@ -58,8 +58,7 @@ |
||
58 | 58 | if(!array_key_exists($sLanguage, $this->aMessages)) |
59 | 59 | { |
60 | 60 | $this->aMessages[$sLanguage] = $aMessages; |
61 | - } |
|
62 | - else |
|
61 | + } else |
|
63 | 62 | { |
64 | 63 | $this->aMessages[$sLanguage] = array_merge($aMessages, $this->aMessages[$sLanguage]); |
65 | 64 | } |
@@ -87,7 +87,7 @@ |
||
87 | 87 | } |
88 | 88 | if(!array_key_exists($sLanguage, $this->aMessages) || !array_key_exists($sText, $this->aMessages[$sLanguage])) |
89 | 89 | { |
90 | - return $sText; |
|
90 | + return $sText; |
|
91 | 91 | } |
92 | 92 | $message = $this->aMessages[$sLanguage][$sText]; |
93 | 93 | foreach($aPlaceHolders as $name => $value) |
@@ -45,17 +45,17 @@ discard block |
||
45 | 45 | */ |
46 | 46 | public function loadMessages($sFilePath, $sLanguage) |
47 | 47 | { |
48 | - if(!file_exists($sFilePath)) |
|
48 | + if (!file_exists($sFilePath)) |
|
49 | 49 | { |
50 | 50 | return; |
51 | 51 | } |
52 | 52 | $aMessages = require($sFilePath); |
53 | - if(!is_array($aMessages)) |
|
53 | + if (!is_array($aMessages)) |
|
54 | 54 | { |
55 | 55 | return; |
56 | 56 | } |
57 | 57 | // Load the translations |
58 | - if(!array_key_exists($sLanguage, $this->aMessages)) |
|
58 | + if (!array_key_exists($sLanguage, $this->aMessages)) |
|
59 | 59 | { |
60 | 60 | $this->aMessages[$sLanguage] = $aMessages; |
61 | 61 | } |
@@ -77,20 +77,20 @@ discard block |
||
77 | 77 | public function trans($sText, array $aPlaceHolders = array(), $sLanguage = null) |
78 | 78 | { |
79 | 79 | $sText = trim((string)$sText); |
80 | - if(!$sLanguage) |
|
80 | + if (!$sLanguage) |
|
81 | 81 | { |
82 | 82 | $sLanguage = $this->xConfig->getOption('language'); |
83 | 83 | } |
84 | - if(!$sLanguage) |
|
84 | + if (!$sLanguage) |
|
85 | 85 | { |
86 | 86 | $sLanguage = $this->sDefaultLocale; |
87 | 87 | } |
88 | - if(!array_key_exists($sLanguage, $this->aMessages) || !array_key_exists($sText, $this->aMessages[$sLanguage])) |
|
88 | + if (!array_key_exists($sLanguage, $this->aMessages) || !array_key_exists($sText, $this->aMessages[$sLanguage])) |
|
89 | 89 | { |
90 | 90 | return $sText; |
91 | 91 | } |
92 | 92 | $message = $this->aMessages[$sLanguage][$sText]; |
93 | - foreach($aPlaceHolders as $name => $value) |
|
93 | + foreach ($aPlaceHolders as $name => $value) |
|
94 | 94 | { |
95 | 95 | $message = str_replace(":$name", $value, $message); |
96 | 96 | } |
@@ -61,7 +61,7 @@ |
||
61 | 61 | */ |
62 | 62 | function rq($classname = null) |
63 | 63 | { |
64 | - if(($classname)) |
|
64 | + if (($classname)) |
|
65 | 65 | { |
66 | 66 | return jaxon()->sentry()->request($classname); |
67 | 67 | } |
@@ -80,11 +80,11 @@ |
||
80 | 80 | protected function includeAssets() |
81 | 81 | { |
82 | 82 | $sPluginOptionName = 'assets.include.' . $this->getName(); |
83 | - if($this->hasOption($sPluginOptionName) && !$this->getOption($sPluginOptionName)) |
|
83 | + if ($this->hasOption($sPluginOptionName) && !$this->getOption($sPluginOptionName)) |
|
84 | 84 | { |
85 | 85 | return false; |
86 | 86 | } |
87 | - if($this->hasOption('assets.include.all') && !$this->getOption('assets.include.all')) |
|
87 | + if ($this->hasOption('assets.include.all') && !$this->getOption('assets.include.all')) |
|
88 | 88 | { |
89 | 89 | return false; |
90 | 90 | } |