@@ -34,8 +34,8 @@ |
||
| 34 | 34 | |
| 35 | 35 | public function title() |
| 36 | 36 | { |
| 37 | - return ($this->husband ? $this->husband->fullname() : '?'). |
|
| 38 | - ' + '. |
|
| 37 | + return ($this->husband ? $this->husband->fullname() : '?') . |
|
| 38 | + ' + ' . |
|
| 39 | 39 | ($this->wife ? $this->wife->fullname() : '?'); |
| 40 | 40 | } |
| 41 | 41 | |
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | return (new MailMessage) |
| 47 | 47 | ->subject('Unsubscribed Successfully!') |
| 48 | 48 | ->line('You have unsubscribed successfully!') |
| 49 | - ->line('Subscription Plan:'.$this->plan->nickname) |
|
| 49 | + ->line('Subscription Plan:' . $this->plan->nickname) |
|
| 50 | 50 | ->line('Thank you for using Genealogia!'); |
| 51 | 51 | } |
| 52 | 52 | |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | */ |
| 34 | 34 | public function register() |
| 35 | 35 | { |
| 36 | - $this->reportable(function (Throwable $e) { |
|
| 36 | + $this->reportable(function(Throwable $e) { |
|
| 37 | 37 | // |
| 38 | 38 | }); |
| 39 | 39 | } |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | */ |
| 15 | 15 | protected function redirectTo($request) |
| 16 | 16 | { |
| 17 | - if (! $request->expectsJson()) { |
|
| 17 | + if (!$request->expectsJson()) { |
|
| 18 | 18 | return route('login'); |
| 19 | 19 | } |
| 20 | 20 | } |
@@ -48,12 +48,12 @@ |
||
| 48 | 48 | $content = $writer->getGedcomPerson(); |
| 49 | 49 | // $user_id = Auth::user()->id; |
| 50 | 50 | $ts = microtime(true); |
| 51 | - $file = env('APP_NAME').date('_Ymd_').$ts.'.GED'; |
|
| 52 | - $destinationPath = public_path().'/upload/'; |
|
| 53 | - if (! is_dir($destinationPath)) { |
|
| 51 | + $file = env('APP_NAME') . date('_Ymd_') . $ts . '.GED'; |
|
| 52 | + $destinationPath = public_path() . '/upload/'; |
|
| 53 | + if (!is_dir($destinationPath)) { |
|
| 54 | 54 | mkdir($destinationPath, 0777, true); |
| 55 | 55 | } |
| 56 | - File::put($destinationPath.$file, $content); |
|
| 56 | + File::put($destinationPath . $file, $content); |
|
| 57 | 57 | |
| 58 | 58 | return 0; |
| 59 | 59 | } |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | { |
| 38 | 38 | $this->configureRateLimiting(); |
| 39 | 39 | |
| 40 | - $this->routes(function () { |
|
| 40 | + $this->routes(function() { |
|
| 41 | 41 | Route::prefix('api') |
| 42 | 42 | ->middleware('api') |
| 43 | 43 | ->namespace($this->namespace) |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | */ |
| 57 | 57 | protected function configureRateLimiting() |
| 58 | 58 | { |
| 59 | - RateLimiter::for('api', function (Request $request) { |
|
| 59 | + RateLimiter::for ('api', function(Request $request) { |
|
| 60 | 60 | return Limit::perMinute(60)->by(optional($request->user())->id ?: $request->ip()); |
| 61 | 61 | }); |
| 62 | 62 | } |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | */ |
| 35 | 35 | protected function commands() |
| 36 | 36 | { |
| 37 | - $this->load(__DIR__.'/Commands'); |
|
| 37 | + $this->load(__DIR__ . '/Commands'); |
|
| 38 | 38 | |
| 39 | 39 | require base_path('routes/console.php'); |
| 40 | 40 | } |
@@ -2,7 +2,7 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | use Illuminate\Support\Str; |
| 4 | 4 | |
| 5 | -if (! function_exists('unique_random')) { |
|
| 5 | +if (!function_exists('unique_random')) { |
|
| 6 | 6 | /** |
| 7 | 7 | * Generate a unique random string of characters |
| 8 | 8 | * uses str_random() helper for generating the random string. |
@@ -47,13 +47,13 @@ discard block |
||
| 47 | 47 | // If unique is still false at this point |
| 48 | 48 | // it will just repeat all the steps until |
| 49 | 49 | // it has generated a random string of characters |
| 50 | - } while (! $unique); |
|
| 50 | + } while (!$unique); |
|
| 51 | 51 | |
| 52 | 52 | return $random; |
| 53 | 53 | } |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | -if (! function_exists('readCSV')) { |
|
| 56 | +if (!function_exists('readCSV')) { |
|
| 57 | 57 | function readCSV($filename = '', $delimiter = ',') |
| 58 | 58 | { |
| 59 | 59 | // Read the file |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | } |
| 71 | 71 | } |
| 72 | 72 | |
| 73 | -if (! function_exists('writeCSV')) { |
|
| 73 | +if (!function_exists('writeCSV')) { |
|
| 74 | 74 | function writeCSV($filename = '', $data = []) |
| 75 | 75 | { |
| 76 | 76 | $file = fopen($filename, 'w'); |
@@ -43,19 +43,19 @@ discard block |
||
| 43 | 43 | foreach ($dnas as $dna) { |
| 44 | 44 | // system('/usr/bin/python3 /home/genealogia/public_html/dna.py ' . $this->var_name . ' ' . $dna->variable_name . ' ' . '/home/genealogia/public_html/storage/app/dna/'. $this->file_name . ' ' . '/home/genealogia/public_html/storage/app/dna/'. $dna->file_name); |
| 45 | 45 | chdir('/var/www/api.familytree365.com/app'); |
| 46 | - exec('python3 dna.py '.$this->var_name.' '.$dna->variable_name.' '.$this->file_name.' '.$dna->file_name); |
|
| 46 | + exec('python3 dna.py ' . $this->var_name . ' ' . $dna->variable_name . ' ' . $this->file_name . ' ' . $dna->file_name); |
|
| 47 | 47 | $dm = new DM(); |
| 48 | 48 | $dm->user_id = $user->id; |
| 49 | - $dm->image = 'shared_dna_'.$this->var_name.'_'.$dna->variable_name.'.png'; |
|
| 50 | - $dm->file1 = 'discordant_snps_'.$this->var_name.'_'.$dna->variable_name.'_GRCh37.csv'; |
|
| 51 | - $dm->file2 = 'shared_dna_one_chrom_'.$this->var_name.'_'.$dna->variable_name.'_GRCh37.csv'; |
|
| 49 | + $dm->image = 'shared_dna_' . $this->var_name . '_' . $dna->variable_name . '.png'; |
|
| 50 | + $dm->file1 = 'discordant_snps_' . $this->var_name . '_' . $dna->variable_name . '_GRCh37.csv'; |
|
| 51 | + $dm->file2 = 'shared_dna_one_chrom_' . $this->var_name . '_' . $dna->variable_name . '_GRCh37.csv'; |
|
| 52 | 52 | $dm->save(); |
| 53 | 53 | |
| 54 | - $data = readCSV(storage_path('app'.DIRECTORY_SEPARATOR.'dna'.DIRECTORY_SEPARATOR.'output'.DIRECTORY_SEPARATOR.$dm->file1), ','); |
|
| 54 | + $data = readCSV(storage_path('app' . DIRECTORY_SEPARATOR . 'dna' . DIRECTORY_SEPARATOR . 'output' . DIRECTORY_SEPARATOR . $dm->file1), ','); |
|
| 55 | 55 | array_shift($data); |
| 56 | - $data = writeCSV(storage_path('app'.DIRECTORY_SEPARATOR.'dna'.DIRECTORY_SEPARATOR.'output'.DIRECTORY_SEPARATOR.$dm->file1), $data); |
|
| 56 | + $data = writeCSV(storage_path('app' . DIRECTORY_SEPARATOR . 'dna' . DIRECTORY_SEPARATOR . 'output' . DIRECTORY_SEPARATOR . $dm->file1), $data); |
|
| 57 | 57 | |
| 58 | - $data = readCSV(storage_path('app'.DIRECTORY_SEPARATOR.'dna'.DIRECTORY_SEPARATOR.'output'.DIRECTORY_SEPARATOR.$dm->file2), ','); |
|
| 58 | + $data = readCSV(storage_path('app' . DIRECTORY_SEPARATOR . 'dna' . DIRECTORY_SEPARATOR . 'output' . DIRECTORY_SEPARATOR . $dm->file2), ','); |
|
| 59 | 59 | array_shift($data); |
| 60 | 60 | |
| 61 | 61 | $temp_data = $data; |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | $dm->largest_cm_segment = round($largest_cm, 2); |
| 75 | 75 | $dm->save(); |
| 76 | 76 | |
| 77 | - $data = writeCSV(storage_path('app'.DIRECTORY_SEPARATOR.'dna'.DIRECTORY_SEPARATOR.'output'.DIRECTORY_SEPARATOR.$dm->file2), $data); |
|
| 77 | + $data = writeCSV(storage_path('app' . DIRECTORY_SEPARATOR . 'dna' . DIRECTORY_SEPARATOR . 'output' . DIRECTORY_SEPARATOR . $dm->file2), $data); |
|
| 78 | 78 | } |
| 79 | 79 | } |
| 80 | 80 | } |