Code Duplication    Length = 21-21 lines in 3 locations

tools/update_actions_class.php 1 location

@@ 55-75 (lines=21) @@
52
$syncer = new FlexiBeeRO();
53
54
$pos = 0;
55
foreach (EvidenceList::$name as $evidencePath => $evidenceName) {
56
    $pos++;
57
    $structure = getEvidenceActions($evidencePath, $syncer);
58
    if (count($structure)) {
59
        echo '    /**
60
     * Evidence '.$evidencePath.' ('.$evidenceName.') Actions.
61
     *
62
     * @var array
63
     */
64
';
65
        echo ' static public $'.lcfirst(FlexiBeeRO::evidenceToClassName($evidencePath)).' = '.var_export($structure,
66
            true).';
67
';
68
69
        $syncer->addStatusMessage($pos.' of '.count(EvidenceList::$name).' '.$evidencePath.': actions obtained',
70
            'success');
71
    } else {
72
        $syncer->addStatusMessage($pos.' of '.count(EvidenceList::$name).' '.$evidencePath.': obtaining actions problem',
73
            'error');
74
    }
75
}
76
77
echo '}
78
';

tools/update_properties_class.php 1 location

@@ 51-71 (lines=21) @@
48
$syncer = new FlexiBeeRO();
49
50
$pos = 0;
51
foreach (EvidenceList::$name as $evidencePath => $evidenceName) {
52
    $pos++;
53
    $structure = getPropertiesInfo($evidencePath, $syncer);
54
    if (count($structure)) {
55
        echo '    /**
56
     * Evidence '.$evidencePath.' ('.$evidenceName.') structure.
57
     *
58
     * @var array
59
     */
60
';
61
        echo ' static public $'.lcfirst(FlexiBeeRO::evidenceToClassName($evidencePath)).' = '.str_replace('http://demo.flexibee.eu/c/demo/',
62
            '', var_export($structure, true)).';
63
';
64
65
        $syncer->addStatusMessage($pos.' of '.count(EvidenceList::$name).' '.$evidencePath.': structure obtained',
66
            'success');
67
    } else {
68
        $syncer->addStatusMessage($pos.' of '.count(EvidenceList::$name).' '.$evidencePath.': structure problem',
69
            'error');
70
    }
71
}
72
73
echo '}
74
';

tools/update_relations_class.php 1 location

@@ 54-74 (lines=21) @@
51
$syncer = new FlexiBeeRO();
52
53
$pos = 0;
54
foreach (EvidenceList::$name as $evidencePath => $evidenceName) {
55
    $pos++;
56
    $structure = getEvidenceRelations($evidencePath, $syncer);
57
    if (count($structure)) {
58
        echo '    /**
59
     * Evidence '.$evidencePath.' ('.$evidenceName.') Relations.
60
     *
61
     * @var array
62
     */
63
';
64
        echo ' static public $'.lcfirst(FlexiBeeRO::evidenceToClassName($evidencePath)).' = '.var_export($structure,
65
            true).';
66
';
67
68
        $syncer->addStatusMessage($pos.' of '.count(EvidenceList::$name).' '.$evidencePath.': relations obtained',
69
            'success');
70
    } else {
71
        $syncer->addStatusMessage($pos.' of '.count(EvidenceList::$name).' '.$evidencePath.': obtaining relations problem',
72
            'error');
73
    }
74
}
75
76
echo '}
77
';