Skip to content

Commit 00ac7e3

Browse files
committed
style: formattazione stile codice
1 parent d0559c2 commit 00ac7e3

71 files changed

Lines changed: 458 additions & 579 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

ajax_complete.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,3 @@
3030
}
3131

3232
// Casi particolari
33-
else {
34-
}

ajax_search.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,3 @@
3636
}
3737

3838
// Casi particolari
39-
else {
40-
}

ajax_select.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,3 @@
4343
}
4444

4545
// Casi particolari
46-
else {
47-
}

include/init/configuration.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@
141141

142142
// Controlla che la scrittura del file di configurazione sia andata a buon fine
143143
$creation = file_put_contents('config.inc.php', $new_config);
144-
144+
145145
// Configurazione per Larvel (.env)
146146
$laravel_config = file_get_contents(base_dir().'/.env.example');
147147
$laravel_values = [
@@ -154,8 +154,8 @@
154154
// Crea la chiave di crittografia dell'applicazione per Laravel
155155
// Laravel non è inizializzato in questo contesto
156156
// use Illuminate\Support\Facades\Artisan;
157-
//Artisan::call('key:generate');
158-
shell_exec("php artisan key:generate");
157+
// Artisan::call('key:generate');
158+
shell_exec('php artisan key:generate');
159159

160160
if (!$creation) {
161161
echo '

index.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,10 @@
9898
AuthOSM::clearIntended();
9999
redirect_url($intended_url);
100100
exit;
101-
} else {
102-
// L'utente non ha i permessi per accedere alla pagina richiesta
103-
AuthOSM::clearIntended();
104-
flash()->warning(tr('Non hai i permessi necessari per accedere alla pagina richiesta.'));
105101
}
102+
// L'utente non ha i permessi per accedere alla pagina richiesta
103+
AuthOSM::clearIntended();
104+
flash()->warning(tr('Non hai i permessi necessari per accedere alla pagina richiesta.'));
106105
}
107106

108107
// Priorità 3: Primo modulo (sistema esistente come fallback)
@@ -191,7 +190,7 @@ function brute() {
191190
if (!empty($error_message)) {
192191
// Rimuovi il messaggio dalla sessione dopo averlo recuperato
193192
unset($_SESSION['login_error']);
194-
193+
195194
echo '
196195
<script>
197196
$(document).ready(function(){

lib/common.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,9 +420,9 @@ function hasArticoliFiglio($id_articolo)
420420
{
421421
if (function_exists('renderDistinta')) {
422422
return database()->fetchOne('SELECT qta FROM mg_articoli_distinte WHERE id_articolo='.prepare($id_articolo));
423-
} else {
424-
return false;
425423
}
424+
425+
return false;
426426
}
427427

428428
/**

lib/deprecated.php

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -218,16 +218,15 @@ function controlla_seriali($field, $id_riga, $old_qta, $new_qta, $dir)
218218
// Controllo sulla possibilità di rimuovere i seriali (se non utilizzati da documenti di vendita)
219219
if ($dir == 'uscita' && $new_qta < count(seriali_non_rimuovibili($field, $id_riga, $dir))) {
220220
return false;
221-
} else {
222-
// Controllo sul numero di seriali effettivi da rimuovere
223-
$count = $dbo->fetchArray('SELECT COUNT(*) AS tot FROM mg_prodotti WHERE '.$field.'='.prepare($id_riga))[0]['tot'];
224-
if ($new_qta < $count) {
225-
$deletes = $dbo->fetchArray("SELECT id FROM mg_prodotti WHERE serial NOT IN (SELECT serial FROM mg_prodotti WHERE dir = 'entrata' AND ".$field.'!='.prepare($id_riga).') AND '.$field.'='.prepare($id_riga).' ORDER BY serial DESC LIMIT '.abs($count - $new_qta));
226-
227-
// Rimozione
228-
foreach ($deletes as $delete) {
229-
$dbo->query('DELETE FROM mg_prodotti WHERE id = '.prepare($delete['id']));
230-
}
221+
}
222+
// Controllo sul numero di seriali effettivi da rimuovere
223+
$count = $dbo->fetchArray('SELECT COUNT(*) AS tot FROM mg_prodotti WHERE '.$field.'='.prepare($id_riga))[0]['tot'];
224+
if ($new_qta < $count) {
225+
$deletes = $dbo->fetchArray("SELECT id FROM mg_prodotti WHERE serial NOT IN (SELECT serial FROM mg_prodotti WHERE dir = 'entrata' AND ".$field.'!='.prepare($id_riga).') AND '.$field.'='.prepare($id_riga).' ORDER BY serial DESC LIMIT '.abs($count - $new_qta));
226+
227+
// Rimozione
228+
foreach ($deletes as $delete) {
229+
$dbo->query('DELETE FROM mg_prodotti WHERE id = '.prepare($delete['id']));
231230
}
232231
}
233232
}

lib/helpers.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -295,12 +295,12 @@ function moneyFormat($number, $decimals = null)
295295
'_CURRENCY_' => currency(),
296296
'_TOTAL_' => numberFormat($number, $decimals),
297297
]);
298-
} else {
299-
return tr('_TOTAL_ _CURRENCY_', [
300-
'_TOTAL_' => numberFormat($number, $decimals),
301-
'_CURRENCY_' => currency(),
302-
]);
303298
}
299+
300+
return tr('_TOTAL_ _CURRENCY_', [
301+
'_TOTAL_' => numberFormat($number, $decimals),
302+
'_CURRENCY_' => currency(),
303+
]);
304304
}
305305

306306
/**

lib/util.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -454,17 +454,17 @@ function color_inverse($start_colour)
454454
}
455455
if ($lum >= 2.5) {
456456
return '#fff';
457-
} else {
458-
return '#000';
459457
}
460-
} else {
461-
return match ($start_colour) {
462-
'black' => 'white',
463-
'blue' => 'white',
464-
'purple' => 'white',
465-
default => '#000',
466-
};
458+
459+
return '#000';
467460
}
461+
462+
return match ($start_colour) {
463+
'black' => 'white',
464+
'blue' => 'white',
465+
'purple' => 'white',
466+
default => '#000',
467+
};
468468
}
469469
}
470470

modules/aggiornamenti/checksum.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
foreach ($module_checksum_files as $module_checksum_file) {
6666
$module_contents = file_get_contents($module_checksum_file);
6767
$module_checksum = json_decode($module_contents, true);
68-
68+
6969
if (!empty($module_checksum)) {
7070
// Accoda i checksum del modulo a quello principale
7171
$checksum = array_merge($checksum, $module_checksum);

0 commit comments

Comments
 (0)