Passed
Push — master ( d7bbf2...941273 )
by Fran
05:38
created
src/base/dto/Form.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
             return ($aOrder < $bOrder) ? -1 : 1;
49 49
         });
50 50
         $array['actions'] = [];
51
-        foreach($this->actions as $action) {
51
+        foreach ($this->actions as $action) {
52 52
             $array['actions'][] = $action->__toArray();
53 53
         }
54 54
         return $array;
Please login to merge, or discard this patch.
src/base/types/traits/Api/ManagerTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,8 +39,8 @@
 block discarded – undo
39 39
             "domain" => $this->getDomain(),
40 40
             "listLabel" => Api::API_LIST_NAME_FIELD,
41 41
             'modelId' => Api::API_MODEL_KEY_FIELD,
42
-            'formUrl' => preg_replace('/\/\{(.*)\}$/i', '', $this->getRoute(strtolower('admin-api-form-' . $this->getDomain() . '-' . $this->getApi()), TRUE)),
43
-            "url" => preg_replace('/\/\{(.*)\}$/i', '', $this->getRoute(strtolower($this->getDomain() . '-' . 'api-' . $this->getApi() . "-pk"), TRUE)),
42
+            'formUrl' => preg_replace('/\/\{(.*)\}$/i', '', $this->getRoute(strtolower('admin-api-form-'.$this->getDomain().'-'.$this->getApi()), TRUE)),
43
+            "url" => preg_replace('/\/\{(.*)\}$/i', '', $this->getRoute(strtolower($this->getDomain().'-'.'api-'.$this->getApi()."-pk"), TRUE)),
44 44
         ), [], '');
45 45
     }
46 46
 
Please login to merge, or discard this patch.
src/base/types/traits/Api/ConnectionTrait.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,6 @@
 block discarded – undo
6 6
 use Propel\Runtime\Propel;
7 7
 use PSFS\base\config\Config;
8 8
 use PSFS\base\Logger;
9
-use PSFS\base\types\traits\DebugTrait;
10 9
 
11 10
 /**
12 11
  * Trait ConnectionTrait
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
     protected function createConnection(TableMap $tableMap)
27 27
     {
28 28
         $this->con = Propel::getConnection($tableMap::DATABASE_NAME);
29
-        if(method_exists($this->con, 'useDebug')) {
29
+        if (method_exists($this->con, 'useDebug')) {
30 30
             Logger::log('Enabling debug queries mode', LOG_INFO);
31 31
             $this->con->useDebug(Config::getParam('debug'));
32 32
         }
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
         if (null !== $this->con && $this->con->inTransaction()) {
44 44
             if ($status === 200) {
45 45
                 $this->con->commit();
46
-            } else {
46
+            }else {
47 47
                 $this->con->rollBack();
48 48
             }
49 49
         }
Please login to merge, or discard this patch.
src/base/dto/JsonResponse.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
         $this->success = $result;
43 43
         $this->total = $total ?: count($data);
44 44
         $this->pages = $pages;
45
-        if(null !== $message) {
45
+        if (null !== $message) {
46 46
             $this->message = $message;
47 47
         }
48 48
     }
Please login to merge, or discard this patch.
src/base/types/Api.php 2 patches
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -3,15 +3,12 @@
 block discarded – undo
3 3
 
4 4
 use Propel\Runtime\ActiveQuery\ModelCriteria;
5 5
 use Propel\Runtime\Map\TableMap;
6
-use PSFS\base\config\Config;
7 6
 use PSFS\base\dto\JsonResponse;
8 7
 use PSFS\base\dto\Order;
9 8
 use PSFS\base\Logger;
10 9
 use PSFS\base\Request;
11
-use PSFS\base\Security;
12 10
 use PSFS\base\Singleton;
13 11
 use PSFS\base\types\helpers\ApiHelper;
14
-use PSFS\base\types\helpers\Inspector;
15 12
 use PSFS\base\types\traits\Api\ManagerTrait;
16 13
 
17 14
 /**
Please login to merge, or discard this patch.
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -72,13 +72,13 @@  discard block
 block discarded – undo
72 72
     public function init()
73 73
     {
74 74
         parent::init();
75
-        Logger::log(get_called_class() . ' init', LOG_DEBUG);
75
+        Logger::log(get_called_class().' init', LOG_DEBUG);
76 76
         $this->domain = $this->getDomain();
77 77
         $this->hydrateRequestData();
78 78
         $this->hydrateOrders();
79 79
         $this->createConnection($this->getTableMap());
80 80
         $this->setLoaded(true);
81
-        Logger::log(get_called_class() . ' loaded', LOG_DEBUG);
81
+        Logger::log(get_called_class().' loaded', LOG_DEBUG);
82 82
     }
83 83
 
84 84
     /**
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
     private function hydrateOrders()
88 88
     {
89 89
         if (count($this->query)) {
90
-            Logger::log(get_called_class() . ' gathering query string', LOG_DEBUG);
90
+            Logger::log(get_called_class().' gathering query string', LOG_DEBUG);
91 91
             foreach ($this->query as $key => $value) {
92 92
                 if ($key === self::API_ORDER_FIELD) {
93 93
                     foreach ($value as $field => $direction) {
@@ -104,10 +104,10 @@  discard block
 block discarded – undo
104 104
      */
