use App\Controller\AppController;
use Cake\Network\Http\Client;
+use Cake\Core\Configure;
/**
* CakePHP UsersController
$this->ComptoirServer->get(COMPTOIR_SRV_API . "softwares/reviewsSoftware/" . $id, 'software', 'software');
}
+
+ /**
+ * Sm means SourceMetric, objective sources of metric,
+ * Cm means ComptoirMetric, metrics from Comptoir du libre .
+ */
+ public function formula() {
+ $this->set('formula', ["metrics" => ["Sm_last_commit_age" => __d("ProjectController", "The age(in days) of the last commit for the project."),
+ "Sm_project_age" => __d("ProjectController", "The age of the project (in days)"),
+ "Sm_delta_commit_one_month" => __d("ProjectController", "The difference between the number of commits in a month and the average of the number of commits in one month for all the projects."),
+ "Sm_delta_commit_twelve_month" => __d("ProjectController", "The difference between the number of commits in twelve months and the average of the number of commits in twelve months for all the projects."),
+ "Sm_number_of_contributors" => __d("ProjectController", "The number of contributors working on the project."), "Sm_high_committer_percent" => __d("ProjectController", "The contribution percentage of the highest contributor."),
+ "Cm_code_gouv_label" => __d("ProjectController", "The project obtains the label code gov if it is available on code.gouv.fr"),
+ "Cm_declared_users" => __d("ProjectController", "The number of declared users on Comptoir du libre."),
+ "Cm_average_review_score" => __d("ProjectController", "The average review score for this project on Comptoir du libre."),
+ "Cm_screenshots" => __d("ProjectController", "The number of screenshots available on Comptoir du libre.")
+ ],
+ "nbSource" => [ sizeof(Configure::read("SOURCE_CODE_METRICS"))]
+ ]);
+ }
}