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