Completed
Push — master ( 62ce42...97b867 )
by Baris
05:09 queued 02:46
created
apps/default.app/modules/common/module.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -26,8 +26,8 @@  discard block
 block discarded – undo
26 26
 
27 27
         $loader->registerNamespaces(
28 28
             array(
29
-                'Modules\Common\Controllers' => __DIR__ . '/controllers/',
30
-                'Modules\Common\Models'      => __DIR__ . '/models/',
29
+                'Modules\Common\Controllers' => __DIR__.'/controllers/',
30
+                'Modules\Common\Models'      => __DIR__.'/models/',
31 31
             )
32 32
         );
33 33
 
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
     public function registerServices(DiInterface $di)
41 41
     {
42 42
         // Registering a dispatcher
43
-        $di->set('dispatcher', function () {
43
+        $di->set('dispatcher', function() {
44 44
             $dispatcher = new Dispatcher();
45 45
             $dispatcher->setDefaultNamespace("Modules\Common\Controllers");
46 46
             return $dispatcher;
@@ -48,9 +48,9 @@  discard block
 block discarded – undo
48 48
 
49 49
         $appConfig = $di->get('config');
50 50
         $view = $di->get('view');
51
-        $view->setLayoutsDir( '_shared/');
51
+        $view->setLayoutsDir('_shared/');
52 52
         $view->setTemplateAfter($appConfig->view_layout_name);
53
-        $view->setViewsDir( __DIR__ . '/views/');
53
+        $view->setViewsDir(__DIR__.'/views/');
54 54
         $di->set('view', $view);
55 55
     }
56 56
 }
57 57
\ No newline at end of file
Please login to merge, or discard this patch.
apps/default.app/configs/application.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 		'.volt' => array(
19 19
 			'type' => '\Phalcon\Mvc\View\Engine\Volt',
20 20
 			'options' => array(
21
-			'compiledPath' => STORAGE_PATH . 'framework/views/',
21
+			'compiledPath' => STORAGE_PATH.'framework/views/',
22 22
 			'compiledSeparator' => '_',
23 23
 			'compiledExtension' => '.compiled',
24 24
 			'stat' => TRUE
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 	*/
98 98
 
99 99
 	'namespaces' => array(
100
-		'Modules\Common' => APPLICATION_PATH . 'modules/common/',
100
+		'Modules\Common' => APPLICATION_PATH.'modules/common/',
101 101
 	),
102 102
 
103 103
 	/*
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 	'modules' => array(
122 122
 		'common' => array(
123 123
 			'className' => 'Modules\Common\Module',
124
-			'path' => APPLICATION_PATH . 'modules/common/module.php'
124
+			'path' => APPLICATION_PATH.'modules/common/module.php'
125 125
 		)
126 126
 	),
127 127
 
@@ -305,9 +305,9 @@  discard block
 block discarded – undo
305 305
 	*/
306 306
 
307 307
 	'paths' => array(
308
-		APPLICATION_PATH . 'controllers/',
309
-		APPLICATION_PATH . 'models/',
310
-		APPLICATION_PATH . 'tasks/'
308
+		APPLICATION_PATH.'controllers/',
309
+		APPLICATION_PATH.'models/',
310
+		APPLICATION_PATH.'tasks/'
311 311
 	),
312 312
 
313 313
 	/*
Please login to merge, or discard this patch.
apps/default.app/configs/database.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -25,10 +25,10 @@
 block discarded – undo
25 25
 	|
26 26
 	*/
27 27
 
28
-	'databases' => array (
29
-		'db' => array (
28
+	'databases' => array(
29
+		'db' => array(
30 30
 	        'type' => '\Phalcon\Db\Adapter\Pdo\Mysql',
31
-	        'config' => array (
31
+	        'config' => array(
32 32
 	        	'host' => '127.0.0.1',
33 33
 				'port' => 3306,
34 34
 		        'username' => 'root',
Please login to merge, or discard this patch.
bootstrap/services.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 |
43 43
 */
44 44
 
45
-$di->set('error', function () {
45
+$di->set('error', function() {
46 46
     return include_once APPLICATION_PATH."configs/error.php";
47 47
 });	
48 48
 
@@ -91,10 +91,10 @@  discard block
 block discarded – undo
91 91
     include_once _if(APPLICATION_PATH."configs", "database.php")
92 92
 );
93 93
 
94
-foreach ($dbConfig->databases as $name => $dbConfig ) {
94
+foreach ($dbConfig->databases as $name => $dbConfig) {
95 95
     $di->set($name, function() use ($dbConfig, $di){
96 96
         $className = $dbConfig["type"];
97
-        $database =  new $className($dbConfig["config"]->toArray());
97
+        $database = new $className($dbConfig["config"]->toArray());
98 98
         $database->connect();
99 99
         return $database;
100 100
     });
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 |
171 171
 */
172 172
 
173
-$di->set('assets', function () {
173
+$di->set('assets', function() {
174 174
     $assetManager = new \Phalcon\Assets\Manager();
175 175
     return $assetManager;
176 176
 }, true);
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
 */
188 188
 
189 189
 if (PHP_SAPI !== 'cli') {
190
-    $di->set('url', function () {
190
+    $di->set('url', function() {
191 191
         global $di;
192 192
         $appConfig = $di->get('config');
193 193
         $url = new \Phalcon\Mvc\Url();
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
 |
209 209
 */
210 210
 
211
-$di->set('crypt', function () {
211
+$di->set('crypt', function() {
212 212
     global $di;
213 213
     $appConfig = $di->get('config');
214 214
     $crypt = new \Phalcon\Crypt();
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
 
284 284
 if (PHP_SAPI !== 'cli') {
285 285
 
286
-    $di->set('router', function () {
286
+    $di->set('router', function() {
287 287
         global $di;
288 288
         $appConfig = $di->get('config');
289 289
         $router = new \Phalcon\Mvc\Router\Annotations(false);
Please login to merge, or discard this patch.
apps/default.app/console.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -8,10 +8,10 @@  discard block
 block discarded – undo
8 8
 $arguments['task'] = $appConfig->default_task;
9 9
 $arguments['action'] = $appConfig->default_action;
10 10
 
11
-if ( isset( $_SERVER['argv'][1] ) AND strpos($argv[1], "@") !== FALSE  ) {
11
+if (isset($_SERVER['argv'][1]) AND strpos($argv[1], "@") !== FALSE) {
12 12
     $itemNumber = 0;
13 13
     $allArguments = explode("@", $argv[1]);
14
-    if ( count($allArguments) === 2 )
14
+    if (count($allArguments) === 2)
15 15
     {
16 16
         $itemNumber = 1;
17 17
     }
@@ -21,8 +21,8 @@  discard block
 block discarded – undo
21 21
 }
22 22
 
23 23
 $arguments['params'] = array();
24
-foreach($_SERVER['argv'] as $k => $arg) {
25
-    if($k >= 2) {
24
+foreach ($_SERVER['argv'] as $k => $arg) {
25
+    if ($k >= 2) {
26 26
         $arguments['params'][] = $arg;
27 27
     }
28 28
 }
Please login to merge, or discard this patch.
apps/default.app/application.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -46,10 +46,10 @@
 block discarded – undo
46 46
 $output = $application->handle()->getContent();
47 47
 
48 48
 // HTML Minification
49
-if ( $appConfig->html_minify ) {
50
-    ob_start( function() use ($output) {
51
-        $search = array( '/\>[^\S ]+/s', '/[^\S ]+\</s', '/(\s)+/s' );
52
-        $replace = array( '>', '<', '\\1' );
49
+if ($appConfig->html_minify) {
50
+    ob_start(function() use ($output) {
51
+        $search = array('/\>[^\S ]+/s', '/[^\S ]+\</s', '/(\s)+/s');
52
+        $replace = array('>', '<', '\\1');
53 53
         $buffer = preg_replace($search, $replace, $output);
54 54
         return $buffer;
55 55
     });
Please login to merge, or discard this patch.
bootstrap/autoload.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-function _d( $string ) {
3
+function _d($string) {
4 4
     die($string);
5 5
 }
6 6
 
@@ -8,9 +8,9 @@  discard block
 block discarded – undo
8 8
     _d('Phalcon extension isn\'t installed. Please follow these instructions to install it: http://docs.phalconphp.com/en/latest/reference/install.html');
9 9
 }
10 10
 
11
-function _if( $path, $name ) {
11
+function _if($path, $name) {
12 12
     $filePath = $path.'/'.(ENVIROMENT == '' ? '' : ENVIROMENT.'/').$name;
13
-    if ( !is_file($filePath) )
13
+    if (!is_file($filePath))
14 14
         $filePath = $path.'/'.$name;
15 15
     return $filePath;
16 16
 } 
@@ -25,17 +25,17 @@  discard block
 block discarded – undo
25 25
 | 
26 26
 */
27 27
 
28
-define("ROOT_PATH", realpath( __DIR__."/../") );
28
+define("ROOT_PATH", realpath(__DIR__."/../"));
29 29
 
30 30
 $pathConfigs = new \Phalcon\Config(
31 31
     include_once __DIR__."/paths.php"
32 32
 );
33 33
 
34
-define("SOLUTION_PATH", $pathConfigs->solution_path );
35
-define("STORAGE_PATH", $pathConfigs->storage_path );
36
-define("PUBLIC_PATH", $pathConfigs->public_path );
37
-define("VENDOR_PATH", $pathConfigs->vendor_path );
38
-define("GLOBAL_CONFIG_PATH", $pathConfigs->global_config_path );
34
+define("SOLUTION_PATH", $pathConfigs->solution_path);
35
+define("STORAGE_PATH", $pathConfigs->storage_path);
36
+define("PUBLIC_PATH", $pathConfigs->public_path);
37
+define("VENDOR_PATH", $pathConfigs->vendor_path);
38
+define("GLOBAL_CONFIG_PATH", $pathConfigs->global_config_path);
39 39
 
40 40
 /*
41 41
 |--------------------------------------------------------------------------
@@ -52,21 +52,21 @@  discard block
 block discarded – undo
52 52
 
53 53
 $configurationName = null;
54 54
 if (PHP_SAPI === 'cli') {    
55
-    if ( isset( $_SERVER['argv'][1] ) AND strpos($argv[1], "@") !== FALSE  ) {
55
+    if (isset($_SERVER['argv'][1]) AND strpos($argv[1], "@") !== FALSE) {
56 56
         $arguments = explode("@", $argv[1]);
57 57
         $configurationName = $arguments[0];
58 58
     }
59 59
 } else {
60
-    if ( isset( $_SERVER['SERVER_NAME'] ) ) {
60
+    if (isset($_SERVER['SERVER_NAME'])) {
61 61
         $configurationName = $_SERVER['SERVER_NAME'];
62 62
     }
63 63
 }
64 64
 
65
-if ( !isset($solutionRouting->routing->$configurationName->name) ) {
66
-    if ( isset( $solutionRouting->routing->default->name ) ) {
65
+if (!isset($solutionRouting->routing->$configurationName->name)) {
66
+    if (isset($solutionRouting->routing->default->name)) {
67 67
         $applicationName = $solutionRouting->routing->default->name;
68 68
         $enviromentName = "";
69
-        if ( isset($solutionRouting->routing->default->enviroment) ) {
69
+        if (isset($solutionRouting->routing->default->enviroment)) {
70 70
             $enviromentName = $solutionRouting->routing->default->enviroment;
71 71
         }
72 72
     } else {
@@ -75,16 +75,16 @@  discard block
 block discarded – undo
75 75
 } else {
76 76
     $applicationName = $solutionRouting->routing->$configurationName->name;
77 77
     $enviromentName = "";
78
-    if ( isset($solutionRouting->routing->$configurationName->enviroment) ) {
78
+    if (isset($solutionRouting->routing->$configurationName->enviroment)) {
79 79
         $enviromentName = $solutionRouting->routing->$configurationName->enviroment;
80 80
     }
81 81
 }
82 82
 
83 83
 define("ENVIROMENT", $enviromentName);
84 84
 define("APPLICATION_NAME", $applicationName);
85
-define("APPLICATION_PATH", $pathConfigs->solution_path.APPLICATION_NAME."/" );
85
+define("APPLICATION_PATH", $pathConfigs->solution_path.APPLICATION_NAME."/");
86 86
 
87
-if ( !is_dir( APPLICATION_PATH ) ) 
87
+if (!is_dir(APPLICATION_PATH)) 
88 88
     _d("There is no application called \"".APPLICATION_NAME."\" in your apps folder.");
89 89
 
90 90
 /*
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 | loading of any our classes "manually". Feels great to relax.
99 99
 */
100 100
 
101
-if ( !is_file( VENDOR_PATH.'autoload.php' ) ) {
101
+if (!is_file(VENDOR_PATH.'autoload.php')) {
102 102
     _d("There is no autoload.php in your \"".VENDOR_PATH."\". Please update your vendor folder.");
103 103
 } else {
104 104
     require VENDOR_PATH.'autoload.php';
Please login to merge, or discard this patch.