1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Fi\CoreBundle\Utils; |
4
|
|
|
|
5
|
|
|
class GrigliaUtils |
6
|
|
|
{ |
7
|
|
|
|
8
|
|
|
public static $decodificaop; |
9
|
|
|
public static $precarattere; |
10
|
|
|
public static $postcarattere; |
11
|
|
|
public static $precaratterecampo; |
12
|
|
|
public static $postcaratterecampo; |
13
|
|
|
|
14
|
|
|
const LARGHEZZAMASSIMA = 500; |
|
|
|
|
15
|
|
|
const MOLTIPLICATORELARGHEZZA = 10; |
16
|
|
|
|
17
|
5 |
|
public static function init() |
18
|
|
|
{ |
19
|
|
|
// i possibili operatori di ciascuna ricerca sono |
20
|
|
|
//questi: ['eq','ne','lt','le','gt','ge','bw','bn','in','ni','ew','en','cn','nc', 'nu', 'nn'] |
|
|
|
|
21
|
|
|
//significano questo |
22
|
|
|
//['equal','not equal', 'less', 'less or equal','greater','greater or equal', |
|
|
|
|
23
|
|
|
//'begins with','does not begin with','is in','is not in','ends with','does not end with', |
|
|
|
|
24
|
|
|
//'contains','does not contain', 'is null', 'is not null'] |
|
|
|
|
25
|
|
|
//sulla base dell'operatore impostato per la singola ricerca si impostano tre vettori |
26
|
|
|
//il promo contiene l'operatore da usare in query |
27
|
|
|
|
28
|
5 |
|
self::$decodificaop = array( |
29
|
5 |
|
'eq' => '=', |
30
|
5 |
|
'ne' => '<>', |
31
|
5 |
|
'lt' => '<', |
32
|
5 |
|
'le' => '<=', |
33
|
5 |
|
'gt' => '>', |
34
|
5 |
|
'ge' => '>=', |
35
|
5 |
|
'bw' => 'LIKE', |
36
|
5 |
|
'bn' => 'NOT LIKE', |
37
|
5 |
|
'in' => 'IN', |
38
|
5 |
|
'ni' => 'NOT IN', |
39
|
5 |
|
'ew' => 'LIKE', |
40
|
5 |
|
'en' => 'NOT LIKE', |
41
|
5 |
|
'cn' => 'LIKE', |
42
|
5 |
|
'nc' => 'NOT LIKE', |
43
|
5 |
|
'nu' => 'IS', |
44
|
5 |
|
'nn' => 'IS NOT', |
45
|
|
|
'nt' => '<>' |
46
|
5 |
|
); |
47
|
|
|
// questo contiene il carattere da usare prima del campo dati in query dipendentemente dal tipo di operatore |
48
|
5 |
|
self::$precarattere = array( |
49
|
5 |
|
'eq' => '', |
50
|
5 |
|
'ne' => '', |
51
|
5 |
|
'lt' => '', |
52
|
5 |
|
'le' => '', |
53
|
5 |
|
'gt' => '', |
54
|
5 |
|
'ge' => '', |
55
|
5 |
|
'bw' => 'lower(\'', |
56
|
5 |
|
'bn' => 'lower(\'', |
57
|
5 |
|
'in' => '(', |
58
|
5 |
|
'ni' => '(', |
59
|
5 |
|
'ew' => 'lower(\'%', |
60
|
5 |
|
'en' => 'lower(\'%', |
61
|
5 |
|
'cn' => 'lower(\'%', |
62
|
5 |
|
'nc' => 'lower(\'%', |
63
|
5 |
|
'nu' => '', |
64
|
5 |
|
'nn' => '', |
65
|
|
|
'nt' => 'TRUE' |
66
|
5 |
|
); |
67
|
|
|
|
68
|
|
|
// questo contiene il carattere da usare dopo il campo dati in query dipendentemente dal tipo di operatore |
69
|
5 |
|
self::$postcarattere = array( |
70
|
5 |
|
'eq' => '', |
71
|
5 |
|
'ne' => '', |
72
|
5 |
|
'lt' => '', |
73
|
5 |
|
'le' => '', |
74
|
5 |
|
'gt' => '', |
75
|
5 |
|
'ge' => '', |
76
|
5 |
|
'bw' => '%\')', |
77
|
5 |
|
'bn' => '%\')', |
78
|
5 |
|
'in' => ')', |
79
|
5 |
|
'ni' => ')', |
80
|
5 |
|
'ew' => '\')', |
81
|
5 |
|
'en' => '\')', |
82
|
5 |
|
'cn' => '%\')', |
83
|
5 |
|
'nc' => '%\')', |
84
|
5 |
|
'nu' => '', |
85
|
5 |
|
'nn' => '', |
86
|
5 |
|
'nt' => ''); |
87
|
|
|
|
88
|
|
|
// questo contiene il carattere da usare prima del campo dati in query dipendentemente dal tipo di operatore |
89
|
5 |
|
self::$precaratterecampo = array( |
90
|
5 |
|
'eq' => '', |
91
|
5 |
|
'ne' => '', |
92
|
5 |
|
'lt' => '', |
93
|
5 |
|
'le' => '', |
94
|
5 |
|
'gt' => '', |
95
|
5 |
|
'ge' => '', |
96
|
5 |
|
'bw' => 'lower(', |
97
|
5 |
|
'bn' => 'lower(', |
98
|
5 |
|
'in' => '(', |
99
|
5 |
|
'ni' => '(', |
100
|
5 |
|
'ew' => 'lower(', |
101
|
5 |
|
'en' => 'lower(', |
102
|
5 |
|
'cn' => 'lower(', |
103
|
5 |
|
'nc' => 'lower(', |
104
|
5 |
|
'nu' => '', |
105
|
5 |
|
'nn' => '', |
106
|
5 |
|
'nt' => 'TRUE', |
107
|
5 |
|
); |
108
|
|
|
|
109
|
|
|
// questo contiene il carattere da usare dopo il campo dati in query dipendentemente dal tipo di operatore |
110
|
5 |
|
self::$postcaratterecampo = array( |
111
|
5 |
|
'eq' => '', |
112
|
5 |
|
'ne' => '', |
113
|
5 |
|
'lt' => '', |
114
|
5 |
|
'le' => '', |
115
|
5 |
|
'gt' => '', |
116
|
5 |
|
'ge' => '', |
117
|
5 |
|
'bw' => ')', |
118
|
5 |
|
'bn' => ')', |
119
|
5 |
|
'in' => ')', |
120
|
5 |
|
'ni' => ')', |
121
|
5 |
|
'ew' => ')', |
122
|
5 |
|
'en' => ')', |
123
|
5 |
|
'cn' => ')', |
124
|
5 |
|
'nc' => ')', |
125
|
5 |
|
'nu' => '', |
126
|
5 |
|
'nn' => '', |
127
|
5 |
|
'nt' => '',); |
128
|
5 |
|
} |
129
|
|
|
|
130
|
1 |
|
public static function setVettoriPerData() |
131
|
|
|
{ |
132
|
1 |
|
self::$precaratterecampo['eq'] = ""; |
|
|
|
|
133
|
1 |
|
self::$postcaratterecampo['eq'] = ""; |
|
|
|
|
134
|
1 |
|
self::$precaratterecampo['ne'] = ""; |
|
|
|
|
135
|
1 |
|
self::$postcaratterecampo['ne'] = ""; |
|
|
|
|
136
|
|
|
|
137
|
1 |
|
self::$precarattere['eq'] = ""; |
|
|
|
|
138
|
1 |
|
self::$precarattere['ne'] = ""; |
|
|
|
|
139
|
1 |
|
self::$precarattere['lt'] = ""; |
|
|
|
|
140
|
1 |
|
self::$precarattere['le'] = ""; |
|
|
|
|
141
|
1 |
|
self::$precarattere['gt'] = ""; |
|
|
|
|
142
|
1 |
|
self::$precarattere['ge'] = ""; |
|
|
|
|
143
|
1 |
|
self::$postcarattere['eq'] = ""; |
|
|
|
|
144
|
1 |
|
self::$postcarattere['ne'] = ""; |
|
|
|
|
145
|
1 |
|
self::$postcarattere['lt'] = ""; |
|
|
|
|
146
|
1 |
|
self::$postcarattere['le'] = ""; |
|
|
|
|
147
|
1 |
|
self::$postcarattere['gt'] = ""; |
|
|
|
|
148
|
1 |
|
self::$postcarattere['ge'] = ""; |
|
|
|
|
149
|
1 |
|
} |
150
|
|
|
|
151
|
1 |
|
public static function setVettoriPerBoolean() |
152
|
|
|
{ |
153
|
1 |
|
self::setVettoriPerData(); |
154
|
1 |
|
} |
155
|
|
|
|
156
|
4 |
|
public static function setVettoriPerStringa() |
157
|
|
|
{ |
158
|
4 |
|
self::$precaratterecampo['eq'] = "lower("; |
|
|
|
|
159
|
4 |
|
self::$postcaratterecampo['eq'] = ")"; |
|
|
|
|
160
|
4 |
|
self::$precaratterecampo['ne'] = "lower("; |
|
|
|
|
161
|
4 |
|
self::$postcaratterecampo['ne'] = ")"; |
|
|
|
|
162
|
|
|
|
163
|
4 |
|
self::$precarattere['eq'] = ""; |
|
|
|
|
164
|
4 |
|
self::$precarattere['ne'] = ""; |
|
|
|
|
165
|
4 |
|
self::$precarattere['lt'] = ""; |
|
|
|
|
166
|
4 |
|
self::$precarattere['le'] = ""; |
|
|
|
|
167
|
4 |
|
self::$precarattere['gt'] = ""; |
|
|
|
|
168
|
4 |
|
self::$precarattere['ge'] = ""; |
|
|
|
|
169
|
4 |
|
self::$precarattere['cn'] = "%"; |
|
|
|
|
170
|
4 |
|
self::$precarattere['nc'] = "%"; |
|
|
|
|
171
|
4 |
|
self::$precarattere['bw'] = ""; |
|
|
|
|
172
|
4 |
|
self::$precarattere['in'] = "lower("; |
|
|
|
|
173
|
4 |
|
self::$precarattere['ni'] = "lower("; |
|
|
|
|
174
|
4 |
|
self::$postcarattere['eq'] = ""; |
|
|
|
|
175
|
4 |
|
self::$postcarattere['ne'] = ""; |
|
|
|
|
176
|
4 |
|
self::$postcarattere['lt'] = ""; |
|
|
|
|
177
|
4 |
|
self::$postcarattere['le'] = ""; |
|
|
|
|
178
|
4 |
|
self::$postcarattere['gt'] = ""; |
|
|
|
|
179
|
4 |
|
self::$postcarattere['ge'] = ""; |
|
|
|
|
180
|
4 |
|
self::$postcarattere['cn'] = "%"; |
|
|
|
|
181
|
4 |
|
self::$postcarattere['nc'] = "%"; |
|
|
|
|
182
|
4 |
|
self::$postcarattere['bw'] = "%"; |
|
|
|
|
183
|
4 |
|
self::$postcarattere['in'] = ")"; |
|
|
|
|
184
|
4 |
|
self::$postcarattere['ni'] = ")"; |
|
|
|
|
185
|
4 |
|
} |
186
|
|
|
|
187
|
1 |
|
public static function setVettoriPerNumero() |
188
|
|
|
{ |
189
|
1 |
|
self::$precaratterecampo['eq'] = ""; |
|
|
|
|
190
|
1 |
|
self::$postcaratterecampo['eq'] = ""; |
|
|
|
|
191
|
1 |
|
self::$precaratterecampo['ne'] = ""; |
|
|
|
|
192
|
1 |
|
self::$postcaratterecampo['ne'] = ""; |
|
|
|
|
193
|
1 |
|
self::$precaratterecampo['in'] = "("; |
|
|
|
|
194
|
1 |
|
self::$postcaratterecampo['in'] = ")"; |
|
|
|
|
195
|
1 |
|
self::$precaratterecampo['ni'] = "("; |
|
|
|
|
196
|
1 |
|
self::$postcaratterecampo['ni'] = ")"; |
|
|
|
|
197
|
|
|
|
198
|
1 |
|
self::$precarattere['eq'] = ''; |
|
|
|
|
199
|
1 |
|
self::$precarattere['ne'] = ''; |
|
|
|
|
200
|
1 |
|
self::$precarattere['lt'] = ''; |
|
|
|
|
201
|
1 |
|
self::$precarattere['le'] = ''; |
|
|
|
|
202
|
1 |
|
self::$precarattere['gt'] = ''; |
|
|
|
|
203
|
1 |
|
self::$precarattere['ge'] = ''; |
|
|
|
|
204
|
1 |
|
self::$precarattere['in'] = ''; |
|
|
|
|
205
|
1 |
|
self::$precarattere['ni'] = ''; |
|
|
|
|
206
|
1 |
|
self::$postcarattere['eq'] = ''; |
207
|
1 |
|
self::$postcarattere['ne'] = ''; |
208
|
1 |
|
self::$postcarattere['lt'] = ''; |
209
|
1 |
|
self::$postcarattere['le'] = ''; |
210
|
1 |
|
self::$postcarattere['gt'] = ''; |
211
|
1 |
|
self::$postcarattere['ge'] = ''; |
212
|
1 |
|
self::$postcarattere['in'] = ''; |
213
|
1 |
|
self::$postcarattere['ni'] = ''; |
214
|
1 |
|
} |
215
|
|
|
|
216
|
5 |
|
public static function getCampiEsclusi($riga, $output) |
217
|
|
|
{ |
218
|
5 |
|
$campoescluso = null; |
219
|
5 |
|
if ($output == 'stampa') { |
220
|
|
|
if ($riga->hasMostrastampa() == false) { |
221
|
|
|
$campoescluso = $riga->getNomecampo(); |
222
|
|
|
} |
223
|
|
|
} else { |
224
|
5 |
|
if ($riga->hasMostraindex() == false) { |
225
|
|
|
$campoescluso = $riga->getNomecampo(); |
226
|
|
|
} |
227
|
|
|
} |
228
|
|
|
|
229
|
5 |
|
return $campoescluso; |
230
|
|
|
} |
231
|
|
|
|
232
|
17 |
|
public static function getUserCustomTableFields($em, $nometabella, $operatore) |
233
|
|
|
{ |
234
|
17 |
|
return TabelleSingletonUtility::instance($em, $nometabella, $operatore)->getTabelle(); |
235
|
|
|
} |
236
|
|
|
|
237
|
16 |
|
public static function etichettecampi($parametri = array()) |
238
|
|
|
{ |
239
|
16 |
|
if (!isset($parametri['nometabella'])) { |
240
|
|
|
return false; |
241
|
|
|
} |
242
|
|
|
|
243
|
16 |
|
$output = GrigliaParametriUtils::getOuputType($parametri); |
244
|
|
|
|
245
|
16 |
|
$nometabella = $parametri['nometabella']; |
246
|
|
|
|
247
|
16 |
|
$doctrine = GrigliaParametriUtils::getDoctrineByEm($parametri); |
|
|
|
|
248
|
16 |
|
$doctrineficore = GrigliaParametriUtils::getDoctrineFiCoreByEm($parametri, $doctrine); |
|
|
|
|
249
|
16 |
|
$container = $parametri['container']; |
|
|
|
|
250
|
16 |
|
$gestionepermessi = $container->get("ficorebundle.gestionepermessi"); |
|
|
|
|
251
|
|
|
|
252
|
16 |
|
$operatorecorrente = $gestionepermessi->utentecorrente(); |
253
|
|
|
|
254
|
16 |
|
$etichette = array(); |
255
|
|
|
|
256
|
16 |
|
$q = self::getUserCustomTableFields($doctrineficore, $nometabella, $operatorecorrente["id"]); |
|
|
|
|
257
|
|
|
|
258
|
16 |
|
if ($q) { |
259
|
|
|
foreach ($q as $riga) { |
260
|
|
|
if ($output == 'stampa') { |
261
|
|
|
$etichette[$riga->getNomecampo()] = $riga->getEtichettastampa(); |
262
|
|
|
} else { |
263
|
|
|
$etichette[$riga->getNomecampo()] = $riga->getEtichettaindex(); |
264
|
|
|
} |
265
|
|
|
} |
266
|
|
|
} |
267
|
|
|
|
268
|
16 |
|
return $etichette; |
269
|
|
|
} |
270
|
|
|
|
271
|
16 |
|
public static function larghezzecampi($parametri = array()) |
272
|
|
|
{ |
273
|
16 |
|
if (!isset($parametri['nometabella'])) { |
274
|
|
|
return false; |
275
|
|
|
} |
276
|
|
|
|
277
|
16 |
|
$output = GrigliaParametriUtils::getOuputType($parametri); |
278
|
|
|
|
279
|
16 |
|
$nometabella = $parametri['nometabella']; |
280
|
|
|
|
281
|
16 |
|
$doctrine = GrigliaParametriUtils::getDoctrineByEm($parametri); |
|
|
|
|
282
|
16 |
|
$doctrineficore = GrigliaParametriUtils::getDoctrineFiCoreByEm($parametri, $doctrine); |
283
|
|
|
|
284
|
16 |
|
$container = $parametri['container']; |
|
|
|
|
285
|
16 |
|
$gestionepermessi = $container->get("ficorebundle.gestionepermessi"); |
|
|
|
|
286
|
16 |
|
$operatorecorrente = $gestionepermessi->utentecorrente(); |
287
|
|
|
|
288
|
16 |
|
$etichette = array(); |
289
|
|
|
|
290
|
16 |
|
$q = self::getUserCustomTableFields($doctrineficore, $nometabella, $operatorecorrente["id"]); |
|
|
|
|
291
|
|
|
|
292
|
16 |
|
if (!$q) { |
293
|
16 |
|
return $etichette; |
294
|
|
|
} |
295
|
|
|
|
296
|
|
|
foreach ($q as $riga) { |
297
|
|
|
if ($output == 'stampa') { |
298
|
|
|
$etichette[$riga->getNomecampo()] = $riga->getLarghezzastampa(); |
299
|
|
|
} else { |
300
|
|
|
$etichette[$riga->getNomecampo()] = $riga->getLarghezzaindex(); |
301
|
|
|
} |
302
|
|
|
} |
303
|
|
|
|
304
|
|
|
return $etichette; |
305
|
|
|
} |
306
|
|
|
|
307
|
16 |
|
public static function ordinecolonne($parametri = array()) |
308
|
|
|
{ |
309
|
16 |
|
if (!isset($parametri['nometabella'])) { |
310
|
|
|
return false; |
311
|
|
|
} |
312
|
|
|
|
313
|
16 |
|
$output = GrigliaParametriUtils::getOuputType($parametri); |
314
|
|
|
|
315
|
16 |
|
$nometabella = $parametri['nometabella']; |
316
|
|
|
|
317
|
16 |
|
$doctrine = GrigliaParametriUtils::getDoctrineByEm($parametri); |
|
|
|
|
318
|
16 |
|
$doctrineficore = GrigliaParametriUtils::getDoctrineFiCoreByEm($parametri, $doctrine); |
319
|
16 |
|
$container = $parametri['container']; |
|
|
|
|
320
|
|
|
|
321
|
16 |
|
$gestionepermessi = $container->get("ficorebundle.gestionepermessi"); |
|
|
|
|
322
|
|
|
|
323
|
16 |
|
$operatorecorrente = $gestionepermessi->utentecorrente(); |
324
|
|
|
|
325
|
16 |
|
$ordine = array(); |
326
|
|
|
|
327
|
16 |
|
$q = self::getUserCustomTableFields($doctrineficore, $nometabella, $operatorecorrente["id"]); |
|
|
|
|
328
|
|
|
|
329
|
16 |
|
if ($q) { |
330
|
|
|
foreach ($q as $riga) { |
331
|
|
|
if ($output == 'stampa') { |
332
|
|
|
if ($riga->getOrdinestampa()) { |
333
|
|
|
$ordine[$riga->getOrdinestampa()] = $riga->getNomecampo(); |
334
|
|
|
} |
335
|
|
|
} else { |
336
|
|
|
if ($riga->getOrdineindex()) { |
337
|
|
|
$ordine[$riga->getOrdineindex()] = $riga->getNomecampo(); |
338
|
|
|
} |
339
|
|
|
} |
340
|
|
|
} |
341
|
|
|
if (count($ordine) > 0) { |
342
|
|
|
ksort($ordine); |
343
|
|
|
} |
344
|
|
|
} |
345
|
|
|
|
346
|
16 |
|
$ordinecolonne = GrigliaColonneUtils::getColonneOrdinate($ordine); |
347
|
|
|
|
348
|
16 |
|
return $ordinecolonne; |
349
|
|
|
} |
350
|
|
|
|
351
|
|
|
/** |
352
|
|
|
* Translates a string with underscores into camel case (e.g. first_name -> firstName). |
353
|
|
|
* |
354
|
|
|
* @param array $parametri |
355
|
|
|
* |
356
|
|
|
* @return string $str translated into camel caps |
357
|
|
|
*/ |
358
|
18 |
|
public static function toCamelCase($parametri = array()) |
359
|
|
|
{ |
360
|
18 |
|
$str = $parametri['str']; |
|
|
|
|
361
|
18 |
|
$capitalise_first_char = isset($parametri['primamaiuscola']) ? $parametri['primamaiuscola'] : false; |
362
|
|
|
|
363
|
18 |
|
if ($capitalise_first_char) { |
364
|
18 |
|
$str[0] = strtoupper($str[0]); |
365
|
18 |
|
} |
366
|
18 |
|
$func = function ($matches) { |
367
|
6 |
|
return strtoupper($matches[1]); |
368
|
18 |
|
}; |
369
|
|
|
|
370
|
18 |
|
return preg_replace_callback('/_([a-z])/', $func, $str); |
371
|
|
|
} |
372
|
|
|
|
373
|
16 |
|
public static function getOpzioniTabella($doctrineficore, $nometabella, &$testata) |
374
|
|
|
{ |
375
|
|
|
/* @var $qb \Doctrine\ORM\QueryBuilder */ |
376
|
16 |
|
$qb = $doctrineficore->createQueryBuilder(); |
377
|
16 |
|
$qb->select(array('a')); |
378
|
16 |
|
$qb->from('FiCoreBundle:OpzioniTabella', 'a'); |
379
|
16 |
|
$qb->leftJoin('a.tabelle', 't'); |
380
|
16 |
|
$qb->where("t.nometabella = '*' or t.nometabella = :tabella"); |
381
|
16 |
|
$qb->andWhere("t.nomecampo is null or t.nomecampo = ''"); |
382
|
16 |
|
$qb->orderBy('t.nometabella'); |
383
|
16 |
|
$qb->setParameter('tabella', $nometabella); |
384
|
16 |
|
$opzioni = $qb->getQuery()->getResult(); |
385
|
16 |
|
foreach ($opzioni as $opzione) { |
386
|
16 |
|
$testata[$opzione->getParametro()] = str_replace('%tabella%', $nometabella, $opzione->getValore()); |
387
|
16 |
|
} |
388
|
16 |
|
} |
389
|
|
|
|
390
|
16 |
|
public static function getNomiColonne($nomicolonne) |
391
|
|
|
{ |
392
|
16 |
|
ksort($nomicolonne); |
393
|
16 |
|
$nomicolonnesorted = array(); |
394
|
16 |
|
foreach ($nomicolonne as $value) { |
395
|
16 |
|
$nomicolonnesorted[] = $value; |
396
|
16 |
|
} |
397
|
|
|
|
398
|
16 |
|
return $nomicolonnesorted; |
399
|
|
|
} |
400
|
|
|
|
401
|
16 |
|
public static function getModelloColonne($modellocolonne) |
402
|
|
|
{ |
403
|
16 |
|
ksort($modellocolonne); |
404
|
16 |
|
$modellocolonnesorted = array(); |
405
|
16 |
|
foreach ($modellocolonne as $value) { |
406
|
16 |
|
$modellocolonnesorted[] = $value; |
407
|
16 |
|
} |
408
|
|
|
|
409
|
16 |
|
return $modellocolonnesorted; |
410
|
|
|
} |
411
|
|
|
|
412
|
16 |
|
public static function getPermessiTabella($paricevuti, &$testata) |
413
|
|
|
{ |
414
|
16 |
|
if (!isset($paricevuti['container'])) { |
415
|
|
|
return; |
416
|
|
|
} |
417
|
|
|
|
418
|
16 |
|
$container = $paricevuti['container']; |
|
|
|
|
419
|
16 |
|
$nometabella = $paricevuti['nometabella']; |
|
|
|
|
420
|
16 |
|
$gestionepermessi = $container->get("ficorebundle.gestionepermessi"); |
|
|
|
|
421
|
|
|
|
422
|
16 |
|
$vettorepermessi = $gestionepermessi->impostaPermessi(array('modulo' => $nometabella)); |
423
|
|
|
|
424
|
16 |
|
return array_merge($testata, $vettorepermessi); |
425
|
|
|
} |
426
|
|
|
} |
427
|
|
|
|
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.
To visualize
will produce issues in the first and second line, while this second example
will produce no issues.