Completed
Push — master ( 838d29...56ed08 )
by
unknown
18s
created
lib/Phile/Repository/PageCollection.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@
 block discarded – undo
76 76
     public function offsetSet($offset, $value)
77 77
     {
78 78
         $this->load();
79
-        $this->pages[$offset] =    $value;
79
+        $this->pages[$offset] = $value;
80 80
     }
81 81
 
82 82
     public function offsetUnset($offset)
Please login to merge, or discard this patch.
plugins/phile/errorHandler/Classes/Plugin.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,8 +21,8 @@
 block discarded – undo
21 21
  */
22 22
 class Plugin extends AbstractPlugin
23 23
 {
24
-    const HANDLER_ERROR_LOG        = 'error_log';
25
-    const HANDLER_DEVELOPMENT    = 'development';
24
+    const HANDLER_ERROR_LOG = 'error_log';
25
+    const HANDLER_DEVELOPMENT = 'development';
26 26
 
27 27
     protected $events = ['plugins_loaded' => 'onPluginsLoaded'];
28 28
 
Please login to merge, or discard this patch.
lib/Phile/Plugin/AbstractPlugin.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
         $this->plugin['key'] = $pluginKey;
53 53
         list($vendor, $name) = explode('\\', $this->plugin['key']);
54 54
         $DS = DIRECTORY_SEPARATOR;
55
-        $this->plugin['dir'] = PLUGINS_DIR . $vendor . $DS . $name . $DS;
55
+        $this->plugin['dir'] = PLUGINS_DIR.$vendor.$DS.$name.$DS;
56 56
 
57 57
         /**
58 58
          * init events
@@ -132,6 +132,6 @@  discard block
 block discarded – undo
132 132
      */
133 133
     protected function getPluginPath($subPath = '')
134 134
     {
135
-        return $this->plugin['dir'] . ltrim($subPath, DIRECTORY_SEPARATOR);
135
+        return $this->plugin['dir'].ltrim($subPath, DIRECTORY_SEPARATOR);
136 136
     }
137 137
 }
