Passed
Push — master ( 3d7bcb...3d7bcb )
by Richard
10:09 queued 05:00
created

VueGenerator   C

Complexity

Total Complexity 57

Size/Duplication

Total Lines 523
Duplicated Lines 0 %

Importance

Changes 4
Bugs 0 Features 0
Metric Value
wmc 57
eloc 226
c 4
b 0
f 0
dl 0
loc 523
rs 5.04

15 Methods

Rating   Name   Duplication   Size   Complexity  
A generateIndex() 0 17 2
A generateDataTableBody() 0 5 1
A rollback() 0 26 6
A __construct() 0 5 1
C generateFields() 0 101 14
A generateCreate() 0 15 2
A generateTable() 0 10 2
A generateUpdate() 0 15 2
A generateShow() 0 14 2
A generateShowFields() 0 32 4
A generateTableHeaderFields() 0 30 4
A generateBladeTableBody() 0 34 4
B generate() 0 46 9
A generateDataTableActions() 0 15 2
A generateVueComposer() 0 15 2

How to fix   Complexity   

Complex Class

Complex classes like VueGenerator often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes.

Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.

While breaking up the class, it is a good idea to analyze how other classes use VueGenerator, and based on these observations, apply Extract Interface, too.

1
<?php
2
3
namespace PWWEB\Artomator\Generators\Scaffold;
4
5
use Illuminate\Support\Arr;
6
use Illuminate\Support\Str;
7
use InfyOm\Generator\Generators\BaseGenerator;
8
use InfyOm\Generator\Utils\FileUtil;
9
use PWWEB\Artomator\Common\CommandData;
10
use PWWEB\Artomator\Utils\VueFieldGenerator;
11
12
class VueGenerator extends BaseGenerator
13
{
14
    /**
15
     * Command data.
16
     *
17
     * @var CommandData
18
     */
19
    private $commandData;
20
21
    /**
22
     * Path.
23
     *
24
     * @var string
25
     */
26
    private $path;
27
28
    /**
29
     * Template type.
30
     *
31
     * @var string
32
     */
33
    private $templateType;
34
35
    /**
36
     * Html Fields.
37
     *
38
     * @var array
39
     */
40
    private $htmlFields;
41
42
    /**
43
     * Construct function.
44
     *
45
     * @param CommandData $commandData Command Data.
46
     *
47
     * @return void
48
     */
49
    public function __construct(CommandData $commandData)
50
    {
51
        $this->commandData = $commandData;
52
        $this->path = $commandData->config->pathVues;
53
        $this->templateType = config('infyom.laravel_generator.templates', 'adminlte-templates');
54
    }
55
56
    /**
57
     * Generate Function.
58
     *
59
     * @return void
60
     */
61
    public function generate()
62
    {
63
        if (false === file_exists($this->path)) {
64
            mkdir($this->path, 0755, true);
65
        }
66
67
        $htmlInputs = Arr::pluck($this->commandData->fields, 'htmlInput');
68
        if (true === in_array('file', $htmlInputs)) {
69
            $this->commandData->addDynamicVariable('$FILES$', ' enctype="multipart/form-data"');
70
        }
71
72
        $this->commandData->commandComment("\nGenerating Vues...");
73
74
        if (true === $this->commandData->getOption('views')) {
75
            $vuesToBeGenerated = explode(',', $this->commandData->getOption('views'));
0 ignored issues
show
Bug introduced by
It seems like $this->commandData->getOption('views') can also be of type false; however, parameter $string of explode() does only seem to accept string, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

75
            $vuesToBeGenerated = explode(',', /** @scrutinizer ignore-type */ $this->commandData->getOption('views'));
Loading history...
76
77
            if (true === in_array('index', $vuesToBeGenerated)) {
78
                $this->generateIndex();
79
            }
80
81
            if (count(array_intersect(['create', 'update'], $vuesToBeGenerated)) > 0) {
82
                $this->generateFields();
83
            }
84
85
            if (true === in_array('create', $vuesToBeGenerated)) {
86
                $this->generateCreate();
87
            }
88
89
            if (true === in_array('edit', $vuesToBeGenerated)) {
90
                $this->generateUpdate();
91
            }
92
93
            if (true === in_array('show', $vuesToBeGenerated)) {
94
                $this->generateShowFields();
95
                $this->generateShow();
96
            }
97
        } else {
98
            $this->generateIndex();
99
            $this->generateFields();
100
            $this->generateCreate();
101
            $this->generateUpdate();
102
            $this->generateShowFields();
103
            $this->generateShow();
104
        }
105
106
        $this->commandData->commandComment('Vues created: ');
107
    }
108
109
    /**
110
     * Generate Table.
111
     *
112
     * @return void
113
     */
114
    private function generateTable()
115
    {
116
        if (true === $this->commandData->getAddOn('datatables')) {
117
            $templateData = $this->generateDataTableBody();
0 ignored issues
show
Bug introduced by
Are you sure the assignment to $templateData is correct as $this->generateDataTableBody() targeting PWWEB\Artomator\Generato...generateDataTableBody() seems to always return null.

This check looks for function or method calls that always return null and whose return value is assigned to a variable.

class A
{
    function getObject()
    {
        return null;
    }

}

$a = new A();
$object = $a->getObject();

The method getObject() can return nothing but null, so it makes no sense to assign that value to a variable.

The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.

Loading history...
118
            $this->generateDataTableActions();
119
        } else {
120
            $templateData = $this->generateBladeTableBody();
0 ignored issues
show
Bug introduced by
Are you sure the assignment to $templateData is correct as $this->generateBladeTableBody() targeting PWWEB\Artomator\Generato...enerateBladeTableBody() seems to always return null.

This check looks for function or method calls that always return null and whose return value is assigned to a variable.

class A
{
    function getObject()
    {
        return null;
    }

}

$a = new A();
$object = $a->getObject();

The method getObject() can return nothing but null, so it makes no sense to assign that value to a variable.

The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.

Loading history...
121
        }
122
123
        return $templateData;
124
    }
125
126
    /**
127
     * Generate Data Table Body.
128
     *
129
     * @return void
130
     */
131
    private function generateDataTableBody()
132
    {
133
        $templateData = get_artomator_template('scaffold.views.datatable_body');
134
135
        return fill_template($this->commandData->dynamicVars, $templateData);
0 ignored issues
show
Bug Best Practice introduced by
The expression return fill_template($th...micVars, $templateData) returns the type string which is incompatible with the documented return type void.
Loading history...
136
    }
137
138
    /**
139
     * Generate Data Table Actions.
140
     *
141
     * @return void
142
     */
143
    private function generateDataTableActions()
144
    {
145
        $templateName = 'datatables_actions';
146
147
        if (true === $this->commandData->isLocalizedTemplates()) {
148
            $templateName .= '_locale';
149
        }
150
151
        $templateData = get_artomator_template('scaffold.views.'.$templateName);
152
153
        $templateData = fill_template($this->commandData->dynamicVars, $templateData);
154
155
        FileUtil::createFile($this->path, 'datatables_actions.blade.php', $templateData);
156
157
        $this->commandData->commandInfo('datatables_actions.blade.php created');
158
    }
159
160
    /**
161
     * Generate Blade Table Body.
162
     *
163
     * @return void
164
     */
165
    private function generateBladeTableBody()
166
    {
167
        $templateName = 'blade_table_body';
168
169
        if (true === $this->commandData->isLocalizedTemplates()) {
170
            $templateName .= '_locale';
171
        }
172
173
        $templateData = get_artomator_template('scaffold.vues.'.$templateName);
174
175
        $templateData = fill_template($this->commandData->dynamicVars, $templateData);
176
177
        $templateData = str_replace('$FIELD_HEADERS$', $this->generateTableHeaderFields(), $templateData);
0 ignored issues
show
Bug introduced by
Are you sure the usage of $this->generateTableHeaderFields() targeting PWWEB\Artomator\Generato...rateTableHeaderFields() seems to always return null.

This check looks for function or method calls that always return null and whose return value is used.

class A
{
    function getObject()
    {
        return null;
    }

}

$a = new A();
if ($a->getObject()) {

The method getObject() can return nothing but null, so it makes no sense to use the return value.

The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.

Loading history...
Bug introduced by
$this->generateTableHeaderFields() of type void is incompatible with the type string|string[] expected by parameter $replace of str_replace(). ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

177
        $templateData = str_replace('$FIELD_HEADERS$', /** @scrutinizer ignore-type */ $this->generateTableHeaderFields(), $templateData);
Loading history...
178
179
        $cellFieldTemplate = get_artomator_template('scaffold.vues.table_cell');
180
181
        $tableBodyFields = [];
182
183
        foreach ($this->commandData->fields as $field) {
184
            if (false === $field->inIndex) {
185
                continue;
186
            }
187
188
            $tableBodyFields[] = fill_template_with_field_data(
189
                $this->commandData->dynamicVars,
190
                $this->commandData->fieldNamesMapping,
191
                $cellFieldTemplate,
192
                $field
193
            );
194
        }
195
196
        $tableBodyFields = implode(infy_nl_tab(1, 3), $tableBodyFields);
197
198
        return str_replace('$FIELD_BODY$', $tableBodyFields, $templateData);
0 ignored issues
show
Bug Best Practice introduced by
The expression return str_replace('$FIE...yFields, $templateData) returns the type string which is incompatible with the documented return type void.
Loading history...
199
    }
200
201
    /**
202
     * Generate Table Header Fields.
203
     *
204
     * @return void
205
     */
206
    private function generateTableHeaderFields()
207
    {
208
        $templateName = 'table_header';
209
210
        $localized = false;
0 ignored issues
show
Unused Code introduced by
The assignment to $localized is dead and can be removed.
Loading history...
211
        if (true === $this->commandData->isLocalizedTemplates()) {
212
            $templateName .= '_locale';
213
            $localized = true;
214
        }
215
216
        $headerFieldTemplate = get_artomator_template('scaffold.vues.'.$templateName);
217
218
        $headerFields = [];
219
220
        foreach ($this->commandData->fields as $field) {
221
            if (false === $field->inIndex) {
222
                continue;
223
            }
224
            $singleFieldStr = str_replace(
225
                '$FIELD_NAME_TITLE$',
226
                Str::title(str_replace('_', ' ', $field->name)),
227
                $headerFieldTemplate
228
            );
229
            $singleFieldStr = str_replace('$FIELD_NAME$', $field->name, $singleFieldStr);
230
            $singleFieldStr = fill_template($this->commandData->dynamicVars, $singleFieldStr);
231
232
            $headerFields[] = $singleFieldStr;
233
        }
234
235
        return implode(infy_nl_tab(1, 2), $headerFields);
0 ignored issues
show
Bug Best Practice introduced by
The expression return implode(infy_nl_tab(1, 2), $headerFields) returns the type string which is incompatible with the documented return type void.
Loading history...
236
    }
237
238
    /**
239
     * Generate Index.
240
     *
241
     * @return void
242
     */
243
    private function generateIndex()
244
    {
245
        $templateName = 'index';
246
247
        if (true === $this->commandData->isLocalizedTemplates()) {
248
            $templateName .= '_locale';
249
        }
250
251
        $templateData = get_artomator_template('scaffold.vues.'.$templateName);
252
253
        $templateData = fill_template($this->commandData->dynamicVars, $templateData);
254
255
        $templateData = str_replace('$TABLE$', $this->generateTable(), $templateData);
0 ignored issues
show
Bug introduced by
Are you sure the usage of $this->generateTable() targeting PWWEB\Artomator\Generato...erator::generateTable() seems to always return null.

This check looks for function or method calls that always return null and whose return value is used.

class A
{
    function getObject()
    {
        return null;
    }

}

$a = new A();
if ($a->getObject()) {

The method getObject() can return nothing but null, so it makes no sense to use the return value.

The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.

Loading history...
Bug introduced by
$this->generateTable() of type void is incompatible with the type string|string[] expected by parameter $replace of str_replace(). ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

255
        $templateData = str_replace('$TABLE$', /** @scrutinizer ignore-type */ $this->generateTable(), $templateData);
Loading history...
256
257
        FileUtil::createFile($this->path, 'Index.vue', $templateData);
258
259
        $this->commandData->commandInfo('Index.vue created');
260
    }
261
262
    /**
263
     * Generate Fields.
264
     *
265
     * @return void
266
     */
267
    private function generateFields()
268
    {
269
        $templateName = 'fields';
270
271
        $localized = false;
272
        if (true === $this->commandData->isLocalizedTemplates()) {
273
            $templateName .= '_locale';
274
            $localized = true;
275
        }
276
277
        $this->htmlFields = [];
278
        $createForm = [];
279
        $editForm = [];
280
281
        foreach ($this->commandData->fields as $field) {
282
            if (false === $field->inForm) {
283
                continue;
284
            }
285
286
            $validations = explode('|', $field->validations);
287
            $minMaxRules = '';
288
            $required = '';
289
            foreach ($validations as $validation) {
290
                if (false === Str::contains($validation, ['max:', 'min:'])) {
291
                    continue;
292
                }
293
294
                $validationText = substr($validation, 0, 3);
295
                $sizeInNumber = substr($validation, 4);
296
297
                $sizeText = ('min' === $validationText) ? 'minlength' : 'maxlength';
298
                if ('number' === $field->htmlType) {
299
                    $sizeText = $validationText;
300
                }
301
302
                if (true === Str::contains($validation, 'required')) {
303
                    $required = ' required';
304
                }
305
306
                $size = " $sizeText=\"$sizeInNumber\"";
307
                $minMaxRules .= $size;
308
            }
309
310
            $this->commandData->addDynamicVariable('$SIZE$', $minMaxRules);
311
312
            $this->commandData->addDynamicVariable('$REQUIRED$', $required);
313
314
            $fieldTemplate = VueFieldGenerator::generateHTML($field, $this->templateType, $localized);
315
316
            if ('selectTable' === $field->htmlType) {
317
                $inputArr = explode(',', $field->htmlValues[1]);
318
                $columns = '';
319
                foreach ($inputArr as $item) {
320
                    $columns .= "'$item'".',';
321
                    //e.g 'email,id,'
322
                }
323
                $columns = substr_replace($columns, '', -1);
324
                // remove last ,
325
326
                $htmlValues = explode(',', $field->htmlValues[0]);
327
                $selectTable = $htmlValues[0];
328
                $modalName = null;
329
                if (2 === count($htmlValues)) {
330
                    $modalName = $htmlValues[1];
331
                }
332
333
                $tableName = $this->commandData->config->tableName;
334
                $vuePath = $this->commandData->config->prefixes['vue'];
335
                if (false === empty($vuePath)) {
336
                    $tableName = $vuePath.'.'.$tableName;
337
                }
338
339
                $variableName = Str::singular($selectTable).'Items';
340
                // e.g $userItems
341
342
                $fieldTemplate = $this->generateVueComposer($tableName, $variableName, $columns, $selectTable, $modalName);
0 ignored issues
show
Bug introduced by
Are you sure the assignment to $fieldTemplate is correct as $this->generateVueCompos...electTable, $modalName) targeting PWWEB\Artomator\Generato...::generateVueComposer() seems to always return null.

This check looks for function or method calls that always return null and whose return value is assigned to a variable.

class A
{
    function getObject()
    {
        return null;
    }

}

$a = new A();
$object = $a->getObject();

The method getObject() can return nothing but null, so it makes no sense to assign that value to a variable.

The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.

Loading history...
Bug introduced by
It seems like $columns can also be of type string; however, parameter $columns of PWWEB\Artomator\Generato...::generateVueComposer() does only seem to accept array, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

342
                $fieldTemplate = $this->generateVueComposer($tableName, $variableName, /** @scrutinizer ignore-type */ $columns, $selectTable, $modalName);
Loading history...
343
            }
344
345
            if (false === empty($fieldTemplate)) {
346
                $fieldTemplate = fill_template_with_field_data(
347
                    $this->commandData->dynamicVars,
348
                    $this->commandData->fieldNamesMapping,
349
                    $fieldTemplate,
350
                    $field
351
                );
352
                $this->htmlFields[] = $fieldTemplate;
353
                $createForm[] = $field->name.': null,';
354
                $editForm[] = $field->name.': props.$MODEL_NAME_CAMEL$.'.$field->name.',';
355
            }
356
        }
357
358
        $this->commandData->addDynamicVariable('$CREATE_DATA$', implode("\n", $createForm));
359
        $this->commandData->addDynamicVariable('$EDIT_DATA$', implode("\n", $editForm));
360
361
        $templateData = get_artomator_template('scaffold.vues.'.$templateName);
362
        $templateData = fill_template($this->commandData->dynamicVars, $templateData);
363
364
        $templateData = str_replace('$FIELDS$', implode("\n\n", $this->htmlFields), $templateData);
365
366
        FileUtil::createFile($this->path, 'Fields.vue', $templateData);
367
        $this->commandData->commandInfo('Field.vue created');
368
    }
369
370
    /**
371
     * Generate Vue Composer.
372
     *
373
     * @param string      $tableName    Table Name.
374
     * @param string      $variableName Variable Name.
375
     * @param array       $columns      Columns.
376
     * @param string      $selectTable  Select Table.
377
     * @param string|null $modelName    Model Name.
378
     *
379
     * @return void
380
     */
381
    private function generateVueComposer($tableName, $variableName, $columns, $selectTable, $modelName = null)
0 ignored issues
show
Unused Code introduced by
The parameter $selectTable is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

381
    private function generateVueComposer($tableName, $variableName, $columns, /** @scrutinizer ignore-unused */ $selectTable, $modelName = null)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $tableName is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

381
    private function generateVueComposer(/** @scrutinizer ignore-unused */ $tableName, $variableName, $columns, $selectTable, $modelName = null)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $modelName is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

381
    private function generateVueComposer($tableName, $variableName, $columns, $selectTable, /** @scrutinizer ignore-unused */ $modelName = null)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $columns is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

381
    private function generateVueComposer($tableName, $variableName, /** @scrutinizer ignore-unused */ $columns, $selectTable, $modelName = null)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
382
    {
383
        $templateName = 'scaffold.fields.select';
384
        if (true === $this->commandData->isLocalizedTemplates()) {
385
            $templateName .= '_locale';
386
        }
387
        $fieldTemplate = get_artomator_template($templateName);
388
389
        $fieldTemplate = str_replace(
390
            '$INPUT_ARR$',
391
            $variableName,
392
            $fieldTemplate
393
        );
394
395
        return $fieldTemplate;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $fieldTemplate returns the type string which is incompatible with the documented return type void.
Loading history...
396
    }
397
398
    /**
399
     * Generate Create.
400
     *
401
     * @return void
402
     */
403
    private function generateCreate()
404
    {
405
        $templateName = 'create';
406
407
        if (true === $this->commandData->isLocalizedTemplates()) {
408
            $templateName .= '_locale';
409
        }
410
411
        $templateData = get_artomator_template('scaffold.vues.'.$templateName);
412
413
        $templateData = fill_template($this->commandData->dynamicVars, $templateData);
414
        $templateData = fill_template($this->commandData->dynamicVars, $templateData);
415
416
        FileUtil::createFile($this->path, 'Create.vue', $templateData);
417
        $this->commandData->commandInfo('Create.vue created');
418
    }
419
420
    /**
421
     * Generate Update.
422
     *
423
     * @return void
424
     */
425
    private function generateUpdate()
426
    {
427
        $templateName = 'edit';
428
429
        if (true === $this->commandData->isLocalizedTemplates()) {
430
            $templateName .= '_locale';
431
        }
432
433
        $templateData = get_artomator_template('scaffold.vues.'.$templateName);
434
435
        $templateData = fill_template($this->commandData->dynamicVars, $templateData);
436
        $templateData = fill_template($this->commandData->dynamicVars, $templateData);
437
438
        FileUtil::createFile($this->path, 'Edit.vue', $templateData);
439
        $this->commandData->commandInfo('Edit.vue created');
440
    }
441
442
    /**
443
     * Generate Show Fields.
444
     *
445
     * @return void
446
     */
447
    private function generateShowFields()
448
    {
449
        $templateName = 'show_field';
450
        if (true === $this->commandData->isLocalizedTemplates()) {
451
            $templateName .= '_locale';
452
        }
453
        $fieldTemplate = get_artomator_template('scaffold.vues.'.$templateName);
454
455
        $fieldsStr = '';
456
457
        foreach ($this->commandData->fields as $field) {
458
            if (false === $field->inView) {
459
                continue;
460
            }
461
            $singleFieldStr = str_replace(
462
                '$FIELD_NAME_TITLE$',
463
                Str::title(str_replace('_', ' ', $field->name)),
464
                $fieldTemplate
465
            );
466
            $singleFieldStr = str_replace('$FIELD_NAME$', $field->name, $singleFieldStr);
467
            $singleFieldStr = fill_template($this->commandData->dynamicVars, $singleFieldStr);
468
469
            $fieldsStr .= $singleFieldStr."\n\n";
470
        }
471
        $templateName = 'show_fields';
472
        $fieldTemplate = get_artomator_template('scaffold.vues.'.$templateName);
473
474
        $fieldTemplate = str_replace('$FIELDS$', $fieldsStr, $fieldTemplate);
475
        $fieldTemplate = fill_template($this->commandData->dynamicVars, $fieldTemplate);
476
477
        FileUtil::createFile($this->path, 'ShowFields.vue', $fieldTemplate);
478
        $this->commandData->commandInfo('ShowFields.vue created');
479
    }
480
481
    /**
482
     * Generate Show.
483
     *
484
     * @return void
485
     */
486
    private function generateShow()
487
    {
488
        $templateName = 'show';
489
490
        if (true === $this->commandData->isLocalizedTemplates()) {
491
            $templateName .= '_locale';
492
        }
493
494
        $templateData = get_artomator_template('scaffold.vues.'.$templateName);
495
496
        $templateData = fill_template($this->commandData->dynamicVars, $templateData);
497
498
        FileUtil::createFile($this->path, 'Show.vue', $templateData);
499
        $this->commandData->commandInfo('Show.vue created');
500
    }
501
502
    /**
503
     * Rollback Function.
504
     *
505
     * @param array $vues Vue views to rollback.
506
     *
507
     * @return void
508
     */
509
    public function rollback($vues = [])
510
    {
511
        $files = [
512
            'Table.vue',
513
            'Index.vue',
514
            'Fields.vue',
515
            'Create.vue',
516
            'Edit.vue',
517
            'Show.vue',
518
            'ShowFields.vue',
519
        ];
520
521
        if (false === empty($vues)) {
522
            $files = [];
523
            foreach ($vues as $vue) {
524
                $files[] = $vue.'.vue';
525
            }
526
        }
527
528
        if (true === $this->commandData->getAddOn('datatables')) {
529
            $files[] = 'datatables_actions.blade.php';
530
        }
531
532
        foreach ($files as $file) {
533
            if (true === $this->rollbackFile($this->path, $file)) {
534
                $this->commandData->commandComment($file.' file deleted');
535
            }
536
        }
537
    }
538
}
539