Completed
Push — master ( bd27d6...d989da )
by Nikita
04:15
created
src/Application.php 1 patch
Spacing   +6 added lines, -7 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
         Event::subscribe('samsonphp.router.create.module.routes', array($this, 'updateCMSPrefix'));
37 37
 
38 38
         //[PHPCOMPRESSOR(remove,start)]
39
-        $moduleList   = $this->system->module_stack;
39
+        $moduleList = $this->system->module_stack;
40 40
         foreach ($this->system->module_stack as $id => $module) {
41 41
             if (!$this->isModuleDependent($module) && $id != 'core' && !$this->ifModuleRelated($module)) {
42 42
                 unset($moduleList[$id]);
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
         }
45 45
 
46 46
         // Generate resources for new module
47
-        $this->system->module('resourcer')->generateResources($moduleList, $this->path() . 'app/view/index.php');
47
+        $this->system->module('resourcer')->generateResources($moduleList, $this->path().'app/view/index.php');
48 48
         //[PHPCOMPRESSOR(remove,end)]
49 49
 
50 50
         // Call parent initialization
@@ -70,12 +70,12 @@  discard block
 block discarded – undo
70 70
     public function activeModuleHandler($module)
71 71
     {
72 72
         // Define if routed module is related to SamsonCMS
73
-        if($this->isCMS = $this->ifModuleRelated($module)){
73
+        if ($this->isCMS = $this->ifModuleRelated($module)) {
74 74
             // TODO: This should be removed - Reparse url
75 75
             url()->parse();
76 76
 
77 77
             // Switch template to SamsonCMS
78
-            $this->system->template($this->path() . 'app/view/index.php', true);
78
+            $this->system->template($this->path().'app/view/index.php', true);
79 79
 
80 80
             Event::fire(self::EVENT_IS_CMS, array(&$this));
81 81
         }
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
     public function updateCMSPrefix($module, &$prefix)
91 91
     {
92 92
         if (($module->id != $this->id) && $this->ifModuleRelated($module)) {
93
-            $prefix = '/' . $this->id . $prefix;
93
+            $prefix = '/'.$this->id.$prefix;
94 94
         }
95 95
     }
96 96
 
@@ -182,7 +182,6 @@  discard block
 block discarded – undo
182 182
         $local   = m('local');
183 183
         $current = m();
184 184
 
185
-        return isset($current['title']) ? $current['title'] :
186
-            (isset($local['title']) ? $local['title'] : '');
185
+        return isset($current['title']) ? $current['title'] : (isset($local['title']) ? $local['title'] : '');
187 186
     }
188 187
 }
Please login to merge, or discard this patch.