105 105
     protected function extractPagination()
106 106
     {
107
-        Logger::log(get_called_class() . ' extract pagination start', LOG_DEBUG);
107
+        Logger::log(get_called_class().' extract pagination start', LOG_DEBUG);
108 108
         $page = (array_key_exists(self::API_PAGE_FIELD, $this->query)) ? $this->query[self::API_PAGE_FIELD] : 1;
109 109
         $limit = (array_key_exists(self::API_LIMIT_FIELD, $this->query)) ? $this->query[self::API_LIMIT_FIELD] : 100;
110
-        Logger::log(get_called_class() . ' extract pagination end', LOG_DEBUG);
110
+        Logger::log(get_called_class().' extract pagination end', LOG_DEBUG);
111 111
         return array($page, $limit);
112 112
     }
113 113
 
@@ -116,9 +116,9 @@  discard block
 block discarded – undo
116 116
      *
117 117
      * @param ModelCriteria $query
118 118
      */
119
-    private function addOrders(ModelCriteria &$query)
119
+    private function addOrders(ModelCriteria & $query)
120 120
     {
121
-        Logger::log(get_called_class() . ' extract orders start ', LOG_DEBUG);
121
+        Logger::log(get_called_class().' extract orders start ', LOG_DEBUG);
122 122
         $orderAdded = FALSE;
123 123
         $tableMap = $this->getTableMap();
124 124
         foreach ($this->order->getOrders() as $field => $direction) {
@@ -126,17 +126,17 @@  discard block
 block discarded – undo
126 126
                 $orderAdded = TRUE;
127 127
                 if ($direction === Order::ASC) {
128 128
                     $query->addAscendingOrderByColumn($column->getPhpName());
129
-                } else {
129
+                }else {
130 130
                     $query->addDescendingOrderByColumn($column->getPhpName());
131 131
                 }
132 132
             }
133 133
         }
134 134
         if (!$orderAdded) {
135
-            foreach($this->getPkDbName() as $pk => $phpName) {
135
+            foreach ($this->getPkDbName() as $pk => $phpName) {
136 136
                 $query->addAscendingOrderByColumn($pk);
137 137
             }
138 138
         }
139
-        Logger::log(get_called_class() . ' extract orders end', LOG_DEBUG);
139
+        Logger::log(get_called_class().' extract orders end', LOG_DEBUG);
140 140
     }
141 141
 
142 142
     /**
@@ -144,14 +144,14 @@  discard block
 block discarded – undo
144 144
      *
145 145
      * @param ModelCriteria $query
146 146
      */
