1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Cdf\PannelloAmministrazioneBundle\Controller; |
4
|
|
|
|
5
|
|
|
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; |
6
|
|
|
use Symfony\Component\HttpFoundation\Request; |
7
|
|
|
use Symfony\Component\HttpFoundation\Response; |
8
|
|
|
use Symfony\Component\Finder\Finder; |
9
|
|
|
use Symfony\Component\Filesystem\Filesystem; |
10
|
|
|
use Symfony\Component\Process\Process; |
11
|
|
|
use Fi\OsBundle\DependencyInjection\OsFunctions; |
12
|
|
|
use Cdf\PannelloAmministrazioneBundle\DependencyInjection\PannelloAmministrazioneUtils as Pautils; |
13
|
|
|
use Symfony\Component\Lock\Factory; |
14
|
|
|
use Symfony\Component\Lock\Store\FlockStore; |
15
|
|
|
use Cdf\PannelloAmministrazioneBundle\DependencyInjection\ProjectPath; |
16
|
|
|
use Cdf\PannelloAmministrazioneBundle\DependencyInjection\PannelloamministrazioneCommands as Pacmd; |
17
|
|
|
|
18
|
|
|
class PannelloAmministrazioneController extends AbstractController |
19
|
|
|
{ |
20
|
|
|
|
21
|
|
|
private $apppaths; |
22
|
|
|
private $pacommands; |
23
|
|
|
private $pautils; |
24
|
|
|
protected $locksystem; |
25
|
|
|
protected $factory; |
26
|
|
|
private $appname; |
27
|
|
|
private $lockfile; |
28
|
|
|
|
29
|
1 |
|
public function __construct($appname, $lockfile, ProjectPath $projectpath, Pacmd $pacommands, Pautils $pautils) |
30
|
|
|
{ |
31
|
1 |
|
$store = new FlockStore(sys_get_temp_dir()); |
|
|
|
|
32
|
1 |
|
$factory = new Factory($store); |
|
|
|
|
33
|
1 |
|
$this->locksystem = $factory->createLock('pannelloamministrazione-command'); |
34
|
1 |
|
$this->locksystem->release(); |
35
|
1 |
|
$this->appname = $appname; |
|
|
|
|
36
|
1 |
|
$this->lockfile = $lockfile; |
|
|
|
|
37
|
1 |
|
$this->apppaths = $projectpath; |
|
|
|
|
38
|
1 |
|
$this->pacommands = $pacommands; |
39
|
1 |
|
$this->pautils = $pautils; |
|
|
|
|
40
|
1 |
|
} |
41
|
|
|
|
42
|
1 |
|
private function findEntities() |
43
|
|
|
{ |
44
|
1 |
|
$entitiesprogetto = array(); |
45
|
1 |
|
$prefix = 'App\\Entity\\'; |
|
|
|
|
46
|
1 |
|
$prefixBase = 'Base'; |
|
|
|
|
47
|
1 |
|
$entities = $this->get("doctrine")->getManager()->getConfiguration()->getMetadataDriverImpl()->getAllClassNames(); |
|
|
|
|
48
|
1 |
|
foreach ($entities as $entity) { |
49
|
1 |
|
if (substr($entity, 0, strlen($prefix)) == $prefix) { |
50
|
1 |
|
if (substr(substr($entity, strlen($prefix)), 0, strlen($prefixBase)) != $prefixBase) { |
51
|
1 |
|
$entitiesprogetto[] = substr($entity, strlen($prefix)); |
52
|
|
|
} |
53
|
|
|
} |
54
|
|
|
} |
55
|
1 |
|
return $entitiesprogetto; |
56
|
|
|
} |
57
|
|
|
|
58
|
1 |
|
public function index() |
59
|
|
|
{ |
60
|
1 |
|
$finder = new Finder(); |
61
|
1 |
|
$fs = new Filesystem(); |
|
|
|
|
62
|
|
|
|
63
|
1 |
|
$projectDir = $this->apppaths->getRootPath(); |
64
|
1 |
|
$docDir = $this->apppaths->getDocPath(); |
|
|
|
|
65
|
|
|
|
66
|
1 |
|
$mwbs = array(); |
67
|
|
|
|
68
|
1 |
|
if ($fs->exists($docDir)) { |
69
|
1 |
|
$finder->in($docDir)->files()->name('*.mwb'); |
70
|
1 |
|
foreach ($finder as $file) { |
71
|
1 |
|
$mwbs[] = $file->getBasename(); |
72
|
|
|
} |
73
|
|
|
} |
74
|
1 |
|
sort($mwbs); |
75
|
1 |
|
$svn = $fs->exists($projectDir . '/.svn'); |
76
|
1 |
|
$git = $fs->exists($projectDir . '/.git'); |
77
|
1 |
|
if (!OsFunctions::isWindows()) { |
78
|
1 |
|
$delcmd = 'rm -rf'; |
|
|
|
|
79
|
1 |
|
$setfilelock = "touch " . $this->lockfile; |
|
|
|
|
80
|
1 |
|
$remfilelock = "rm " . $this->lockfile; |
|
|
|
|
81
|
1 |
|
$windows = false; |
|
|
|
|
82
|
|
|
} else { |
83
|
|
|
$delcmd = 'del'; |
|
|
|
|
84
|
|
|
$setfilelock = 'echo $null >> ' . $this->lockfile; |
85
|
|
|
$remfilelock = "del " . $this->lockfile; |
|
|
|
|
86
|
|
|
$windows = true; |
|
|
|
|
87
|
|
|
} |
88
|
|
|
|
89
|
1 |
|
$dellogsfiles = $delcmd . ' ' . $this->apppaths->getLogsPath() . DIRECTORY_SEPARATOR . '*'; |
|
|
|
|
90
|
1 |
|
$delcacheprodfiles = $delcmd . ' ' . $this->apppaths->getCachePath() . DIRECTORY_SEPARATOR . 'prod' . DIRECTORY_SEPARATOR . '*'; |
|
|
|
|
91
|
1 |
|
$delcachedevfiles = $delcmd . ' ' . $this->apppaths->getCachePath() . DIRECTORY_SEPARATOR . 'dev' . DIRECTORY_SEPARATOR . '*'; |
|
|
|
|
92
|
1 |
|
$setmaintenancefile = $setfilelock; |
93
|
1 |
|
$remmaintenancefile = $remfilelock; |
94
|
|
|
|
95
|
1 |
|
$projectparentdir = $projectDir . '/../'; |
96
|
1 |
|
$envvars = $projectparentdir . "/" . "envvars"; |
|
|
|
|
97
|
1 |
|
$composercachedir = $projectparentdir . "/" . ".composer"; |
|
|
|
|
98
|
1 |
|
$composerinstall = ""; |
|
|
|
|
99
|
1 |
|
if ($windows == false) { |
|
|
|
|
100
|
1 |
|
if (file_exists($envvars)) { |
101
|
|
|
$composerinstall = $composerinstall . ". " . $envvars . " && "; |
|
|
|
|
102
|
|
|
} |
103
|
1 |
|
if (file_exists($composercachedir)) { |
104
|
|
|
$composerinstall = $composerinstall . " export COMPOSER_HOME=" . $composercachedir . " && "; |
|
|
|
|
105
|
|
|
} |
106
|
1 |
|
$composerinstall = $composerinstall . " cd " . $projectDir . " && composer install --no-interaction 2>&1"; |
|
|
|
|
107
|
1 |
|
$sed = "sed -i -e 's/cercaquestastringa/sostituisciconquestastringa/g' " . $projectDir . "/.env"; |
|
|
|
|
108
|
|
|
} |
109
|
|
|
|
110
|
|
|
$comandishell = array( |
111
|
1 |
|
$this->fixSlash($dellogsfiles), |
112
|
1 |
|
$this->fixSlash($delcacheprodfiles), |
113
|
1 |
|
$this->fixSlash($delcachedevfiles), |
114
|
1 |
|
$this->fixSlash($setmaintenancefile), |
115
|
1 |
|
$this->fixSlash($remmaintenancefile), |
116
|
1 |
|
$composerinstall, |
117
|
1 |
|
$sed); |
|
|
|
|
118
|
|
|
|
119
|
|
|
$comandisymfony = array( |
120
|
1 |
|
"list", |
|
|
|
|
121
|
1 |
|
"cache:clear --env=prod --no-debug", |
|
|
|
|
122
|
1 |
|
"fos:user:create admin pass [email protected]", |
|
|
|
|
123
|
1 |
|
"fos:user:promote username ROLE_SUPER_ADMIN", |
|
|
|
|
124
|
1 |
|
"assets:install ' . $projectDir . ' /public", |
|
|
|
|
125
|
1 |
|
"pannelloamministrazione:checkgitversion" |
|
|
|
|
126
|
|
|
); |
127
|
|
|
|
128
|
1 |
|
$entities = $this->findEntities(); |
129
|
1 |
|
sort($entities); |
130
|
|
|
|
131
|
|
|
$twigparms = array( |
132
|
1 |
|
'svn' => $svn, 'git' => $git, 'mwbs' => $mwbs, 'entities' => $entities, |
133
|
1 |
|
'rootdir' => $this->fixSlash($projectDir), |
134
|
1 |
|
'comandishell' => $comandishell, |
135
|
1 |
|
'comandisymfony' => $comandisymfony, |
136
|
1 |
|
'iswindows' => $windows, |
137
|
1 |
|
'appname' => $this->appname |
138
|
|
|
); |
139
|
|
|
|
140
|
1 |
|
return $this->render('PannelloAmministrazioneBundle:PannelloAmministrazione:index.html.twig', $twigparms); |
141
|
|
|
} |
142
|
|
|
|
143
|
1 |
|
private function fixSlash($path) |
144
|
|
|
{ |
145
|
1 |
|
return str_replace('\\', '\\\\', $path); |
146
|
|
|
} |
147
|
|
|
|
148
|
|
|
private function getLockMessage() |
149
|
|
|
{ |
150
|
|
|
return "<h2 style='color: orange;'>E' già in esecuzione un comando, riprova tra qualche secondo!</h2>"; |
151
|
|
|
} |
152
|
|
|
|
153
|
1 |
|
public function aggiornaSchemaDatabase() |
154
|
|
|
{ |
155
|
1 |
|
if (!$this->locksystem->acquire()) { |
156
|
|
|
return new Response($this->getLockMessage()); |
157
|
|
|
} else { |
158
|
1 |
|
$this->locksystem->acquire(); |
159
|
1 |
|
$command = $this->pacommands; |
160
|
1 |
|
$result = $command->aggiornaSchemaDatabase(); |
|
|
|
|
161
|
|
|
|
162
|
1 |
|
$this->locksystem->release(); |
163
|
1 |
|
if ($result['errcode'] != 0) { |
164
|
|
|
$twigparms = array('errcode' => $result['errcode'], 'command' => $result['command'], 'message' => $result['message']); |
165
|
|
|
$view = $this->renderView('PannelloAmministrazioneBundle:PannelloAmministrazione:outputcommand.html.twig', $twigparms); |
|
|
|
|
166
|
|
|
return new Response($view, 500); |
167
|
|
|
} else { |
168
|
1 |
|
$twigparms = array('errcode' => $result['errcode'], 'command' => $result['command'], 'message' => $result['message']); |
169
|
1 |
|
return $this->render('PannelloAmministrazioneBundle:PannelloAmministrazione:outputcommand.html.twig', $twigparms); |
170
|
|
|
} |
171
|
|
|
} |
172
|
|
|
} |
173
|
|
|
|
174
|
|
|
/* FORMS */ |
175
|
|
|
|
176
|
1 |
|
public function generateFormCrud(Request $request) |
177
|
|
|
{ |
178
|
1 |
|
if (!$this->locksystem->acquire()) { |
179
|
|
|
return new Response($this->getLockMessage()); |
180
|
|
|
} else { |
181
|
1 |
|
$entityform = $request->get('entityform'); |
|
|
|
|
182
|
1 |
|
$generatemplate = $request->get('generatemplate') === 'true' ? true : false; |
183
|
1 |
|
$this->locksystem->acquire(); |
184
|
|
|
|
185
|
1 |
|
$command = $this->pacommands; |
186
|
1 |
|
$result = $command->generateFormCrud($entityform, $generatemplate); |
|
|
|
|
187
|
|
|
|
188
|
1 |
|
$this->locksystem->release(); |
189
|
|
|
//$retcc = ''; |
|
|
|
|
190
|
1 |
|
if ($result['errcode'] < 0) { |
191
|
1 |
|
$twigparms = array('errcode' => $result['errcode'], 'command' => "Generazione Form Crud", 'message' => $result['message']); |
|
|
|
|
192
|
1 |
|
return new Response( |
193
|
1 |
|
$this->renderView('PannelloAmministrazioneBundle:PannelloAmministrazione:outputcommand.html.twig', $twigparms), |
194
|
1 |
|
500 |
195
|
|
|
); |
196
|
|
|
} else { |
|
|
|
|
197
|
|
|
//$retcc = $command->clearCacheEnv($this->get('kernel')->getEnvironment()); |
|
|
|
|
198
|
|
|
} |
199
|
1 |
|
$twigparms = array('errcode' => $result['errcode'], 'command' => $result['command'], 'message' => $result['message']); |
200
|
|
|
|
201
|
1 |
|
return $this->render('PannelloAmministrazioneBundle:PannelloAmministrazione:outputcommand.html.twig', $twigparms); |
202
|
|
|
} |
203
|
|
|
} |
204
|
|
|
|
205
|
|
|
/* ENTITIES */ |
206
|
|
|
|
207
|
1 |
|
public function generateEntity(Request $request) |
208
|
|
|
{ |
209
|
1 |
|
if (!$this->locksystem->acquire()) { |
210
|
|
|
return new Response($this->getLockMessage()); |
211
|
|
|
} else { |
212
|
1 |
|
$this->locksystem->acquire(); |
213
|
1 |
|
$wbFile = $request->get('file'); |
|
|
|
|
214
|
1 |
|
$command = $this->pacommands; |
|
|
|
|
215
|
1 |
|
$result = $command->generateEntity($wbFile); |
|
|
|
|
216
|
1 |
|
$twigparms = array('errcode' => $result['errcode'], 'command' => $result['command'], 'message' => $result['message']); |
|
|
|
|
217
|
1 |
|
$this->locksystem->release(); |
218
|
1 |
|
if ($result['errcode'] != 0) { |
219
|
1 |
|
$twigparms = array('errcode' => $result['errcode'], 'command' => $result['command'], 'message' => $result['message']); |
220
|
1 |
|
$view = $this->renderView('PannelloAmministrazioneBundle:PannelloAmministrazione:outputcommand.html.twig', $twigparms); |
|
|
|
|
221
|
1 |
|
return new Response($view, 500); |
222
|
|
|
} else { |
223
|
1 |
|
$twigparms = array('errcode' => $result['errcode'], 'command' => $result['command'], 'message' => $result['message']); |
224
|
1 |
|
return $this->render('PannelloAmministrazioneBundle:PannelloAmministrazione:outputcommand.html.twig', $twigparms); |
225
|
|
|
} |
226
|
|
|
} |
227
|
|
|
} |
228
|
|
|
|
229
|
|
|
/* VCS (GIT,SVN) */ |
|
|
|
|
230
|
|
|
|
231
|
|
|
/** |
232
|
|
|
* @codeCoverageIgnore |
233
|
|
|
*/ |
234
|
|
|
public function getVcs() |
235
|
|
|
{ |
236
|
|
|
set_time_limit(0); |
237
|
|
|
$this->apppaths = $this->apppaths; |
238
|
|
|
if (!$this->locksystem->acquire()) { |
239
|
|
|
return new Response($this->getLockMessage()); |
240
|
|
|
} else { |
241
|
|
|
$this->locksystem->acquire(); |
242
|
|
|
$command = $this->pacommands; |
243
|
|
|
$result = $command->getVcs(); |
|
|
|
|
244
|
|
|
$this->locksystem->release(); |
245
|
|
|
$twigparms = array('errcode' => $result['errcode'], 'command' => $result['command'], 'message' => $result['message']); |
246
|
|
|
|
247
|
|
|
return $this->render('PannelloAmministrazioneBundle:PannelloAmministrazione:outputcommand.html.twig', $twigparms); |
248
|
|
|
} |
249
|
|
|
} |
250
|
|
|
|
251
|
|
|
/* CLEAR CACHE */ |
252
|
|
|
|
253
|
|
|
/** |
254
|
|
|
* Suppress PMD warnings per exit. |
255
|
|
|
* |
256
|
|
|
* @//SuppressWarnings(PHPMD) |
257
|
|
|
*/ |
258
|
1 |
|
public function clearCache(Request $request) |
|
|
|
|
259
|
|
|
{ |
260
|
1 |
|
set_time_limit(0); |
261
|
1 |
|
if (!$this->locksystem->acquire()) { |
262
|
|
|
return new Response($this->getLockMessage()); |
263
|
|
|
} else { |
264
|
1 |
|
$this->locksystem->acquire(); |
265
|
1 |
|
$command = $this->pacommands; |
266
|
1 |
|
$result = $command->clearcache(); |
|
|
|
|
267
|
|
|
|
268
|
1 |
|
$this->locksystem->release(); |
269
|
|
|
|
270
|
1 |
|
if ($result['errcode'] != 0) { |
271
|
1 |
|
$twigparms = array('errcode' => $result['errcode'], 'command' => $result['command'], 'message' => $result['message']); |
272
|
1 |
|
$view = $this->renderView('PannelloAmministrazioneBundle:PannelloAmministrazione:outputcommand.html.twig', $twigparms); |
|
|
|
|
273
|
1 |
|
return new Response($view, 500); |
274
|
|
|
} else { |
275
|
|
|
$twigparms = array('errcode' => $result['errcode'], 'command' => $result['command'], 'message' => $result['message']); |
276
|
|
|
return $this->render('PannelloAmministrazioneBundle:PannelloAmministrazione:outputcommand.html.twig', $twigparms); |
277
|
|
|
} |
278
|
|
|
} |
279
|
|
|
} |
280
|
|
|
|
281
|
|
|
/* CLEAR CACHE */ |
282
|
|
|
|
283
|
1 |
|
public function symfonyCommand(Request $request) |
284
|
|
|
{ |
285
|
1 |
|
set_time_limit(0); |
286
|
|
|
|
287
|
1 |
|
$simfonycommand = $request->get('symfonycommand'); |
288
|
1 |
|
$comando = explode(" ", $simfonycommand); |
|
|
|
|
289
|
1 |
|
if (!$this->locksystem->acquire()) { |
290
|
|
|
return new Response($this->getLockMessage()); |
291
|
|
|
} else { |
292
|
1 |
|
$this->locksystem->acquire(); |
293
|
1 |
|
$this->apppaths = $this->apppaths; |
294
|
1 |
|
$pammutils = $this->pautils; |
|
|
|
|
295
|
1 |
|
$result = $pammutils->runCommand($this->apppaths->getConsole(), $comando); |
|
|
|
|
296
|
|
|
|
297
|
1 |
|
$this->locksystem->release(); |
298
|
1 |
|
if ($result['errcode'] != 0) { |
299
|
1 |
|
$twigparms = array('errcode' => $result['errcode'], 'command' => $result['command'], 'message' => $result['message']); |
300
|
1 |
|
$view = $this->renderView('PannelloAmministrazioneBundle:PannelloAmministrazione:outputcommand.html.twig', $twigparms); |
|
|
|
|
301
|
1 |
|
return new Response($view, 500); |
302
|
|
|
} else { |
303
|
1 |
|
$twigparms = array('errcode' => $result['errcode'], 'command' => $result['command'], 'message' => $result['message']); |
304
|
1 |
|
return $this->render('PannelloAmministrazioneBundle:PannelloAmministrazione:outputcommand.html.twig', $twigparms); |
305
|
|
|
} |
306
|
|
|
} |
307
|
|
|
} |
308
|
|
|
|
309
|
|
|
/** |
310
|
|
|
* Suppress PMD warnings per exit. |
311
|
|
|
* |
312
|
|
|
* @SuppressWarnings(PHPMD) |
313
|
|
|
*/ |
314
|
1 |
|
public function unixCommand(Request $request) |
315
|
|
|
{ |
316
|
1 |
|
set_time_limit(0); |
317
|
1 |
|
$pammutils = $this->pautils; |
|
|
|
|
318
|
1 |
|
$unixcommand = $request->get('unixcommand'); |
319
|
1 |
|
$parametri = explode(" ", $unixcommand); |
|
|
|
|
320
|
1 |
|
$arguments = array(); |
|
|
|
|
321
|
1 |
|
$command = $unixcommand; |
|
|
|
|
322
|
1 |
|
if (count($parametri) > 1) { |
323
|
1 |
|
$command = $parametri[0]; |
324
|
1 |
|
for ($index = 1; $index < count($parametri); $index++) { |
|
|
|
|
325
|
1 |
|
$arguments[] = $parametri[$index]; |
326
|
|
|
} |
327
|
|
|
} |
328
|
|
|
//Se viene lanciato il comando per cancellare il file di lock su bypassa tutto e si lancia |
329
|
1 |
|
$dellockfile = "DELETELOCK"; |
|
|
|
|
330
|
1 |
|
if ($command == $dellockfile) { |
331
|
|
|
$this->locksystem->release(); |
332
|
|
|
return new Response('File di lock cancellato'); |
333
|
|
|
} |
334
|
|
|
|
335
|
1 |
|
if (!$this->locksystem->acquire()) { |
336
|
|
|
return new Response($this->getLockMessage()); |
337
|
|
|
} else { |
338
|
1 |
|
$this->locksystem->acquire(); |
339
|
1 |
|
$result = $pammutils->runCommand($command, $arguments); |
340
|
|
|
|
341
|
1 |
|
$this->locksystem->release(); |
342
|
|
|
// eseguito deopo la fine del comando |
343
|
1 |
|
if ($result['errcode'] != 0) { |
344
|
1 |
|
$twigparms = array('errcode' => $result['errcode'], 'command' => $result['command'], 'message' => $result['message']); |
345
|
1 |
|
$view = $this->renderView('PannelloAmministrazioneBundle:PannelloAmministrazione:outputcommand.html.twig', $twigparms); |
|
|
|
|
346
|
1 |
|
return new Response($view, 500); |
347
|
|
|
} else { |
348
|
1 |
|
$twigparms = array('errcode' => $result['errcode'], 'command' => $result['command'], 'message' => $result['message']); |
349
|
1 |
|
return $this->render('PannelloAmministrazioneBundle:PannelloAmministrazione:outputcommand.html.twig', $twigparms); |
350
|
|
|
} |
351
|
|
|
} |
352
|
|
|
} |
353
|
|
|
|
354
|
|
|
/** |
355
|
|
|
* @codeCoverageIgnore |
356
|
|
|
*/ |
357
|
|
|
public function phpunittest(Request $request) |
|
|
|
|
358
|
|
|
{ |
359
|
|
|
set_time_limit(0); |
360
|
|
|
$this->apppaths = $this->apppaths; |
361
|
|
|
if (!$this->locksystem->acquire()) { |
362
|
|
|
return new Response($this->getLockMessage()); |
363
|
|
|
} else { |
364
|
|
|
if (!OsFunctions::isWindows()) { |
365
|
|
|
$this->locksystem->acquire(); |
366
|
|
|
//$phpPath = OsFunctions::getPHPExecutableFromPath(); |
|
|
|
|
367
|
|
|
$sepchr = OsFunctions::getSeparator(); |
|
|
|
|
368
|
|
|
$phpPath = OsFunctions::getPHPExecutableFromPath(); |
369
|
|
|
|
370
|
|
|
$command = 'cd ' . $this->apppaths->getRootPath() . $sepchr . |
371
|
|
|
$phpPath . ' ' . 'vendor' . DIRECTORY_SEPARATOR . 'bin' . DIRECTORY_SEPARATOR . 'simple-phpunit'; |
372
|
|
|
|
373
|
|
|
$process = new Process($command); |
374
|
|
|
$process->run(); |
375
|
|
|
|
376
|
|
|
$this->locksystem->release(); |
377
|
|
|
// eseguito dopo la fine del comando |
378
|
|
|
if (!$process->isSuccessful()) { |
379
|
|
|
$twigparms = array('errcode' => -1, 'command' => $command, 'message' => $process->getOutput() . $process->getErrorOutput()); |
380
|
|
|
$view = $this->renderView('PannelloAmministrazioneBundle:PannelloAmministrazione:outputcommand.html.twig', $twigparms); |
|
|
|
|
381
|
|
|
return new Response($view, 500); |
382
|
|
|
} else { |
383
|
|
|
$twigparms = array('errcode' => 0, 'command' => $command, 'message' => $process->getOutput() . $process->getErrorOutput()); |
384
|
|
|
return $this->render('PannelloAmministrazioneBundle:PannelloAmministrazione:outputcommand.html.twig', $twigparms); |
385
|
|
|
} |
386
|
|
|
} else { |
387
|
|
|
return new Response('Non previsto in ambiente windows!', 500); |
388
|
|
|
} |
389
|
|
|
} |
390
|
|
|
} |
391
|
|
|
} |
392
|
|
|
|
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.