Skip to content

Commit

Permalink
indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Lobz committed Aug 2, 2024
1 parent dc11484 commit 9973a76
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions app/Http/Controllers/ExercicioController.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,19 @@ class ExercicioController extends Controller
*/
public function index()
{
$topicos = Topico::orderBy('order');
$semTopico = Exercicio::whereDoesntHave('topico');
/** @var \App\Models\User */
$user = Auth::user();
if (optional($user)->isAdmin()) {
$topicos = $topicos->with('exercicios');
} else {
$topicos = $topicos->with('exerciciosPublished');
$semTopico = $semTopico->published();
}

return View('exercicio.index')->with('topicos', $topicos->get())
->with('semTopico', $semTopico->get());
$topicos = Topico::orderBy('order');
$semTopico = Exercicio::whereDoesntHave('topico');
/** @var \App\Models\User */
$user = Auth::user();
if (optional($user)->isAdmin()) {
$topicos = $topicos->with('exercicios');
} else {
$topicos = $topicos->with('exerciciosPublished');
$semTopico = $semTopico->published();
}

return View('exercicio.index')->with('topicos', $topicos->get())
->with('semTopico', $semTopico->get());
}

/**
Expand Down Expand Up @@ -196,7 +196,7 @@ private function corretoR(Exercicio $exercicio, string $file)
. 'dbname <- "' . env('DB_DATABASE') . '";'
. 'con <- connect(dbusr, dbpass, dbname);'
. 'TRUE;' // This is to prevent connection object being returned (which causes an echo warning visible in production)
;
;
$r = $cnx->evalString($rcode);
} catch (Exception $e) {
Log::error('Erro ao na conexão RMySql');
Expand Down Expand Up @@ -339,7 +339,7 @@ private function recebeCodigo(string $codigo, Exercicio $exercicio, \Illuminate\
}

// corrigir EOL
$codigo = str_replace("\r\n", PHP_EOL, $codigo).PHP_EOL;
$codigo = str_replace("\r\n", PHP_EOL, $codigo) . PHP_EOL;

// salva um arquivo com o codigo
$tempfile = TmpFile::generateTmpFileName(md5($codigo), '.R');
Expand Down

0 comments on commit 9973a76

Please sign in to comment.