147
-    protected function addFilters(ModelCriteria &$query)
147
+    protected function addFilters(ModelCriteria & $query)
148 148
     {
149 149
         if (count($this->query) > 0) {
150 150
             $tableMap = $this->getTableMap();
151 151
             foreach ($this->query as $field => $value) {
152 152
                 if (self::API_COMBO_FIELD === $field) {
153 153
                     ApiHelper::composerComboField($tableMap, $query, $this->extraColumns, $value);
154
-                } elseif(!preg_match('/^__/', $field)) {
154
+                } elseif (!preg_match('/^__/', $field)) {
155 155
                     ApiHelper::addModelField($tableMap, $query, $field, $value);
156 156
                 }
157 157
             }
@@ -172,10 +172,10 @@  discard block
 block discarded – undo
172 172
             list($page, $limit) = $this->extractPagination();
173 173
             if ($limit == -1) {
174 174
                 $this->list = $query->find($this->con);
175
-            } else {
175
+            }else {
176 176
                 $this->list = $query->paginate($page, $limit, $this->con);
177 177
             }
178
-        } catch (\Exception $e) {
178
+        }catch (\Exception $e) {
179 179
             Logger::log($e->getMessage(), LOG_ERR);
180 180
         }
181 181
     }
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
         $code = 200;
195 195
         list($return, $total, $pages) = $this->getList();
196 196
         $message = null;
197
-        if(!$total) {
197
+        if (!$total) {
198 198
             $message = _('No se han encontrado elementos para la búsqueda');
199 199
         }
200 200
 
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
         $pages = 1;
221 221
         $message = null;
222 222
         list($code, $return) = $this->getSingleResult($pk);
223
-        if($code !== 200) {
223
+        if ($code !== 200) {
224 224
             $message = _('No se ha encontrado el elemento solicitado');
225 225
         }
226 226
 
@@ -249,11 +249,11 @@  discard block
 block discarded – undo
249 249
                 $status = 200;
250 250
                 $saved = TRUE;
251 251
                 $model = $this->model->toArray();
252
-            } else {
252
+            }else {
253 253
                 $message = _('No se ha podido modificar el modelo seleccionado');
254 254
             }
255
-        } catch (\Exception $e) {
256
-            $message = _('Ha ocurrido un error intentando guardar el elemento: ') .'<br>'. $e->getMessage();
255
+        }catch (\Exception $e) {
256
+            $message = _('Ha ocurrido un error intentando guardar el elemento: ').'<br>'.$e->getMessage();
257 257
             Logger::log($e->getMessage(), LOG_ERR);
258 258
         }
259 259
 
@@ -287,14 +287,14 @@  discard block
 block discarded – undo
287 287
                     $updated = TRUE;
288 288
                     $status = 200;
289 289
                     $model = $this->model->toArray();
290
-                } else {
290
+                }else {
291 291
                     $message = _('Ha ocurrido un error intentando actualizar el elemento, por favor revisa los logs');
292 292
                 }
293
-            } catch (\Exception $e) {
293
+            }catch (\Exception $e) {
294 294
                 $message = $e->getMessage();
295 295
                 Logger::getInstance(get_class($this->model))->errorLog($e->getMessage());
296 296
             }
297
-        } else {
297
+        }else {
298 298
             $message = _('No se ha encontrado el modelo al que se hace referencia para actualizar');
299 299
         }
300 300
 
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
                     $this->model->delete($this->con);
325 325
                     $deleted = TRUE;
326 326
                 }
327
-            } catch (\Exception $e) {
327
+            }catch (\Exception $e) {
328 328
                 $message = _('Ha ocurrido un error intentando eliminar el elemento, por favor verifica que no tenga otros elementos relacionados');
329 329
                 Logger::getInstance(get_class($this->model))->errorLog($e->getMessage());
330 330
             }
@@ -358,8 +358,8 @@  discard block
 block discarded – undo
358 358
                 $total = $this->list->getNbResults();
359 359
                 $pages = $this->list->getLastPage();
360 360
             }
361
-        } catch (\Exception $e) {
362
-            Logger::log(get_class($this) . ': ' . $e->getMessage(), LOG_ERR);
361
+        }catch (\Exception $e) {
362
+            Logger::log(get_class($this).': '.$e->getMessage(), LOG_ERR);
363 363
         }
