Skip to content

Commit 67f9fb4

Browse files
committed
style: formattazione stile codice
1 parent e239a56 commit 67f9fb4

64 files changed

Lines changed: 147 additions & 150 deletions

File tree

Some content is hidden

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

include/common/importa.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -257,11 +257,11 @@
257257
</div>
258258
</div>';
259259

260-
$block_input = false;
261-
if ($original_module->name == 'Interventi') {
262-
$block_input = true;
260+
$block_input = false;
261+
if ($original_module->name == 'Interventi') {
262+
$block_input = true;
263263

264-
$rs = $dbo->fetchOne('SELECT
264+
$rs = $dbo->fetchOne('SELECT
265265
`in_interventi`.`id`,
266266
CONCAT(\'Attività numero \', `in_interventi`.`codice`, \' del \', DATE_FORMAT(IFNULL((SELECT MIN(`orario_inizio`) FROM `in_interventi_tecnici` WHERE `in_interventi_tecnici`.`idintervento`=`in_interventi`.`id`), `in_interventi`.`data_richiesta`), \'%d/%m/%Y\'), " [", `in_statiintervento_lang`.`title` , "]") AS descrizione,
267267
CONCAT(\'Attività numero \', `in_interventi`.`codice`, \' del \', DATE_FORMAT(IFNULL((SELECT MIN(`orario_inizio`) FROM `in_interventi_tecnici` WHERE `in_interventi_tecnici`.`idintervento`=`in_interventi`.`id`), `in_interventi`.`data_richiesta`), \'%d/%m/%Y\')) AS info,
@@ -274,10 +274,10 @@
274274
WHERE
275275
`in_interventi`.`id` = '.prepare($documento->id));
276276

277-
$descrizione_intervento = str_replace("'", ' ', strip_tags((string) $original_module->replacePlaceholders($documento->id, setting('Descrizione personalizzata in fatturazione')))) ?: $rs['info'];
277+
$descrizione_intervento = str_replace("'", ' ', strip_tags((string) $original_module->replacePlaceholders($documento->id, setting('Descrizione personalizzata in fatturazione')))) ?: $rs['info'];
278278

279-
// Intervento
280-
echo '
279+
// Intervento
280+
echo '
281281
<div class="row">
282282
<div class="col-md-6">
283283
{[ "type": "textarea", "label": "'.tr('Descrizione').'", "name": "descrizione_intervento", "required": "1", "value": "'.$descrizione_intervento.'" ]}
@@ -291,8 +291,8 @@
291291
{[ "type": "checkbox", "label": "'.tr('Importa sessioni').'", "name": "importa_sessioni", "value": "1", "disabled": "'.($block_input ? '1' : '0').'" ]}
292292
</div>
293293
</div>';
294-
}
295-
echo '
294+
}
295+
echo '
296296
</div>
297297
</div>';
298298
}

include/init/update.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@
154154
} else {
155155
echo '
156156
<p>'.tr("E' necessario aggiornare il database a una nuova versione").'.</p>';
157-
157+
158158
// Lista aggiornamenti da applicare
159159
$updates = Update::getTodoUpdates();
160160

include/riferimenti/documenti_collegati.php

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -36,22 +36,22 @@
3636
<div class="card card-primary collapsable">
3737
<div class="card-header with-border">
3838
<h3 class="card-title">';
39-
if ($source->isArticolo()) {
40-
$articolo_riga = Articolo::find($source->idarticolo);
41-
echo $articolo_riga->codice.' - '.$source->descrizione;
42-
} else {
43-
echo nl2br($source->descrizione);
44-
}
45-
echo '
39+
if ($source->isArticolo()) {
40+
$articolo_riga = Articolo::find($source->idarticolo);
41+
echo $articolo_riga->codice.' - '.$source->descrizione;
42+
} else {
43+
echo nl2br($source->descrizione);
44+
}
45+
echo '
4646
</h3>
4747
<div class="card-tools pull-right">
4848
'.tr('Quantità evasa / Totale').': <b>'.numberFormat($source->qta_evasa, 'qta').' / '.numberFormat($source->qta, 'qta').'</b>
4949
</div>
5050
</div>
5151
5252
<div class="card-body">';
53-
if ($documenti_destinazione) {
54-
echo '
53+
if ($documenti_destinazione) {
54+
echo '
5555
<table class="table table-bordered table-striped">
5656
<thead>
5757
<tr>
@@ -62,9 +62,9 @@
6262
6363
<tbody>';
6464

65-
$documenti_destinazione = getDestinationComponents($source);
66-
foreach ($documenti_destinazione['documento'] as $key => $destinazione) {
67-
echo '
65+
$documenti_destinazione = getDestinationComponents($source);
66+
foreach ($documenti_destinazione['documento'] as $key => $destinazione) {
67+
echo '
6868
<tr>
6969
<td>
7070
'.reference($destinazione).'
@@ -73,16 +73,16 @@
7373
'.numberFormat($documenti_destinazione['qta'][$key], 'qta').'
7474
</td>
7575
</tr>';
76-
}
77-
echo '
76+
}
77+
echo '
7878
</tbody>
7979
</table>';
80-
} else {
81-
echo '
80+
} else {
81+
echo '
8282
<div class="alert alert-info">
8383
<i class="fa fa-info-circle"></i> '.tr('Nessun documento collegato').'.
8484
</div>';
85-
}
86-
echo '
85+
}
86+
echo '
8787
</div>
8888
</div>';

lib/common.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ function getDestinationComponents($riga)
215215
}
216216
$ddts = database()->table('dt_righe_ddt')->where('original_id', $riga->id)->where('original_type', $riga::class)->get();
217217
foreach ($ddts as $ddt) {
218-
$documents['documento'][] = Ddt::find($ddt->idddt);
218+
$documents['documento'][] = DDT::find($ddt->idddt);
219219
$documents['qta'][] = $ddt->qta;
220220
}
221221
$interventi = database()->table('in_righe_interventi')->where('original_id', $riga->id)->where('original_type', $riga::class)->get();

modules/adattatori_archiviazione/src/OSMFilesystem.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public function upload($directory, $filename, $contents)
6666
if ($i > 0) {
6767
$filename = $name.'_'.$i.'.'.$extension;
6868
}
69-
$i++;
69+
++$i;
7070
}
7171
} while ($this->fileExists($directory.'/'.$filename));
7272

