@@ -177,7 +177,7 @@ |
||
177 | 177 | debug_message('No se ha podido crear la carpeta ' . $path); |
178 | 178 | } |
179 | 179 | } |
180 | - return $path . $filename . '.yaml';; |
|
180 | + return $path . $filename . '.yaml'; ; |
|
181 | 181 | } |
182 | 182 | |
183 | 183 | public static function saveYamlFile(string $folder, string $filename, array $content, int $maxLevel = 3): bool |
@@ -64,7 +64,7 @@ |
||
64 | 64 | { |
65 | 65 | $messages = $this->messages; |
66 | 66 | |
67 | - usort($messages, function ($itemA, $itemB) { |
|
67 | + usort($messages, function($itemA, $itemB) { |
|
68 | 68 | if ($itemA['time'] === $itemB['time']) { |
69 | 69 | return 0; |
70 | 70 | } |
@@ -37,7 +37,7 @@ |
||
37 | 37 | * |
38 | 38 | * @param Translator $translator |
39 | 39 | */ |
40 | - public function __construct(Translator &$translator) |
|
40 | + public function __construct(Translator & $translator) |
|
41 | 41 | { |
42 | 42 | static::$translator = $translator; |
43 | 43 | $this->translations = []; |
@@ -121,11 +121,11 @@ |
||
121 | 121 | */ |
122 | 122 | public static function setUser($user, $password): bool |
123 | 123 | { |
124 | - $usernameField = 'login'; // Alxarafe use 'username', but Dolibarr use 'login' |
|
125 | - $passwordField = 'pass_crypted'; // Alxarafe use 'password', but Dolibarr use 'pass_crypted' |
|
124 | + $usernameField = 'login'; // Alxarafe use 'username', but Dolibarr use 'login' |
|
125 | + $passwordField = 'pass_crypted'; // Alxarafe use 'password', but Dolibarr use 'pass_crypted' |
|
126 | 126 | $encryptMethod = "password_hash"; // Alxarafe use 'md5', but Dolibarr use a function called dol_hash |
127 | 127 | |
128 | - $tablename=self::$users->tableName; |
|
128 | + $tablename = self::$users->tableName; |
|
129 | 129 | $_user = Engine::select("SELECT * FROM {$tablename} WHERE $usernameField='$user';"); |
130 | 130 | if (count($_user) > 0 && password_verify($password, $_user[0][$passwordField])) { |
131 | 131 | self::$user = $user; |