Skip to content

Commit 2d46d78

Browse files
committed
Fix conflit
1 parent d582d5c commit 2d46d78

File tree

1 file changed

+0
-62
lines changed

1 file changed

+0
-62
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,3 @@
1-
<<<<<<< HEAD
2-
<?php
3-
/**
4-
* Fonctions utiles pour les méthodes d'évaluations.
5-
*
6-
* @author Evarisk <[email protected]>
7-
* @since 6.2.9
8-
* @version 7.0.0
9-
* @copyright 2015-2018 Evarisk
10-
* @package DigiRisk
11-
*/
12-
13-
namespace digi;
14-
15-
if ( ! defined( 'ABSPATH' ) ) {
16-
exit;
17-
}
18-
19-
/**
20-
* Fonctions utiles pour les méthodes d'évaluations.
21-
*/
22-
class Scale_Util {
23-
24-
/**
25-
* Récupères le niveau d'évaluation par rapport à son level
26-
*
27-
* @since 6.2.9
28-
* @version 7.0.0
29-
*
30-
* @param int $level Le level de l'évaluation.
31-
*
32-
* @return $int value
33-
*/
34-
public static function get_scale( $level ) {
35-
if ( true !== is_int( $level ) ) {
36-
return false;
37-
}
38-
39-
$method_evaluation_simplified = Evaluation_Method_Class::g()->get( array( 'slug' => 'evarisk-simplified' ), true );
40-
$list_scale = array( 1 => 0, 2 => 48, 3 => 51, 4 => 80 );
41-
if ( empty( $list_scale ) ) {
42-
return false;
43-
}
44-
45-
$list_ecart = array();
46-
$list_key = array();
47-
48-
foreach ( $list_scale as $key => $value ) {
49-
if ( $level - $value >= 0 ) {
50-
$list_ecart[ $value ] = $level - $value;
51-
$list_key[ $value ] = $key;
52-
}
53-
}
54-
55-
$key = 0;
56-
$value = min( $list_ecart );
57-
$value = array_search( $value, $list_ecart );
58-
return $list_key[ $value ];
59-
}
60-
}
61-
=======
621
<?php
632
/**
643
* Fonctions utiles pour les méthodes d'évaluations.
@@ -118,4 +57,3 @@ public static function get_scale( $level ) {
11857
return $list_key[ $value ];
11958
}
12059
}
121-
>>>>>>> 7.1.0

0 commit comments

Comments
 (0)