Code Duplication    Length = 22-22 lines in 4 locations

tools/update_actions_class.php 1 location

@@ 72-93 (lines=22) @@
69
$syncer->addStatusMessage('Updating Evidences Actions');
70
71
$pos = 0;
72
foreach (EvidenceList::$name as $evidencePath => $evidenceName) {
73
    $pos++;
74
    $structure = getEvidenceActions($evidencePath, $syncer);
75
    if (count($structure)) {
76
        $evidenceActions .= '    /**
77
     * Evidence '.$evidencePath.' ('.$evidenceName.') Actions.
78
     *
79
     * @var array
80
     */
81
';
82
        $evidenceActions .= ' static public $'.lcfirst(FlexiBeeRO::evidenceToClassName($evidencePath)).' = '.var_export($structure,
83
                true).';
84
';
85
86
        $syncer->addStatusMessage($pos.' of '.count(EvidenceList::$name).' '.$evidencePath.': actions obtained',
87
            'success');
88
        $ok++;
89
    } else {
90
        $syncer->addStatusMessage($pos.' of '.count(EvidenceList::$name).' '.$evidencePath.': obtaining actions problem',
91
            'error');
92
    }
93
}
94
95
$evidenceActions .= '}
96
';

tools/update_properties_class.php 1 location

@@ 71-92 (lines=22) @@
68
69
70
$pos = 0;
71
foreach (EvidenceList::$name as $evidencePath => $evidenceName) {
72
    $pos++;
73
    $structure = getPropertiesInfo($evidencePath, $syncer);
74
    if (count($structure)) {
75
        $evidenceProps .= '    /**
76
     * Evidence '.$evidencePath.' ('.$evidenceName.') structure.
77
     *
78
     * @var array
79
     */
80
';
81
        $evidenceProps .= ' static public $'.lcfirst(FlexiBeeRO::evidenceToClassName($evidencePath)).' = '.str_replace('http://demo.flexibee.eu/c/demo/',
82
                '', var_export($structure, true)).';
83
';
84
85
        $syncer->addStatusMessage($pos.' of '.count(EvidenceList::$name).' '.$evidencePath.': structure obtained',
86
            'success');
87
        $ok++;
88
    } else {
89
        $syncer->addStatusMessage($pos.' of '.count(EvidenceList::$name).' '.$evidencePath.': structure problem',
90
            'error');
91
    }
92
}
93
94
$evidenceProps .= '}
95
';

tools/update_relations_class.php 1 location

@@ 71-92 (lines=22) @@
68
$syncer->addStatusMessage('Updating Evidences Relations');
69
70
$pos = 0;
71
foreach (EvidenceList::$name as $evidencePath => $evidenceName) {
72
    $pos++;
73
    $structure = getEvidenceRelations($evidencePath, $syncer);
74
    if (count($structure)) {
75
        $evidenceRels .= '    /**
76
     * Evidence '.$evidencePath.' ('.$evidenceName.') Relations.
77
     *
78
     * @var array
79
     */
80
';
81
        $evidenceRels .= ' static public $'.lcfirst(FlexiBeeRO::evidenceToClassName($evidencePath)).' = '.var_export($structure,
82
                true).';
83
';
84
85
        $syncer->addStatusMessage($pos.' of '.count(EvidenceList::$name).' '.$evidencePath.': relations obtained',
86
            'success');
87
        $ok++;
88
    } else {
89
        $syncer->addStatusMessage($pos.' of '.count(EvidenceList::$name).' '.$evidencePath.': obtaining relations problem',
90
            'error');
91
    }
92
}
93
94
$evidenceRels .= '}
95
';

tools/update_formats_class.php 1 location

@@ 75-96 (lines=22) @@
72
$syncer->addStatusMessage('Updating Evidences Formats');
73
74
$pos = 0;
75
foreach (EvidenceList::$name as $evidencePath => $evidenceName) {
76
    $pos++;
77
    $structure = getEvidenceFormats($evidencePath, $syncer);
78
    if (count($structure)) {
79
        $evidenceFormats .= '    /**
80
     * Evidence '.$evidencePath.' ('.$evidenceName.') Formats.
81
     *
82
     * @var array
83
     */
84
';
85
        $evidenceFormats .= ' static public $'.lcfirst(FlexiBeeRO::evidenceToClassName($evidencePath)).' = '.var_export($structure,
86
                true).';
87
';
88
89
        $syncer->addStatusMessage($pos.' of '.count(EvidenceList::$name).' '.$evidencePath.': formats: '.implode(',',
90
                $structure).' obtained', 'success');
91
        $ok++;
92
    } else {
93
        $syncer->addStatusMessage($pos.' of '.count(EvidenceList::$name).' '.$evidencePath.': obtaining formats problem',
94
            'error');
95
    }
96
}
97
98
$evidenceFormats .= '}
99
';