Skip to content

Commit

Permalink
Fix conflit
Browse files Browse the repository at this point in the history
  • Loading branch information
eoxia-jimmy committed Jan 3, 2019
1 parent d582d5c commit 2d46d78
Showing 1 changed file with 0 additions and 62 deletions.
62 changes: 0 additions & 62 deletions modules/evaluation_method/util/scale.util.php
Original file line number Diff line number Diff line change
@@ -1,64 +1,3 @@
<<<<<<< HEAD
<?php
/**
* Fonctions utiles pour les méthodes d'évaluations.
*
* @author Evarisk <[email protected]>
* @since 6.2.9
* @version 7.0.0
* @copyright 2015-2018 Evarisk
* @package DigiRisk
*/

namespace digi;

if ( ! defined( 'ABSPATH' ) ) {
exit;
}

/**
* Fonctions utiles pour les méthodes d'évaluations.
*/
class Scale_Util {

/**
* Récupères le niveau d'évaluation par rapport à son level
*
* @since 6.2.9
* @version 7.0.0
*
* @param int $level Le level de l'évaluation.
*
* @return $int value
*/
public static function get_scale( $level ) {
if ( true !== is_int( $level ) ) {
return false;
}

$method_evaluation_simplified = Evaluation_Method_Class::g()->get( array( 'slug' => 'evarisk-simplified' ), true );
$list_scale = array( 1 => 0, 2 => 48, 3 => 51, 4 => 80 );
if ( empty( $list_scale ) ) {
return false;
}

$list_ecart = array();
$list_key = array();

foreach ( $list_scale as $key => $value ) {
if ( $level - $value >= 0 ) {
$list_ecart[ $value ] = $level - $value;
$list_key[ $value ] = $key;
}
}

$key = 0;
$value = min( $list_ecart );
$value = array_search( $value, $list_ecart );
return $list_key[ $value ];
}
}
=======
<?php
/**
* Fonctions utiles pour les méthodes d'évaluations.
Expand Down Expand Up @@ -118,4 +57,3 @@ public static function get_scale( $level ) {
return $list_key[ $value ];
}
}
>>>>>>> 7.1.0

0 comments on commit 2d46d78

Please sign in to comment.