364 364
 
365 365
         return array($return, $total, $pages);
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
         $return = array();
378 378
         if (NULL === $model || !method_exists($model, 'toArray')) {
379 379
             $code = 404;
380
-        } else {
380
+        }else {
381 381
             $return = $model->toArray();
382 382
         }
383 383
 
Please login to merge, or discard this patch.
src/base/types/Controller.php 2 patches
Unused Use Statements   -4 removed lines patch added patch discarded remove patch
@@ -2,15 +2,11 @@
 block discarded – undo
2 2
 namespace PSFS\base\types;
3 3
 
4 4
 use PSFS\base\config\Config;
5
-use PSFS\base\exception\RouterException;
6
-use PSFS\base\Request;
7
-use PSFS\base\Router;
8 5
 use PSFS\base\Singleton;
9 6
 use PSFS\base\types\helpers\GeneratorHelper;
10 7
 use PSFS\base\types\helpers\Inspector;
11 8
 use PSFS\base\types\interfaces\ControllerInterface;
12 9
 use PSFS\base\types\traits\JsonTrait;
13
-use PSFS\base\types\traits\OutputTrait;
14 10
 use PSFS\base\types\traits\RouteTrait;
15 11
 
16 12
 /**
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -41,11 +41,11 @@  discard block
 block discarded – undo
41 41
     public function render($template, array $vars = array(), $cookies = array(), $domain = null)
42 42
     {
43 43
         $vars['__menu__'] = $this->getMenu();
44
-        if(Config::getParam('profiling.enable')) {
44
+        if (Config::getParam('profiling.enable')) {
45 45
             $vars['__profiling__'] = Inspector::getStats();
46 46
         }
47 47
         $domain = (null === $domain) ? $this->getDomain() : $domain;
48
-        return $this->tpl->render($domain . $template, $vars, $cookies);
48
+        return $this->tpl->render($domain.$template, $vars, $cookies);
49 49
     }
50 50
 
51 51
     /**
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
     {
77 77
         $vars['__menu__'] = $this->getMenu();
78 78
         $domain = $domain ?: $this->getDomain();
79
-        return $this->tpl->dump($domain . $template, $vars);
79
+        return $this->tpl->dump($domain.$template, $vars);
80 80
     }
81 81
 
82 82
     /**
Please login to merge, or discard this patch.
src/base/types/helpers/Inspector.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -14,6 +14,9 @@
 block discarded – undo
14 14
         ];
15 15
     }
16 16
 
17
+    /**
18
+     * @param string $name
19
+     */
17 20
     public static function stats($name = null) {
18 21
         self::$profiling[] = self::collect($name);
19 22
     }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
     protected static function calculateStats(array $stats, $ts, $mem = 0, $files = 0) {
29 29
         return [
30 30
             'ts' => round($stats['ts'] - $ts, 4),
31
-            'mem' => round(($stats['mem'] - $mem) / 1024 / 1024, 4),
31
+            'mem' => round(($stats['mem'] - $mem)/1024/1024, 4),
32 32
             'files' => $stats['files'] - $files,
33 33
             'name' => $stats['name'],
34 34
         ];
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
         $ts = defined('PSFS_START_TS') ? PSFS_START_TS : 0;
43 43
         $mem = defined('PSFS_START_MEM') ? PSFS_START_MEM : 0;
44 44
         $files = 0;
45
-        foreach(self::$profiling as $key => &$value) {
45
+        foreach (self::$profiling as $key => &$value) {
46 46
             $value = self::calculateStats($value, $ts, $mem, $files);
47 47
         }
48 48
         self::$profiling[] = self::calculateStats(self::collect('Profiling collect ends'), $ts, $mem, $files);
Please login to merge, or discard this patch.
src/base/types/traits/JsonTrait.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
      * @param mixed $response
19 19
      * @param int $statusCode
20 20
      *
21
-     * @return mixed JSON
21
+     * @return string|null JSON
22 22
      */
23 23
     public function json($response, $statusCode = 200)
24 24
     {
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -23,10 +23,10 @@  discard block
 block discarded – undo
23 23
      */
24 24
     public function json($response, $statusCode = 200)
25 25
     {
26
-        if(Config::getParam('profiling.enable')) {
27
-            if(is_array($response)) {
26
+        if (Config::getParam('profiling.enable')) {
27
+            if (is_array($response)) {
28 28
                 $response['profiling'] = Inspector::getStats();
29
-            } elseif($response instanceof JsonResponse) {
29
+            } elseif ($response instanceof JsonResponse) {
30 30
                 $response = ProfilingJsonResponse::createFromPrevious($response, Inspector::getStats());
31 31
             }
32 32
         }
@@ -34,8 +34,8 @@  discard block
 block discarded – undo
34 34
         $this->decodeJsonReponse($response);
35 35
 
36 36
         $data = json_encode($response, JSON_UNESCAPED_UNICODE | JSON_NUMERIC_CHECK | JSON_BIGINT_AS_STRING);
37
-        if(Config::getParam('angular.protection', false)) {
38
-            $data = ")]}',\n" . $data;
37
+        if (Config::getParam('angular.protection', false)) {
38
+            $data = ")]}',\n".$data;
39 39
         }
40 40
         $this->setStatus($statusCode);
41 41
         ResponseHelper::setDebugHeaders([]);
Please login to merge, or discard this patch.
src/bootstrap.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -3,17 +3,17 @@
 block discarded – undo
3 3
 
4 4
 if (!defined('SOURCE_DIR')) define('SOURCE_DIR', __DIR__);
5 5
 if (preg_match('/vendor/', SOURCE_DIR)) {
6
-    if (!defined('BASE_DIR')) define('BASE_DIR', SOURCE_DIR . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..');
7
-    if (!defined('CORE_DIR')) define('CORE_DIR', BASE_DIR . DIRECTORY_SEPARATOR . 'src');
8
-} else {
9
-    if (!defined('BASE_DIR')) define('BASE_DIR', SOURCE_DIR . DIRECTORY_SEPARATOR . '..');
10
-    if (!defined('CORE_DIR')) define('CORE_DIR', BASE_DIR . DIRECTORY_SEPARATOR . 'modules');
6
+    if (!defined('BASE_DIR')) define('BASE_DIR', SOURCE_DIR.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'..');
7
+    if (!defined('CORE_DIR')) define('CORE_DIR', BASE_DIR.DIRECTORY_SEPARATOR.'src');
8
+}else {
9
+    if (!defined('BASE_DIR')) define('BASE_DIR', SOURCE_DIR.DIRECTORY_SEPARATOR.'..');
10
+    if (!defined('CORE_DIR')) define('CORE_DIR', BASE_DIR.DIRECTORY_SEPARATOR.'modules');
11 11
 }
12
-if (!defined('VENDOR_DIR')) define('VENDOR_DIR', BASE_DIR . DIRECTORY_SEPARATOR . 'vendor');
13
-if (!defined('LOG_DIR')) define('LOG_DIR', BASE_DIR . DIRECTORY_SEPARATOR . 'logs');
14
-if (!defined('CACHE_DIR')) define('CACHE_DIR', BASE_DIR . DIRECTORY_SEPARATOR . 'cache');
15
-if (!defined('CONFIG_DIR')) define('CONFIG_DIR', BASE_DIR . DIRECTORY_SEPARATOR . 'config');
16
-if (!defined('WEB_DIR')) define('WEB_DIR', BASE_DIR . DIRECTORY_SEPARATOR . 'html');
12
+if (!defined('VENDOR_DIR')) define('VENDOR_DIR', BASE_DIR.DIRECTORY_SEPARATOR.'vendor');
13
+if (!defined('LOG_DIR')) define('LOG_DIR', BASE_DIR.DIRECTORY_SEPARATOR.'logs');
14
+if (!defined('CACHE_DIR')) define('CACHE_DIR', BASE_DIR.DIRECTORY_SEPARATOR.'cache');
15
+if (!defined('CONFIG_DIR')) define('CONFIG_DIR', BASE_DIR.DIRECTORY_SEPARATOR.'config');
16
+if (!defined('WEB_DIR')) define('WEB_DIR', BASE_DIR.DIRECTORY_SEPARATOR.'html');
17 17
 
18 18
 
19 19
 /**
Please login to merge, or discard this patch.
Braces   +31 added lines, -11 removed lines patch added patch discarded remove patch
@@ -4,19 +4,39 @@
 block discarded – undo
4 4
 defined('PSFS_START_MEM') or define('PSFS_START_MEM', memory_get_usage());
5 5
 defined('PSFS_START_TS') or define('PSFS_START_TS', microtime(true));
6 6
 
7
-if (!defined('SOURCE_DIR')) define('SOURCE_DIR', __DIR__);
7
+if (!defined('SOURCE_DIR')) {
8
+    define('SOURCE_DIR', __DIR__);
9
+}
8 10
 if (preg_match('/vendor/', SOURCE_DIR)) {
9
-    if (!defined('BASE_DIR')) define('BASE_DIR', SOURCE_DIR . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..');
10
-    if (!defined('CORE_DIR')) define('CORE_DIR', BASE_DIR . DIRECTORY_SEPARATOR . 'src');
11
-} else {
12
-    if (!defined('BASE_DIR')) define('BASE_DIR', SOURCE_DIR . DIRECTORY_SEPARATOR . '..');
13
-    if (!defined('CORE_DIR')) define('CORE_DIR', BASE_DIR . DIRECTORY_SEPARATOR . 'modules');
11
+    if (!defined('BASE_DIR')) {
12
+        define('BASE_DIR', SOURCE_DIR . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..');
13
+    }
14
+    if (!defined('CORE_DIR')) {
15
+        define('CORE_DIR', BASE_DIR . DIRECTORY_SEPARATOR . 'src');
16
+    }
17
+    } else {
18
+    if (!defined('BASE_DIR')) {
19
+        define('BASE_DIR', SOURCE_DIR . DIRECTORY_SEPARATOR . '..');
20
+    }
21
+    if (!defined('CORE_DIR')) {
22
+        define('CORE_DIR', BASE_DIR . DIRECTORY_SEPARATOR . 'modules');
23
+    }
24
+    }
25
+if (!defined('VENDOR_DIR')) {
26
+    define('VENDOR_DIR', BASE_DIR . DIRECTORY_SEPARATOR . 'vendor');
27
+}
28
+if (!defined('LOG_DIR')) {
29
+    define('LOG_DIR', BASE_DIR . DIRECTORY_SEPARATOR . 'logs');
30
+}
31
+if (!defined('CACHE_DIR')) {
32
+    define('CACHE_DIR', BASE_DIR . DIRECTORY_SEPARATOR . 'cache');
33
+}
34
+if (!defined('CONFIG_DIR')) {
35
+    define('CONFIG_DIR', BASE_DIR . DIRECTORY_SEPARATOR . 'config');
36
+}
37
+if (!defined('WEB_DIR')) {
38
+    define('WEB_DIR', BASE_DIR . DIRECTORY_SEPARATOR . 'html');
14 39
 }
15
-if (!defined('VENDOR_DIR')) define('VENDOR_DIR', BASE_DIR . DIRECTORY_SEPARATOR . 'vendor');
16
-if (!defined('LOG_DIR')) define('LOG_DIR', BASE_DIR . DIRECTORY_SEPARATOR . 'logs');
17
-if (!defined('CACHE_DIR')) define('CACHE_DIR', BASE_DIR . DIRECTORY_SEPARATOR . 'cache');
18
-if (!defined('CONFIG_DIR')) define('CONFIG_DIR', BASE_DIR . DIRECTORY_SEPARATOR . 'config');
19
-if (!defined('WEB_DIR')) define('WEB_DIR', BASE_DIR . DIRECTORY_SEPARATOR . 'html');
20 40
 
21 41
 
22 42
 /**
Please login to merge, or discard this patch.