File tree Expand file tree Collapse file tree 5 files changed +11
-10
lines changed Expand file tree Collapse file tree 5 files changed +11
-10
lines changed Original file line number Diff line number Diff line change 6
6
7
7
namespace Chamilo \CoreBundle \Component \Utils ;
8
8
9
+ use Chamilo \CoreBundle \Framework \Container ;
9
10
use ChamiloSession as Session ;
10
11
use Database ;
11
12
use DateInterval ;
@@ -156,7 +157,7 @@ public static function getPlatformLogo(
156
157
): string {
157
158
$ logoPath = Container::getThemeHelper ()->getThemeAssetUrl ('images/header-logo.svg ' );
158
159
159
- if (empty ($ logo )) {
160
+ if (empty ($ logoPath )) {
160
161
$ logoPath = Container::getThemeHelper ()->getThemeAssetUrl ('images/header-logo.png ' );
161
162
}
162
163
Original file line number Diff line number Diff line change 11
11
use Symfony \Component \Form \FormBuilderInterface ;
12
12
use Symfony \Component \OptionsResolver \OptionsResolver ;
13
13
14
+ /**
15
+ * @template-extends AbstractType<string>
16
+ */
14
17
class PermissionType extends AbstractType
15
18
{
16
19
public function buildForm (FormBuilderInterface $ builder , array $ options ): void
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ public function up(Schema $schema): void
50
50
51
51
if (!empty ($ items )) {
52
52
foreach ($ items as $ item ) {
53
- if (!($ item ['to_user_id ' ] === NULL || $ item ['to_user_id ' ] === 0 )) {
53
+ if (!(null === $ item ['to_user_id ' ] || 0 === $ item ['to_user_id ' ])) {
54
54
$ sessionId = $ item ['session_id ' ] ?? 0 ;
55
55
$ userId = $ item ['to_user_id ' ] ?? 0 ;
56
56
$ session = $ sessionRepo ->find ($ sessionId );
Original file line number Diff line number Diff line change @@ -25,17 +25,16 @@ public function up(Schema $schema): void
25
25
foreach ($ users as $ user ) {
26
26
$ roles = unserialize ($ user ['roles ' ]);
27
27
28
- if ($ roles !== false ) {
28
+ if (false !== $ roles ) {
29
29
$ updatedRoles = array_map (function ($ role ) {
30
- return $ role === ' ROLE_RRHH ' ? 'ROLE_HR ' : $ role ;
30
+ return ' ROLE_RRHH ' === $ role ? 'ROLE_HR ' : $ role ;
31
31
}, $ roles );
32
32
33
33
$ newRolesSerialized = serialize ($ updatedRoles );
34
34
$ conn ->executeUpdate (
35
35
'UPDATE user SET roles = ? WHERE id = ? ' ,
36
36
[$ newRolesSerialized , $ user ['id ' ]]
37
37
);
38
-
39
38
}
40
39
}
41
40
}
@@ -49,9 +48,9 @@ public function down(Schema $schema): void
49
48
foreach ($ users as $ user ) {
50
49
$ roles = unserialize ($ user ['roles ' ]);
51
50
52
- if ($ roles !== false ) {
51
+ if (false !== $ roles ) {
53
52
$ updatedRoles = array_map (function ($ role ) {
54
- return $ role === ' ROLE_HR ' ? 'ROLE_RRHH ' : $ role ;
53
+ return ' ROLE_HR ' === $ role ? 'ROLE_RRHH ' : $ role ;
55
54
}, $ roles );
56
55
57
56
$ newRolesSerialized = serialize ($ updatedRoles );
Original file line number Diff line number Diff line change @@ -31,7 +31,5 @@ public function up(Schema $schema): void
31
31
$ this ->addSql ("DELETE FROM extra_field WHERE variable = 'special_course' AND item_type = $ extraFieldType " );
32
32
}
33
33
34
- public function down (Schema $ schema ): void
35
- {
36
- }
34
+ public function down (Schema $ schema ): void {}
37
35
}
You can’t perform that action at this time.
0 commit comments