@@ -80,4 +80,4 @@ protected static function isSupportedType($extension)
8080
{
8181
return !in_array(strtolower((string) $extension), array_keys(self::$not_allowed_types));
8282
}
83-
}
83+
}

modules/articoli/actions.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
}
6464

6565
if (post('genera_barcode')) {
66-
$codice = "200".str_pad($articolo->id, 9, "0", STR_PAD_LEFT);
66+
$codice = '200'.str_pad($articolo->id, 9, '0', STR_PAD_LEFT);
6767
$barcode = (new Picqer\Barcode\Types\TypeEan13())->getBarcode($codice)->getBarcode();
6868
}
6969
$articolo->barcode = $barcode ?: post('barcode');
@@ -463,11 +463,11 @@
463463
break;
464464

465465
case 'generate-barcode':
466-
$codice = "200".str_pad($id_record, 9, "0", STR_PAD_LEFT);
466+
$codice = '200'.str_pad((string) $id_record, 9, '0', STR_PAD_LEFT);
467467
$barcode = (new Picqer\Barcode\Types\TypeEan13())->getBarcode($codice)->getBarcode();
468468

469469
echo json_encode([
470-
'barcode' => $barcode
470+
'barcode' => $barcode,
471471
]);
472472

473473
break;

modules/articoli/bulk.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@
445445

446446
case 'generate-barcode-bulk':
447447
foreach ($id_records as $id) {
448-
$codice = "200".str_pad($id, 9, "0", STR_PAD_LEFT);
448+
$codice = '200'.str_pad((string) $id, 9, '0', STR_PAD_LEFT);
449449
$barcode = (new Picqer\Barcode\Types\TypeEan13())->getBarcode($codice)->getBarcode();
450450

451451
$articolo = Articolo::find($id);

modules/articoli/variables.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
WHERE
2828
`mg_articoli`.`id`='.prepare($id_record));
2929

30-
3130
// Variabili da sostituire
3231
return [
3332
'codice' => $r['codice'],

modules/categorie_impianti/actions.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,10 @@
132132
$check->note = $check_categoria['note'];
133133
$check->save();
134134

135-
//Riporto anche i permessi della check
135+
// Riporto anche i permessi della check
136136
$users = [];
137-
$utenti = $dbo->table('zz_check_user')->where('id_check',$check_categoria['id'])->get();
138-
foreach($utenti as $utente){
137+
$utenti = $dbo->table('zz_check_user')->where('id_check', $check_categoria['id'])->get();
138+
foreach ($utenti as $utente) {
139139
$users[] = $utente->id_utente;
140140
}
141141
$check->setAccess($users, null);

modules/contratti/add.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
5959
<div class="row">
6060
<div class="col-md-6">
61-
{[ "type": "select", "label": "'.tr('Categoria').'", "name": "id_categoria_add", "required": 0, "ajax-source": "categorie_contratti", "icon-after": "add|'.Module::where("name", "Categorie contratti")->first()->id.'" ]}
61+
{[ "type": "select", "label": "'.tr('Categoria').'", "name": "id_categoria_add", "required": 0, "ajax-source": "categorie_contratti", "icon-after": "add|'.Module::where('name', 'Categorie contratti')->first()->id.'" ]}
6262
</div>
6363
6464
<div class="col-md-6">

0 commit comments

Comments
 (0)