@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | if (!function_exists('emailVerified')) { |
| 54 | 54 | function emailVerified() |
| 55 | 55 | { |
| 56 | - if(Auth::check()){ |
|
| 56 | + if (Auth::check()) { |
|
| 57 | 57 | return !is_null(Auth::user()->email_verified_at); |
| 58 | 58 | } |
| 59 | 59 | |
@@ -61,20 +61,20 @@ discard block |
||
| 61 | 61 | } |
| 62 | 62 | } |
| 63 | 63 | |
| 64 | -if (! function_exists('babel_path')) { |
|
| 64 | +if (!function_exists('babel_path')) { |
|
| 65 | 65 | /** |
| 66 | 66 | * Get the path to the application folder. |
| 67 | 67 | * |
| 68 | 68 | * @param string $path |
| 69 | 69 | * @return string |
| 70 | 70 | */ |
| 71 | - function babel_path($path = '') |
|
| 71 | + function babel_path($path='') |
|
| 72 | 72 | { |
| 73 | 73 | return app('path').DIRECTORY_SEPARATOR.'Babel'.($path ? DIRECTORY_SEPARATOR.$path : $path); |
| 74 | 74 | } |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | -if (! function_exists('glob_recursive')) { |
|
| 77 | +if (!function_exists('glob_recursive')) { |
|
| 78 | 78 | /** |
| 79 | 79 | * Find pathnames matching a pattern recursively. |
| 80 | 80 | * |
@@ -82,11 +82,11 @@ discard block |
||
| 82 | 82 | * @param int $flags Valid flags: GLOB_MARK |
| 83 | 83 | * @return array|false an array containing the matched files/directories, an empty array if no file matched or false on error. |
| 84 | 84 | */ |
| 85 | - function glob_recursive($pattern, $flags = 0) |
|
| 85 | + function glob_recursive($pattern, $flags=0) |
|
| 86 | 86 | { |
| 87 | - $files = glob($pattern, $flags); |
|
| 88 | - foreach (glob(dirname($pattern).'/*', GLOB_ONLYDIR|GLOB_NOSORT) as $dir) { |
|
| 89 | - $files = array_merge($files, glob_recursive($dir.'/'.basename($pattern), $flags)); |
|
| 87 | + $files=glob($pattern, $flags); |
|
| 88 | + foreach (glob(dirname($pattern).'/*', GLOB_ONLYDIR | GLOB_NOSORT) as $dir) { |
|
| 89 | + $files=array_merge($files, glob_recursive($dir.'/'.basename($pattern), $flags)); |
|
| 90 | 90 | } |
| 91 | 91 | return $files; |
| 92 | 92 | } |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | if (!function_exists('adminMenu')) { |
| 96 | 96 | function adminMenu() |
| 97 | 97 | { |
| 98 | - return json_decode(file_get_contents(app_path('Admin/menu.json')),true); |
|
| 98 | + return json_decode(file_get_contents(app_path('Admin/menu.json')), true); |
|
| 99 | 99 | } |
| 100 | 100 | } |
| 101 | 101 | |
@@ -120,8 +120,8 @@ discard block |
||
| 120 | 120 | function delFile($dirName) |
| 121 | 121 | { |
| 122 | 122 | if (file_exists($dirName) && $handle=opendir($dirName)) { |
| 123 | - while (false!==($item = readdir($handle))) { |
|
| 124 | - if ($item!= "." && $item != "..") { |
|
| 123 | + while (false!==($item=readdir($handle))) { |
|
| 124 | + if ($item!="." && $item!="..") { |
|
| 125 | 125 | if (file_exists($dirName.'/'.$item) && is_dir($dirName.'/'.$item)) { |
| 126 | 126 | delFile($dirName.'/'.$item); |
| 127 | 127 | } else { |
@@ -84,9 +84,9 @@ |
||
| 84 | 84 | $installed_timestamp=intval($info["compiler_timestamp"]); |
| 85 | 85 | } |
| 86 | 86 | $latest_timestamp=$installed_timestamp; |
| 87 | - $ConpilerConfig = glob(babel_path("Extension/$ocode/compiler/*.*")); |
|
| 87 | + $ConpilerConfig=glob(babel_path("Extension/$ocode/compiler/*.*")); |
|
| 88 | 88 | foreach ($ConpilerConfig as $file) { |
| 89 | - if (intval(basename($file)) > $installed_timestamp) { |
|
| 89 | + if (intval(basename($file))>$installed_timestamp) { |
|
| 90 | 90 | try { |
| 91 | 91 | $this->commitCompiler($file, json_decode(file_get_contents($file), true)); |
| 92 | 92 | $latest_timestamp=intval(basename($file)); |
@@ -39,8 +39,8 @@ discard block |
||
| 39 | 39 | //writing database |
| 40 | 40 | $this->transactionDB(); |
| 41 | 41 | |
| 42 | - }catch(Throwable $e){ |
|
| 43 | - if ($e->getMessage()!==""){ |
|
| 42 | + } catch (Throwable $e) { |
|
| 43 | + if ($e->getMessage()!=="") { |
|
| 44 | 44 | $this->command->line("\n <bg=red;fg=white> {$e->getMessage()} </>\n"); |
| 45 | 45 | } |
| 46 | 46 | } |
@@ -59,12 +59,12 @@ discard block |
||
| 59 | 59 | public function __construct($class) |
| 60 | 60 | { |
| 61 | 61 | $this->command=$class; |
| 62 | - $this->versionParser = new VersionConstraintParser(); |
|
| 62 | + $this->versionParser=new VersionConstraintParser(); |
|
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | private function parseVersion() |
| 66 | 66 | { |
| 67 | - if(empty($this->babelConfig)){ |
|
| 67 | + if (empty($this->babelConfig)) { |
|
| 68 | 68 | throw new Exception('Missing babel.json Config file.'); |
| 69 | 69 | } |
| 70 | 70 | |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | |
| 135 | 135 | DB::commit(); |
| 136 | 136 | |
| 137 | - }catch(Throwable $e){ |
|
| 137 | + } catch (Throwable $e) { |
|
| 138 | 138 | DB::rollback(); |
| 139 | 139 | if ($e->getMessage()!=="") { |
| 140 | 140 | $this->command->line("\n <bg=red;fg=white> {$e->getMessage()} </>\n"); |