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
|
2 |
|
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
|
2 |
|
self::$decodificaop = array( |
29
|
2 |
|
'eq' => '=', |
30
|
2 |
|
'ne' => '<>', |
31
|
2 |
|
'lt' => '<', |
32
|
2 |
|
'le' => '<=', |
33
|
2 |
|
'gt' => '>', |
34
|
2 |
|
'ge' => '>=', |
35
|
2 |
|
'bw' => 'LIKE', |
36
|
2 |
|
'bn' => 'NOT LIKE', |
37
|
2 |
|
'in' => 'IN', |
38
|
2 |
|
'ni' => 'NOT IN', |
39
|
2 |
|
'ew' => 'LIKE', |
40
|
2 |
|
'en' => 'NOT LIKE', |
41
|
2 |
|
'cn' => 'LIKE', |
42
|
2 |
|
'nc' => 'NOT LIKE', |
43
|
2 |
|
'nu' => 'IS', |
44
|
2 |
|
'nn' => 'IS NOT', |
45
|
|
|
'nt' => '<>' |
46
|
2 |
|
); |
47
|
|
|
// questo contiene il carattere da usare prima del campo dati in query dipendentemente dal tipo di operatore |
48
|
2 |
|
self::$precarattere = array( |
49
|
2 |
|
'eq' => '', |
50
|
2 |
|
'ne' => '', |
51
|
2 |
|
'lt' => '', |
52
|
2 |
|
'le' => '', |
53
|
2 |
|
'gt' => '', |
54
|
2 |
|
'ge' => '', |
55
|
2 |
|
'bw' => 'lower(\'', |
56
|
2 |
|
'bn' => 'lower(\'', |
57
|
2 |
|
'in' => '(', |
58
|
2 |
|
'ni' => '(', |
59
|
2 |
|
'ew' => 'lower(\'%', |
60
|
2 |
|
'en' => 'lower(\'%', |
61
|
2 |
|
'cn' => 'lower(\'%', |
62
|
2 |
|
'nc' => 'lower(\'%', |
63
|
2 |
|
'nu' => '', |
64
|
2 |
|
'nn' => '', |
65
|
|
|
'nt' => 'TRUE' |
66
|
2 |
|
); |
67
|
|
|
|
68
|
|
|
// questo contiene il carattere da usare dopo il campo dati in query dipendentemente dal tipo di operatore |
69
|
2 |
|
self::$postcarattere = array( |
70
|
2 |
|
'eq' => '', |
71
|
2 |
|
'ne' => '', |
72
|
2 |
|
'lt' => '', |
73
|
2 |
|
'le' => '', |
74
|
2 |
|
'gt' => '', |
75
|
2 |
|
'ge' => '', |
76
|
2 |
|
'bw' => '%\')', |
77
|
2 |
|
'bn' => '%\')', |
78
|
2 |
|
'in' => ')', |
79
|
2 |
|
'ni' => ')', |
80
|
2 |
|
'ew' => '\')', |
81
|
2 |
|
'en' => '\')', |
82
|
2 |
|
'cn' => '%\')', |
83
|
2 |
|
'nc' => '%\')', |
84
|
2 |
|
'nu' => '', |
85
|
2 |
|
'nn' => '', |
86
|
2 |
|
'nt' => ''); |
87
|
|
|
|
88
|
|
|
// questo contiene il carattere da usare prima del campo dati in query dipendentemente dal tipo di operatore |
89
|
2 |
|
self::$precaratterecampo = array( |
90
|
2 |
|
'eq' => '', |
91
|
2 |
|
'ne' => '', |
92
|
2 |
|
'lt' => '', |
93
|
2 |
|
'le' => '', |
94
|
2 |
|
'gt' => '', |
95
|
2 |
|
'ge' => '', |
96
|
2 |
|
'bw' => 'lower(', |
97
|
2 |
|
'bn' => 'lower(', |
98
|
2 |
|
'in' => '(', |
99
|
2 |
|
'ni' => '(', |
100
|
2 |
|
'ew' => 'lower(', |
101
|
2 |
|
'en' => 'lower(', |
102
|
2 |
|
'cn' => 'lower(', |
103
|
2 |
|
'nc' => 'lower(', |
104
|
2 |
|
'nu' => '', |
105
|
2 |
|
'nn' => '', |
106
|
2 |
|
'nt' => 'TRUE', |
107
|
2 |
|
); |
108
|
|
|
|
109
|
|
|
// questo contiene il carattere da usare dopo il campo dati in query dipendentemente dal tipo di operatore |
110
|
2 |
|
self::$postcaratterecampo = array( |
111
|
2 |
|
'eq' => '', |
112
|
2 |
|
'ne' => '', |
113
|
2 |
|
'lt' => '', |
114
|
2 |
|
'le' => '', |
115
|
2 |
|
'gt' => '', |
116
|
2 |
|
'ge' => '', |
117
|
2 |
|
'bw' => ')', |
118
|
2 |
|
'bn' => ')', |
119
|
2 |
|
'in' => ')', |
120
|
2 |
|
'ni' => ')', |
121
|
2 |
|
'ew' => ')', |
122
|
2 |
|
'en' => ')', |
123
|
2 |
|
'cn' => ')', |
124
|
2 |
|
'nc' => ')', |
125
|
2 |
|
'nu' => '', |
126
|
2 |
|
'nn' => '', |
127
|
2 |
|
'nt' => '',); |
128
|
2 |
|
} |
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
|
2 |
|
public static function setVettoriPerStringa() |
157
|
|
|
{ |
158
|
2 |
|
self::$precaratterecampo['eq'] = "lower("; |
|
|
|
|
159
|
2 |
|
self::$postcaratterecampo['eq'] = ")"; |
|
|
|
|
160
|
2 |
|
self::$precaratterecampo['ne'] = "lower("; |
|
|
|
|
161
|
2 |
|
self::$postcaratterecampo['ne'] = ")"; |
|
|
|
|
162
|
|
|
|
163
|
2 |
|
self::$precarattere['eq'] = ""; |
|
|
|
|
164
|
2 |
|
self::$precarattere['ne'] = ""; |
|
|
|
|
165
|
2 |
|
self::$precarattere['lt'] = ""; |
|
|
|
|
166
|
2 |
|
self::$precarattere['le'] = ""; |
|
|
|
|
167
|
2 |
|
self::$precarattere['gt'] = ""; |
|
|
|
|
168
|
2 |
|
self::$precarattere['ge'] = ""; |
|
|
|
|
169
|
2 |
|
self::$precarattere['cn'] = "%"; |
|
|
|
|
170
|
2 |
|
self::$precarattere['nc'] = "%"; |
|
|
|
|
171
|
2 |
|
self::$precarattere['bw'] = ""; |
|
|
|
|
172
|
2 |
|
self::$precarattere['in'] = "lower("; |
|
|
|
|
173
|
2 |
|
self::$precarattere['ni'] = "lower("; |
|
|
|
|
174
|
2 |
|
self::$postcarattere['eq'] = ""; |
|
|
|
|
175
|
2 |
|
self::$postcarattere['ne'] = ""; |
|
|
|
|
176
|
2 |
|
self::$postcarattere['lt'] = ""; |
|
|
|
|
177
|
2 |
|
self::$postcarattere['le'] = ""; |
|
|
|
|
178
|
2 |
|
self::$postcarattere['gt'] = ""; |
|
|
|
|
179
|
2 |
|
self::$postcarattere['ge'] = ""; |
|
|
|
|
180
|
2 |
|
self::$postcarattere['cn'] = "%"; |
|
|
|
|
181
|
2 |
|
self::$postcarattere['nc'] = "%"; |
|
|
|
|
182
|
2 |
|
self::$postcarattere['bw'] = "%"; |
|
|
|
|
183
|
2 |
|
self::$postcarattere['in'] = ")"; |
|
|
|
|
184
|
2 |
|
self::$postcarattere['ni'] = ")"; |
|
|
|
|
185
|
2 |
|
} |
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
|
14 |
|
public static function getUserCustomTableFields($em, $nometabella, $operatore) |
233
|
|
|
{ |
234
|
14 |
|
$q = $em->getRepository('FiCoreBundle:Tabelle')->findBy(array('operatori_id' => $operatore['id'], 'nometabella' => $nometabella)); |
235
|
|
|
|
236
|
14 |
|
if (!$q) { |
237
|
14 |
|
unset($q); |
238
|
14 |
|
$q = $em->getRepository('FiCoreBundle:Tabelle')->findBy(array('operatori_id' => null, 'nometabella' => $nometabella)); |
239
|
14 |
|
} |
240
|
|
|
|
241
|
14 |
|
return $q; |
242
|
|
|
} |
243
|
|
|
|
244
|
13 |
|
public static function etichettecampi($parametri = array()) |
245
|
|
|
{ |
246
|
13 |
|
if (!isset($parametri['nometabella'])) { |
247
|
|
|
return false; |
248
|
|
|
} |
249
|
|
|
|
250
|
13 |
|
$output = GrigliaParametriUtils::getOuputType($parametri); |
251
|
|
|
|
252
|
13 |
|
$nometabella = $parametri['nometabella']; |
253
|
|
|
|
254
|
13 |
|
$doctrine = GrigliaParametriUtils::getDoctrineByEm($parametri); |
|
|
|
|
255
|
13 |
|
$doctrineficore = GrigliaParametriUtils::getDoctrineFiCoreByEm($parametri, $doctrine); |
|
|
|
|
256
|
13 |
|
$container = $parametri['container']; |
|
|
|
|
257
|
13 |
|
$gestionepermessi = $container->get("ficorebundle.gestionepermessi"); |
|
|
|
|
258
|
|
|
|
259
|
13 |
|
$operatorecorrente = $gestionepermessi->utentecorrente(); |
260
|
|
|
|
261
|
13 |
|
$etichette = array(); |
262
|
|
|
|
263
|
13 |
|
$q = self::getUserCustomTableFields($doctrineficore, $nometabella, $operatorecorrente); |
264
|
|
|
|
265
|
13 |
|
if ($q) { |
266
|
4 |
|
foreach ($q as $riga) { |
267
|
4 |
|
if ($output == 'stampa') { |
268
|
|
|
$etichette[$riga->getNomecampo()] = $riga->getEtichettastampa(); |
269
|
|
|
} else { |
270
|
4 |
|
$etichette[$riga->getNomecampo()] = $riga->getEtichettaindex(); |
271
|
|
|
} |
272
|
4 |
|
} |
273
|
4 |
|
} |
274
|
|
|
|
275
|
13 |
|
return $etichette; |
276
|
|
|
} |
277
|
|
|
|
278
|
13 |
|
public static function larghezzecampi($parametri = array()) |
279
|
|
|
{ |
280
|
13 |
|
if (!isset($parametri['nometabella'])) { |
281
|
|
|
return false; |
282
|
|
|
} |
283
|
|
|
|
284
|
13 |
|
$output = GrigliaParametriUtils::getOuputType($parametri); |
285
|
|
|
|
286
|
13 |
|
$nometabella = $parametri['nometabella']; |
287
|
|
|
|
288
|
13 |
|
$doctrine = GrigliaParametriUtils::getDoctrineByEm($parametri); |
|
|
|
|
289
|
13 |
|
$doctrineficore = GrigliaParametriUtils::getDoctrineFiCoreByEm($parametri, $doctrine); |
290
|
|
|
|
291
|
13 |
|
$container = $parametri['container']; |
|
|
|
|
292
|
13 |
|
$gestionepermessi = $container->get("ficorebundle.gestionepermessi"); |
|
|
|
|
293
|
13 |
|
$operatorecorrente = $gestionepermessi->utentecorrente(); |
294
|
|
|
|
295
|
13 |
|
$etichette = array(); |
296
|
|
|
|
297
|
13 |
|
$q = self::getUserCustomTableFields($doctrineficore, $nometabella, $operatorecorrente); |
298
|
|
|
|
299
|
13 |
|
if (!$q) { |
300
|
9 |
|
return $etichette; |
301
|
|
|
} |
302
|
|
|
|
303
|
4 |
|
foreach ($q as $riga) { |
304
|
4 |
|
if ($output == 'stampa') { |
305
|
|
|
$etichette[$riga->getNomecampo()] = $riga->getLarghezzastampa(); |
306
|
|
|
} else { |
307
|
4 |
|
$etichette[$riga->getNomecampo()] = $riga->getLarghezzaindex(); |
308
|
|
|
} |
309
|
4 |
|
} |
310
|
|
|
|
311
|
4 |
|
return $etichette; |
312
|
|
|
} |
313
|
|
|
|
314
|
14 |
|
public static function ordinecolonne($parametri = array()) |
315
|
|
|
{ |
316
|
14 |
|
if (!isset($parametri['nometabella'])) { |
317
|
|
|
return false; |
318
|
|
|
} |
319
|
|
|
|
320
|
14 |
|
$output = GrigliaParametriUtils::getOuputType($parametri); |
321
|
|
|
|
322
|
14 |
|
$nometabella = $parametri['nometabella']; |
323
|
|
|
|
324
|
14 |
|
$doctrine = GrigliaParametriUtils::getDoctrineByEm($parametri); |
|
|
|
|
325
|
14 |
|
$doctrineficore = GrigliaParametriUtils::getDoctrineFiCoreByEm($parametri, $doctrine); |
326
|
14 |
|
$container = $parametri['container']; |
|
|
|
|
327
|
|
|
|
328
|
14 |
|
$gestionepermessi = $container->get("ficorebundle.gestionepermessi"); |
|
|
|
|
329
|
|
|
|
330
|
14 |
|
$operatorecorrente = $gestionepermessi->utentecorrente(); |
331
|
|
|
|
332
|
14 |
|
$ordine = array(); |
333
|
|
|
|
334
|
14 |
|
$q = self::getUserCustomTableFields($doctrineficore, $nometabella, $operatorecorrente); |
335
|
|
|
|
336
|
14 |
|
if ($q) { |
337
|
5 |
|
foreach ($q as $riga) { |
338
|
5 |
|
if ($output == 'stampa') { |
339
|
|
|
if ($riga->getOrdinestampa()) { |
340
|
|
|
$ordine[$riga->getOrdinestampa()] = $riga->getNomecampo(); |
341
|
|
|
} |
342
|
|
|
} else { |
343
|
5 |
|
if ($riga->getOrdineindex()) { |
344
|
|
|
$ordine[$riga->getOrdineindex()] = $riga->getNomecampo(); |
345
|
|
|
} |
346
|
|
|
} |
347
|
5 |
|
} |
348
|
5 |
|
if (count($ordine) > 0) { |
349
|
|
|
ksort($ordine); |
350
|
|
|
} |
351
|
5 |
|
} |
352
|
|
|
|
353
|
14 |
|
$ordinecolonne = GrigliaColonneUtils::getColonneOrdinate($ordine); |
354
|
|
|
|
355
|
14 |
|
return $ordinecolonne; |
356
|
|
|
} |
357
|
|
|
|
358
|
|
|
/** |
359
|
|
|
* Translates a string with underscores into camel case (e.g. first_name -> firstName). |
360
|
|
|
* |
361
|
|
|
* @param array $parametri |
362
|
|
|
* |
363
|
|
|
* @return string $str translated into camel caps |
364
|
|
|
*/ |
365
|
15 |
|
public static function toCamelCase($parametri = array()) |
366
|
|
|
{ |
367
|
15 |
|
$str = $parametri['str']; |
|
|
|
|
368
|
15 |
|
$capitalise_first_char = isset($parametri['primamaiuscola']) ? $parametri['primamaiuscola'] : false; |
369
|
|
|
|
370
|
15 |
|
if ($capitalise_first_char) { |
371
|
15 |
|
$str[0] = strtoupper($str[0]); |
372
|
15 |
|
} |
373
|
15 |
|
$func = function ($matches) { |
374
|
6 |
|
return strtoupper($matches[1]); |
375
|
15 |
|
}; |
376
|
|
|
|
377
|
15 |
|
return preg_replace_callback('/_([a-z])/', $func, $str); |
378
|
|
|
} |
379
|
|
|
|
380
|
13 |
|
public static function getOpzioniTabella($doctrineficore, $nometabella, &$testata) |
381
|
|
|
{ |
382
|
|
|
/* @var $qb \Doctrine\ORM\QueryBuilder */ |
383
|
13 |
|
$qb = $doctrineficore->createQueryBuilder(); |
384
|
13 |
|
$qb->select(array('a')); |
385
|
13 |
|
$qb->from('FiCoreBundle:OpzioniTabella', 'a'); |
386
|
13 |
|
$qb->leftJoin('a.tabelle', 't'); |
387
|
13 |
|
$qb->where("t.nometabella = '*' or t.nometabella = :tabella"); |
388
|
13 |
|
$qb->andWhere("t.nomecampo is null or t.nomecampo = ''"); |
389
|
13 |
|
$qb->orderBy('t.nometabella'); |
390
|
13 |
|
$qb->setParameter('tabella', $nometabella); |
391
|
13 |
|
$opzioni = $qb->getQuery()->getResult(); |
392
|
13 |
|
foreach ($opzioni as $opzione) { |
393
|
13 |
|
$testata[$opzione->getParametro()] = str_replace('%tabella%', $nometabella, $opzione->getValore()); |
394
|
13 |
|
} |
395
|
13 |
|
} |
396
|
|
|
|
397
|
13 |
|
public static function getNomiColonne($nomicolonne) |
398
|
|
|
{ |
399
|
13 |
|
ksort($nomicolonne); |
400
|
13 |
|
$nomicolonnesorted = array(); |
401
|
13 |
|
foreach ($nomicolonne as $value) { |
402
|
13 |
|
$nomicolonnesorted[] = $value; |
403
|
13 |
|
} |
404
|
|
|
|
405
|
13 |
|
return $nomicolonnesorted; |
406
|
|
|
} |
407
|
|
|
|
408
|
13 |
|
public static function getModelloColonne($modellocolonne) |
409
|
|
|
{ |
410
|
13 |
|
ksort($modellocolonne); |
411
|
13 |
|
$modellocolonnesorted = array(); |
412
|
13 |
|
foreach ($modellocolonne as $value) { |
413
|
13 |
|
$modellocolonnesorted[] = $value; |
414
|
13 |
|
} |
415
|
|
|
|
416
|
13 |
|
return $modellocolonnesorted; |
417
|
|
|
} |
418
|
|
|
|
419
|
13 |
|
public static function getPermessiTabella($paricevuti, &$testata) |
420
|
|
|
{ |
421
|
13 |
|
if (!isset($paricevuti['container'])) { |
422
|
|
|
return; |
423
|
|
|
} |
424
|
|
|
|
425
|
13 |
|
$container = $paricevuti['container']; |
|
|
|
|
426
|
13 |
|
$nometabella = $paricevuti['nometabella']; |
|
|
|
|
427
|
13 |
|
$gestionepermessi = $container->get("ficorebundle.gestionepermessi"); |
|
|
|
|
428
|
|
|
|
429
|
13 |
|
$vettorepermessi = $gestionepermessi->impostaPermessi(array('modulo' => $nometabella)); |
430
|
|
|
|
431
|
13 |
|
return array_merge($testata, $vettorepermessi); |
432
|
|
|
} |
433
|
|
|
} |
434
|
|
|
|
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.