@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | foreach ($domains as $domain => $routes) { |
| 38 | 38 | $pDomain = str_replace('@', '', $domain); |
| 39 | 39 | $pDomain = str_replace('/', '', $pDomain); |
| 40 | - $response[] = strtolower($pDomain) . '.api.secret'; |
|
| 40 | + $response[] = strtolower($pDomain).'.api.secret'; |
|
| 41 | 41 | } |
| 42 | 42 | return $this->json($response); |
| 43 | 43 | } |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | */ |
| 54 | 54 | public function config() |
| 55 | 55 | { |
| 56 | - Logger::log("Config loaded executed by " . $this->getRequest()->getRequestUri()); |
|
| 56 | + Logger::log("Config loaded executed by ".$this->getRequest()->getRequestUri()); |
|
| 57 | 57 | if (defined('PSFS_UNIT_TESTING_EXECUTION')) { |
| 58 | 58 | throw new ConfigException('CONFIG'); |
| 59 | 59 | } |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | } |
| 93 | 93 | Security::getInstance()->setFlash("callback_message", t("Configuración actualizada correctamente")); |
| 94 | 94 | Security::getInstance()->setFlash("callback_route", $this->getRoute("admin-config", true)); |
| 95 | - } else { |
|
| 95 | + }else { |
|
| 96 | 96 | throw new HttpException(t('Error al guardar la configuración, prueba a cambiar los permisos'), 403); |
| 97 | 97 | } |
| 98 | 98 | } |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | { |
| 57 | 57 | GeneratorHelper::createDir(dirname($path)); |
| 58 | 58 | if (false === FileHelper::writeFile($path, $data)) { |
| 59 | - throw new ConfigException(t('No se tienen los permisos suficientes para escribir en el fichero ') . $path); |
|
| 59 | + throw new ConfigException(t('No se tienen los permisos suficientes para escribir en el fichero ').$path); |
|
| 60 | 60 | } |
| 61 | 61 | } |
| 62 | 62 | |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | { |
| 71 | 71 | Inspector::stats('[Cache] Gathering data from cache', Inspector::SCOPE_DEBUG); |
| 72 | 72 | $data = null; |
| 73 | - $absolutePath = $absolute ? $path : CACHE_DIR . DIRECTORY_SEPARATOR . $path; |
|
| 73 | + $absolutePath = $absolute ? $path : CACHE_DIR.DIRECTORY_SEPARATOR.$path; |
|
| 74 | 74 | if (file_exists($absolutePath)) { |
| 75 | 75 | $data = FileHelper::readFile($absolutePath); |
| 76 | 76 | } |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | private function hasExpiredCache($path, $expires = 300, $absolute = false) |
| 87 | 87 | { |
| 88 | 88 | Inspector::stats('[Cache] Checking expiration', Inspector::SCOPE_DEBUG); |
| 89 | - $absolutePath = ($absolute) ? $path : CACHE_DIR . DIRECTORY_SEPARATOR . $path; |
|
| 89 | + $absolutePath = ($absolute) ? $path : CACHE_DIR.DIRECTORY_SEPARATOR.$path; |
|
| 90 | 90 | $lasModificationDate = filemtime($absolutePath); |
| 91 | 91 | return ($lasModificationDate + $expires <= time()); |
| 92 | 92 | } |
@@ -153,7 +153,7 @@ discard block |
||
| 153 | 153 | { |
| 154 | 154 | Inspector::stats('[Cache] Store data in cache', Inspector::SCOPE_DEBUG); |
| 155 | 155 | $data = self::transformData($data, $transform); |
| 156 | - $absolutePath = $absolute ? $path : CACHE_DIR . DIRECTORY_SEPARATOR . $path; |
|
| 156 | + $absolutePath = $absolute ? $path : CACHE_DIR.DIRECTORY_SEPARATOR.$path; |
|
| 157 | 157 | $this->saveTextToFile($data, $absolutePath); |
| 158 | 158 | } |
| 159 | 159 | |
@@ -170,12 +170,12 @@ discard block |
||
| 170 | 170 | public function readFromCache($path, $expires = 300, $function = null, $transform = Cache::TEXT, $ignoreExpiration = false) |
| 171 | 171 | { |
| 172 | 172 | $data = null; |
| 173 | - Inspector::stats('[Cache] Reading data from cache: ' . json_encode(['path' => $path]), Inspector::SCOPE_DEBUG); |
|
| 174 | - if (file_exists(CACHE_DIR . DIRECTORY_SEPARATOR . $path)) { |
|
| 173 | + Inspector::stats('[Cache] Reading data from cache: '.json_encode(['path' => $path]), Inspector::SCOPE_DEBUG); |
|
| 174 | + if (file_exists(CACHE_DIR.DIRECTORY_SEPARATOR.$path)) { |
|
| 175 | 175 | if (is_callable($function) && $this->hasExpiredCache($path, $expires) && !$ignoreExpiration) { |
| 176 | 176 | $data = $function(); |
| 177 | 177 | $this->storeData($path, $data, $transform); |
| 178 | - } else { |
|
| 178 | + }else { |
|
| 179 | 179 | $data = $this->getDataFromFile($path, $transform); |
| 180 | 180 | } |
| 181 | 181 | } |
@@ -221,7 +221,7 @@ discard block |
||
| 221 | 221 | $query[Api::HEADER_API_LANG] = Request::header(Api::HEADER_API_LANG, 'es'); |
| 222 | 222 | $filename = FileHelper::generateHashFilename($action['http'], $action['slug'], $query); |
| 223 | 223 | $hashPath = FileHelper::generateCachePath($action, $query); |
| 224 | - Inspector::stats('[Cache] Cache file calculated: ' . json_encode(['file' => $filename, 'hash' => $hashPath]), Inspector::SCOPE_DEBUG); |
|
| 224 | + Inspector::stats('[Cache] Cache file calculated: '.json_encode(['file' => $filename, 'hash' => $hashPath]), Inspector::SCOPE_DEBUG); |
|
| 225 | 225 | Logger::log('Cache file calculated', LOG_DEBUG, ['file' => $filename, 'hash' => $hashPath]); |
| 226 | 226 | } |
| 227 | 227 | return [$hashPath, $filename]; |
@@ -233,9 +233,9 @@ discard block |
||
| 233 | 233 | Inspector::stats('[Cache] Flushing cache', Inspector::SCOPE_DEBUG); |
| 234 | 234 | $action = Security::getInstance()->getSessionKey(self::CACHE_SESSION_VAR); |
| 235 | 235 | if (is_array($action)) { |
| 236 | - $hashPath = FileHelper::generateCachePath($action, $action['params']) . '..' . DIRECTORY_SEPARATOR . ' .. ' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR; |
|
| 236 | + $hashPath = FileHelper::generateCachePath($action, $action['params']).'..'.DIRECTORY_SEPARATOR.' .. '.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR; |
|
| 237 | 237 | if (!file_exists($hashPath)) { |
| 238 | - $hashPath = CACHE_DIR . DIRECTORY_SEPARATOR . $hashPath; |
|
| 238 | + $hashPath = CACHE_DIR.DIRECTORY_SEPARATOR.$hashPath; |
|
| 239 | 239 | } |
| 240 | 240 | FileHelper::deleteDir($hashPath); |
| 241 | 241 | } |
@@ -23,12 +23,12 @@ discard block |
||
| 23 | 23 | */ |
| 24 | 24 | private function getPropelPaths(string $modulePath): array |
| 25 | 25 | { |
| 26 | - $moduleDir = CORE_DIR . DIRECTORY_SEPARATOR . $modulePath; |
|
| 26 | + $moduleDir = CORE_DIR.DIRECTORY_SEPARATOR.$modulePath; |
|
| 27 | 27 | GeneratorHelper::createDir($moduleDir); |
| 28 | 28 | $moduleDir = realpath($moduleDir); |
| 29 | - $configDir = $moduleDir . DIRECTORY_SEPARATOR . 'Config'; |
|
| 30 | - $sqlDir = $moduleDir . DIRECTORY_SEPARATOR . 'Config' . DIRECTORY_SEPARATOR . 'Sql'; |
|
| 31 | - $migrationDir = $moduleDir . DIRECTORY_SEPARATOR . 'Config' . DIRECTORY_SEPARATOR . 'Migrations'; |
|
| 29 | + $configDir = $moduleDir.DIRECTORY_SEPARATOR.'Config'; |
|
| 30 | + $sqlDir = $moduleDir.DIRECTORY_SEPARATOR.'Config'.DIRECTORY_SEPARATOR.'Sql'; |
|
| 31 | + $migrationDir = $moduleDir.DIRECTORY_SEPARATOR.'Config'.DIRECTORY_SEPARATOR.'Migrations'; |
|
| 32 | 32 | return [ |
| 33 | 33 | 'projectDir' => $moduleDir, |
| 34 | 34 | 'outputDir' => $moduleDir, |
@@ -89,12 +89,12 @@ discard block |
||
| 89 | 89 | * @param AbstractManager $manager |
| 90 | 90 | * @param string $workingDir |
| 91 | 91 | */ |
| 92 | - private function setupManager(GeneratorConfig $configGenerator, AbstractManager &$manager, string $workingDir = CORE_DIR): void |
|
| 92 | + private function setupManager(GeneratorConfig $configGenerator, AbstractManager & $manager, string $workingDir = CORE_DIR): void |
|
| 93 | 93 | { |
| 94 | 94 | $manager->setGeneratorConfig($configGenerator); |
| 95 | - $schemaFile = new \SplFileInfo($configGenerator->getSection('paths')['schemaDir'] . DIRECTORY_SEPARATOR . 'schema.xml'); |
|
| 95 | + $schemaFile = new \SplFileInfo($configGenerator->getSection('paths')['schemaDir'].DIRECTORY_SEPARATOR.'schema.xml'); |
|
| 96 | 96 | $manager->setSchemas([$schemaFile]); |
| 97 | - $manager->setLoggerClosure(function ($message) { |
|
| 97 | + $manager->setLoggerClosure(function($message) { |
|
| 98 | 98 | Logger::log($message, LOG_INFO); |
| 99 | 99 | }); |
| 100 | 100 | $manager->setWorkingDirectory($workingDir); |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | * |
| 109 | 109 | * @return array List of schema files |
| 110 | 110 | */ |
| 111 | - protected function getSchemas(array|string $directory, bool $recursive = false): array |
|
| 111 | + protected function getSchemas(array | string $directory, bool $recursive = false): array |
|
| 112 | 112 | { |
| 113 | 113 | $finder = new Finder(); |
| 114 | 114 | $finder |
@@ -24,11 +24,11 @@ discard block |
||
| 24 | 24 | { |
| 25 | 25 | Inspector::stats('[RouterHelper] Getting class to call for executing the request action', Inspector::SCOPE_DEBUG); |
| 26 | 26 | Logger::log('Getting class to call for executing the request action', LOG_DEBUG, $action); |
| 27 | - $actionClass = class_exists($action['class']) ? $action['class'] : "\\" . $action['class']; |
|
| 27 | + $actionClass = class_exists($action['class']) ? $action['class'] : "\\".$action['class']; |
|
| 28 | 28 | $reflectionClass = new ReflectionClass($actionClass); |
| 29 | 29 | if ($reflectionClass->hasMethod('getInstance')) { |
| 30 | 30 | $class = $reflectionClass->getMethod('getInstance')->invoke(null, $action['method']); |
| 31 | - } else { |
|
| 31 | + }else { |
|
| 32 | 32 | $class = new $actionClass; |
| 33 | 33 | } |
| 34 | 34 | return $class; |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | $expr = preg_quote($expr, '/'); |
| 128 | 128 | $expr = str_replace('%%%', '(.*)', $expr); |
| 129 | 129 | $expr2 = preg_replace('/\(\.\*\)$/', '', $expr); |
| 130 | - $matched = preg_match('/^' . $expr . '\/?$/i', $path) || preg_match('/^' . $expr2 . '?$/i', $path); |
|
| 130 | + $matched = preg_match('/^'.$expr.'\/?$/i', $path) || preg_match('/^'.$expr2.'?$/i', $path); |
|
| 131 | 131 | return $matched; |
| 132 | 132 | } |
| 133 | 133 | |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | */ |
| 139 | 139 | public static function extractDomainInfo(ReflectionClass $class, string $domain): array |
| 140 | 140 | { |
| 141 | - $path = dirname($class->getFileName()) . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR; |
|
| 141 | + $path = dirname($class->getFileName()).DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR; |
|
| 142 | 142 | $templatesPath = 'templates'; |
| 143 | 143 | $publicPath = 'public'; |
| 144 | 144 | $modelsPath = 'models'; |
@@ -148,13 +148,13 @@ discard block |
||
| 148 | 148 | $modelsPath = ucfirst($modelsPath); |
| 149 | 149 | } |
| 150 | 150 | if ($class->hasConstant('TPL')) { |
| 151 | - $templatesPath .= DIRECTORY_SEPARATOR . $class->getConstant('TPL'); |
|
| 151 | + $templatesPath .= DIRECTORY_SEPARATOR.$class->getConstant('TPL'); |
|
| 152 | 152 | } |
| 153 | 153 | return [ |
| 154 | 154 | 'base' => $path, |
| 155 | - 'template' => $path . $templatesPath, |
|
| 156 | - 'model' => $path . $modelsPath, |
|
| 157 | - 'public' => $path . $publicPath, |
|
| 155 | + 'template' => $path.$templatesPath, |
|
| 156 | + 'model' => $path.$modelsPath, |
|
| 157 | + 'public' => $path.$publicPath, |
|
| 158 | 158 | ]; |
| 159 | 159 | } |
| 160 | 160 | |
@@ -175,12 +175,12 @@ discard block |
||
| 175 | 175 | foreach ($parameters as $param) { |
| 176 | 176 | if ($param->isOptional() && !is_array($param->getDefaultValue())) { |
| 177 | 177 | $params[$param->getName()] = $param->getDefaultValue(); |
| 178 | - $default = str_replace('{' . $param->getName() . '}', $param->getDefaultValue() ?: '', $regex ?: ''); |
|
| 178 | + $default = str_replace('{'.$param->getName().'}', $param->getDefaultValue() ?: '', $regex ?: ''); |
|
| 179 | 179 | } elseif (!$param->isOptional()) { |
| 180 | 180 | $requirements[] = $param->getName(); |
| 181 | 181 | } |
| 182 | 182 | } |
| 183 | - } else { |
|
| 183 | + }else { |
|
| 184 | 184 | $default = $regex; |
| 185 | 185 | } |
| 186 | 186 | |
@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | $httpMethod = AnnotationHelper::extractReflectionHttpMethod($docComments); |
| 211 | 211 | $icon = AnnotationHelper::extractDocIcon($docComments); |
| 212 | 212 | $label = AnnotationHelper::extractReflectionLabel(str_replace('{__API__}', $api, $docComments)); |
| 213 | - $route = $httpMethod . "#|#" . $regex; |
|
| 213 | + $route = $httpMethod."#|#".$regex; |
|
| 214 | 214 | $route = preg_replace('/(\\r|\\f|\\t|\\n)/', '', $route); |
| 215 | 215 | $info = [ |
| 216 | 216 | 'method' => $method->getName(), |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | && (preg_match('/^\/(admin|setup\-admin)/i', $route) || Config::getParam('restricted', false)) |
| 35 | 35 | ) { |
| 36 | 36 | if (!self::isTest() && |
| 37 | - null === Cache::getInstance()->getDataFromFile(CONFIG_DIR . DIRECTORY_SEPARATOR . 'admins.json', Cache::JSONGZ, true)) { |
|
| 37 | + null === Cache::getInstance()->getDataFromFile(CONFIG_DIR.DIRECTORY_SEPARATOR.'admins.json', Cache::JSONGZ, true)) { |
|
| 38 | 38 | throw new AdminCredentialsException(); |
| 39 | 39 | } |
| 40 | 40 | if (!Security::getInstance()->checkAdmin()) { |
@@ -54,8 +54,8 @@ discard block |
||
| 54 | 54 | $token = ''; |
| 55 | 55 | $length = strlen($timestamp); |
| 56 | 56 | for ($i = 0; $i < $length; $i++) { |
| 57 | - $token = substr($hash, $i, 1) . |
|
| 58 | - substr($timestamp, $i, 1) . |
|
| 57 | + $token = substr($hash, $i, 1). |
|
| 58 | + substr($timestamp, $i, 1). |
|
| 59 | 59 | $token; |
| 60 | 60 | } |
| 61 | 61 | return $token; |
@@ -74,16 +74,16 @@ discard block |
||
| 74 | 74 | $charsLength = strlen(self::RAND_SEP) - 1; |
| 75 | 75 | $tsLength = strlen($timestamp); |
| 76 | 76 | $i = 0; |
| 77 | - $partCount = ceil($hashRest / 4); |
|
| 78 | - $part = substr($hash, $tsLength + $partCount * $i, $partCount); |
|
| 77 | + $partCount = ceil($hashRest/4); |
|
| 78 | + $part = substr($hash, $tsLength + $partCount*$i, $partCount); |
|
| 79 | 79 | while (false !== $part && strlen($part) > 0) { |
| 80 | - $mixedToken .= $part . |
|
| 81 | - substr(self::RAND_SEP, round(rand(0, $charsLength), 0, PHP_ROUND_HALF_DOWN), 1) . |
|
| 80 | + $mixedToken .= $part. |
|
| 81 | + substr(self::RAND_SEP, round(rand(0, $charsLength), 0, PHP_ROUND_HALF_DOWN), 1). |
|
| 82 | 82 | substr(self::RAND_SEP, round(rand(0, $charsLength), 0, PHP_ROUND_HALF_DOWN), 1); |
| 83 | - $part = substr($hash, $tsLength + $partCount * $i, $partCount); |
|
| 83 | + $part = substr($hash, $tsLength + $partCount*$i, $partCount); |
|
| 84 | 84 | $i++; |
| 85 | 85 | } |
| 86 | - return $mixedToken . $token; |
|
| 86 | + return $mixedToken.$token; |
|
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | /** |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | private static function getTs(bool $isOdd = null): int |
| 94 | 94 | { |
| 95 | 95 | $timestamp = time(); |
| 96 | - $tsIsOdd = (bool)((int)substr($timestamp, -1) % 2); |
|
| 96 | + $tsIsOdd = (bool)((int)substr($timestamp, -1)%2); |
|
| 97 | 97 | if (false === $isOdd && !$tsIsOdd) { |
| 98 | 98 | $timestamp--; |
| 99 | 99 | } elseif (true === $isOdd && !$tsIsOdd) { |
@@ -129,9 +129,9 @@ discard block |
||
| 129 | 129 | $timestamp = ''; |
| 130 | 130 | $part = strrev($part); |
| 131 | 131 | for ($i = 0, $ct = strlen($part); $i < $ct; $i++) { |
| 132 | - if ($i % 2 == 0) { |
|
| 132 | + if ($i%2 == 0) { |
|
| 133 | 133 | $timestamp .= substr($part, $i, 1); |
| 134 | - } else { |
|
| 134 | + }else { |
|
| 135 | 135 | $partToken .= substr($part, $i, 1); |
| 136 | 136 | } |
| 137 | 137 | } |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | list($partToken, $timestamp) = self::extractTs(array_pop($parts)); |
| 149 | 149 | $token = null; |
| 150 | 150 | if ($timestamp > 0) { |
| 151 | - $token = $partToken . implode('', $parts); |
|
| 151 | + $token = $partToken.implode('', $parts); |
|
| 152 | 152 | } |
| 153 | 153 | return [$token, $timestamp]; |
| 154 | 154 | } |
@@ -96,7 +96,7 @@ |
||
| 96 | 96 | */ |
| 97 | 97 | public static function extractFromDoc(string $needle, string $comments, string $default = null): ?string |
| 98 | 98 | { |
| 99 | - preg_match('/@' . $needle . '\ (.*)(\n|\r)/im', $comments, $matches); |
|
| 99 | + preg_match('/@'.$needle.'\ (.*)(\n|\r)/im', $comments, $matches); |
|
| 100 | 100 | return (count($matches) > 0) ? $matches[1] : $default; |
| 101 | 101 | } |
| 102 | 102 | } |
@@ -24,10 +24,10 @@ |
||
| 24 | 24 | $now = new DateTime(); |
| 25 | 25 | $now->setTimezone(new DateTimeZone(Config::getParam('project.timezone', 'Europe/Madrid'))); |
| 26 | 26 | $config = Config::getInstance()->dumpConfig(); |
| 27 | - if (file_exists(CACHE_DIR . DIRECTORY_SEPARATOR . $config[self::CACHE_VAR_TAG] . '.file.cache')) { |
|
| 28 | - unlink(CACHE_DIR . DIRECTORY_SEPARATOR . $config[self::CACHE_VAR_TAG] . '.file.cache'); |
|
| 27 | + if (file_exists(CACHE_DIR.DIRECTORY_SEPARATOR.$config[self::CACHE_VAR_TAG].'.file.cache')) { |
|
| 28 | + unlink(CACHE_DIR.DIRECTORY_SEPARATOR.$config[self::CACHE_VAR_TAG].'.file.cache'); |
|
| 29 | 29 | } |
| 30 | - $config[self::CACHE_VAR_TAG] = 'v' . $now->format('Ymd.His'); |
|
| 30 | + $config[self::CACHE_VAR_TAG] = 'v'.$now->format('Ymd.His'); |
|
| 31 | 31 | Config::save($config); |
| 32 | 32 | return $config[self::CACHE_VAR_TAG]; |
| 33 | 33 | } |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | 'required' => $isRequired, |
| 44 | 44 | 'description' => $label, |
| 45 | 45 | ]; |
| 46 | - } else { |
|
| 46 | + }else { |
|
| 47 | 47 | $instance = new ReflectionClass($instanceType); |
| 48 | 48 | $variables[$property->getName()] = [ |
| 49 | 49 | 'is_array' => $isArray, |
@@ -159,13 +159,13 @@ discard block |
||
| 159 | 159 | */ |
| 160 | 160 | public static function constructInjectableInstance($variable, $singleton, $classNameSpace, $calledClass) |
| 161 | 161 | { |
| 162 | - Logger::log('Create inyectable instance for ' . $classNameSpace); |
|
| 162 | + Logger::log('Create inyectable instance for '.$classNameSpace); |
|
| 163 | 163 | $reflector = new ReflectionClass($calledClass); |
| 164 | 164 | $property = $reflector->getProperty($variable); |
| 165 | 165 | $varInstanceType = (null === $classNameSpace) ? InjectorHelper::extractVarType($property->getDocComment()) : $classNameSpace; |
| 166 | 166 | if (true === $singleton && method_exists($varInstanceType, 'getInstance')) { |
| 167 | 167 | $instance = $varInstanceType::getInstance(); |
| 168 | - } else { |
|
| 168 | + }else { |
|
| 169 | 169 | $instance = new $varInstanceType(); |
| 170 | 170 | } |
| 171 | 171 | return $instance; |
@@ -179,7 +179,7 @@ discard block |
||
| 179 | 179 | public static function getClassProperties($class) |
| 180 | 180 | { |
| 181 | 181 | $properties = []; |
| 182 | - Logger::log('Extracting annotations properties from class ' . $class); |
|
| 182 | + Logger::log('Extracting annotations properties from class '.$class); |
|
| 183 | 183 | $selfReflector = new ReflectionClass($class); |
| 184 | 184 | if (false !== $selfReflector->getParentClass()) { |
| 185 | 185 | $properties = self::getClassProperties($selfReflector->getParentClass()->getName()); |
@@ -52,7 +52,7 @@ |
||
| 52 | 52 | { |
| 53 | 53 | return [ |
| 54 | 54 | 'ts' => round($stats['ts'] - $timestamp, 4), |
| 55 | - 'mem' => round(($stats['mem'] - $mem) / 1024 / 1024, 4), |
|
| 55 | + 'mem' => round(($stats['mem'] - $mem)/1024/1024, 4), |
|
| 56 | 56 | 'files' => $stats['files'] - $files, |
| 57 | 57 | 'name' => $stats['name'], |
| 58 | 58 | ]; |