Please login to merge, or discard this patch.
lib/Phile/Plugin/PluginRepository.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
     {
73 73
         list($vendor, $pluginName) = explode('\\', $pluginKey);
74 74
         // uppercase first letter convention
75
-        $pluginClassName = '\\Phile\\Plugin\\' . ucfirst($vendor) . '\\' . ucfirst($pluginName) . '\\Plugin';
75
+        $pluginClassName = '\\Phile\\Plugin\\'.ucfirst($vendor).'\\'.ucfirst($pluginName).'\\Plugin';
76 76
 
77 77
         if (!class_exists($pluginClassName)) {
78 78
             throw new PluginException(
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
             $classNameParts
126 126
         );
127 127
 
128
-        $fileName = PLUGINS_DIR . implode(DIRECTORY_SEPARATOR, $classPath) . '.php';
128
+        $fileName = PLUGINS_DIR.implode(DIRECTORY_SEPARATOR, $classPath).'.php';
129 129
         if (file_exists($fileName)) {
130 130
             include_once $fileName;
131 131
         }
Please login to merge, or discard this patch.
lib/Phile/Repository/Page.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
             $pageId .= 'index';
65 65
         }
66 66
 
67
-        $file = $folder . $pageId . CONTENT_EXT;
67
+        $file = $folder.$pageId.CONTENT_EXT;
68 68
         if (!file_exists($file)) {
69 69
             if (substr($pageId, -6) === '/index') {
70 70
                 // try to resolve sub-directory 'sub/' to page 'sub'
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
                 // try to resolve page 'sub' to sub-directory 'sub/'
74 74
                 $pageId .= '/index';
75 75
             }
76
-            $file = $folder . $pageId . CONTENT_EXT;
76
+            $file = $folder.$pageId.CONTENT_EXT;
77 77
         }
78 78
         if (!file_exists($file)) {
79 79
             return null;
@@ -92,13 +92,13 @@  discard block
 block discarded – undo
92 92
     public function findAll(array $options = array(), $folder = CONTENT_DIR)
93 93
     {
94 94
         return new PageCollection(
95
-            function () use ($options, $folder) {
95
+            function() use ($options, $folder) {
96 96
                 $options += $this->settings;
97 97
                 // ignore files with a leading '.' in its filename
98 98
                 $files = Utility::getFiles($folder, '\Phile\FilterIterator\ContentFileFilterIterator');
99 99
                 $pages = array();
100 100
                 foreach ($files as $file) {
101
-                    if (str_replace($folder, '', $file) == '404' . CONTENT_EXT) {
101
+                    if (str_replace($folder, '', $file) == '404'.CONTENT_EXT) {
102 102
                         // jump to next page if file is the 404 page
103 103
                         continue;
104 104
                     }
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
             */
136 136
                         $meta = $page->getMeta();
137 137
                         if ($sort['type'] === 'page') {
138
-                            $method = 'get' . ucfirst($key);
138
+                            $method = 'get'.ucfirst($key);
139 139
                             $value = $page->$method();
140 140
                         } elseif ($sort['type'] === 'meta') {
141 141
                             $value = $meta->get($key);
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
                         $column[] = $value;
150 150
                     }
151 151
                     $sortHelper[] = $column;
152
-                    $sortHelper[] = constant('SORT_' . strtoupper($sort['order']));
152
+                    $sortHelper[] = constant('SORT_'.strtoupper($sort['order']));
153 153
                 }
154 154
                 $sortHelper[] = &$pages;
155 155
 
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
      */
192 192
     protected function getPage($filePath, $folder = CONTENT_DIR)
193 193
     {
194
-        $key = 'Phile_Model_Page_' . md5($filePath);
194
+        $key = 'Phile_Model_Page_'.md5($filePath);
195 195
         if (isset($this->storage[$key])) {
196 196
             return $this->storage[$key];
197 197
         }
Please login to merge, or discard this patch.
lib/Phile/Core/Utility.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -159,7 +159,7 @@
 block discarded – undo
159 159
     {
160 160
         $config = Registry::get('Phile_Settings');
161 161
 
162
-        return md5($config['encryptionKey'] . $value);
162
+        return md5($config['encryptionKey'].$value);
163 163
     }
164 164
 
165 165
     /**
Please login to merge, or discard this patch.
lib/Phile/Core/Response.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -119,7 +119,7 @@
 block discarded – undo
119 119
     public function send()
120 120
     {
121 121
         if (!isset($this->headers['Content-Type'])) {
122
-            $this->setHeader('Content-Type', 'text/html; charset=' . $this->charset);
122
+            $this->setHeader('Content-Type', 'text/html; charset='.$this->charset);
123 123
         }
124 124
         $this->outputHeader();
125 125
         http_response_code($this->statusCode);
Please login to merge, or discard this patch.
lib/Phile/Core/Router.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
         if (isset($this->server['HTTP_HOST'])) {
84 84
             $host = $this->server['HTTP_HOST'];
85 85
             $protocol = $this->getProtocol();
86
-            $url = $protocol . '://' . $host . $url;
86
+            $url = $protocol.'://'.$host.$url;
87 87
         }
88 88
 
89 89
         $url = rtrim($url, '/');
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
      */
119 119
     public function url($url)
120 120
     {
121
-        return $this->getBaseUrl() . '/' . ltrim($url, '/');
121
+        return $this->getBaseUrl().'/'.ltrim($url, '/');
122 122
     }
123 123
 
124 124
     /**
Please login to merge, or discard this patch.
lib/Phile/Bootstrap.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -84,14 +84,14 @@  discard block
 block discarded – undo
84 84
         defined('PHILE_VERSION') || define('PHILE_VERSION', '1.6.0');
85 85
         defined('PHILE_CLI_MODE') || define('PHILE_CLI_MODE', (php_sapi_name() === 'cli'));
86 86
         defined('DS') || define('DS', DIRECTORY_SEPARATOR);
87
-        defined('ROOT_DIR') || define('ROOT_DIR', realpath(__DIR__ . DS . '..' . DS . '..' . DS) . DS);
88
-        defined('CONTENT_DIR') || define('CONTENT_DIR', ROOT_DIR . 'content' . DS);
87
+        defined('ROOT_DIR') || define('ROOT_DIR', realpath(__DIR__.DS.'..'.DS.'..'.DS).DS);
88
+        defined('CONTENT_DIR') || define('CONTENT_DIR', ROOT_DIR.'content'.DS);
89 89
         defined('CONTENT_EXT') || define('CONTENT_EXT', '.md');
90
-        defined('LIB_DIR') || define('LIB_DIR', ROOT_DIR . 'lib' . DS);
91
-        defined('PLUGINS_DIR') || define('PLUGINS_DIR', ROOT_DIR . 'plugins' . DS);
92
-        defined('THEMES_DIR') || define('THEMES_DIR', ROOT_DIR . 'themes' . DS);
93
-        defined('CACHE_DIR') || define('CACHE_DIR', LIB_DIR . 'cache' . DS);
94
-        defined('STORAGE_DIR') || define('STORAGE_DIR', LIB_DIR . 'datastorage' . DS);
90
+        defined('LIB_DIR') || define('LIB_DIR', ROOT_DIR.'lib'.DS);
91
+        defined('PLUGINS_DIR') || define('PLUGINS_DIR', ROOT_DIR.'plugins'.DS);
92
+        defined('THEMES_DIR') || define('THEMES_DIR', ROOT_DIR.'themes'.DS);
93
+        defined('CACHE_DIR') || define('CACHE_DIR', LIB_DIR.'cache'.DS);
94
+        defined('STORAGE_DIR') || define('STORAGE_DIR', LIB_DIR.'datastorage'.DS);
95 95
     }
96 96
 
97 97
     /**
@@ -102,8 +102,8 @@  discard block
 block discarded – undo
102 102
         spl_autoload_extensions(".php");
103 103
         // load phile core
104 104
         spl_autoload_register(
105
-            function ($className) {
106
-                $fileName = LIB_DIR . str_replace("\\", DS, $className) . '.php';
105
+            function($className) {
106
+                $fileName = LIB_DIR.str_replace("\\", DS, $className).'.php';
107 107
                 if (file_exists($fileName)) {
108 108
                     include_once $fileName;
109 109
                 }
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
         // load phile plugins
113 113
         spl_autoload_register('\Phile\Plugin\PluginRepository::autoload');
114 114
 
115
-        include LIB_DIR . 'vendor' . DS . 'autoload.php';
115
+        include LIB_DIR.'vendor'.DS.'autoload.php';
116 116
     }
117 117
 
118 118
     /**
@@ -120,8 +120,8 @@  discard block
 block discarded – undo
120 120
      */
121 121
     protected function initializeConfiguration()
122 122
     {
123
-        $defaults      = Utility::load(ROOT_DIR . 'default_config.php');
124
-        $localSettings = Utility::load(ROOT_DIR . 'config.php');
123
+        $defaults      = Utility::load(ROOT_DIR.'default_config.php');
124
+        $localSettings = Utility::load(ROOT_DIR.'config.php');
125 125
         if (is_array($localSettings)) {
126 126
             $this->settings = array_replace_recursive($defaults, $localSettings);
127 127
         } else {
Please login to merge, or discard this patch.