Completed
Push — master ( 6dedf5...3a82d8 )
by Nikita
03:51
created
src/Application.php 1 patch
Spacing   +7 added lines, -8 removed lines patch added patch discarded remove patch
@@ -36,9 +36,9 @@  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
-            if ( ! (isset($module->composerParameters['composerName']) &&
41
+            if (!(isset($module->composerParameters['composerName']) &&
42 42
                     isset($this->composerParameters['required']) &&
43 43
                     in_array($module->composerParameters['composerName'], $this->composerParameters['required']))
44 44
             ) {
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         }
50 50
 
51 51
         // Generate resources for new module
52
-        $this->system->module('resourcer')->generateResources($moduleList, $this->path() . 'app/view/index.php');
52
+        $this->system->module('resourcer')->generateResources($moduleList, $this->path().'app/view/index.php');
53 53
         //[PHPCOMPRESSOR(remove,end)]
54 54
 
55 55
         // Call parent initialization
@@ -64,12 +64,12 @@  discard block
 block discarded – undo
64 64
     public function activeModuleHandler($module)
65 65
     {
66 66
         // Define if routed module is related to SamsonCMS
67
-        if($this->isCMS = $this->ifModuleRelated($module)){
67
+        if ($this->isCMS = $this->ifModuleRelated($module)) {
68 68
             // TODO: This should be removed - Reparse url
69 69
             url()->parse();
70 70
 
71 71
             // Switch template to SamsonCMS
72
-            $this->system->template($this->path() . 'app/view/index.php', true);
72
+            $this->system->template($this->path().'app/view/index.php', true);
73 73
 
74 74
             Event::fire(self::EVENT_IS_CMS, array(&$this));
75 75
         }
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
     public function updateCMSPrefix($module, &$prefix)
85 85
     {
86 86
         if (($module->id != $this->id) && $this->ifModuleRelated($module)) {
87
-            $prefix = '/' . $this->id . $prefix;
87
+            $prefix = '/'.$this->id.$prefix;
88 88
         }
89 89
     }
90 90
 
@@ -176,7 +176,6 @@  discard block
 block discarded – undo
176 176
         $local   = m('local');
177 177
         $current = m();
178 178
 
179
-        return isset($current['title']) ? $current['title'] :
180
-            (isset($local['title']) ? $local['title'] : '');
179
+        return isset($current['title']) ? $current['title'] : (isset($local['title']) ? $local['title'] : '');
181 180
     }
182 181
 }
Please login to merge, or discard this patch.