File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -83,10 +83,10 @@ public function up()
8383 ->map (function ($ value ) {
8484 return self ::$ permissionsMap [$ value ] ?? null ;
8585 })->filter (function ($ value ) {
86- return !is_null ($ value ) && $ value !== Permission::ACTION_WEBSOCKET_CONNECT ;
86+ return ! is_null ($ value ) && $ value !== Permission::ACTION_WEBSOCKET_CONNECT ;
8787 })
8888 // All subusers get this permission, so make sure it gets pushed into the array.
89- ->merge ([ Permission::ACTION_WEBSOCKET_CONNECT ])
89+ ->merge ([Permission::ACTION_WEBSOCKET_CONNECT ])
9090 ->unique ()
9191 ->values ()
9292 ->toJson ();
@@ -103,12 +103,12 @@ public function up()
103103 */
104104 public function down ()
105105 {
106- $ flipped = array_flip (self ::$ permissionsMap );
106+ $ flipped = array_flip (array_filter ( self ::$ permissionsMap) );
107107
108108 foreach (DB ::select ('SELECT id, permissions FROM subusers ' ) as $ datum ) {
109109 $ values = [];
110110 foreach (json_decode ($ datum ->permissions , true ) as $ permission ) {
111- if (!empty ($ v = $ flipped [$ permission ])) {
111+ if (! empty ($ v = $ flipped [$ permission ])) {
112112 $ values [] = $ datum ->id ;
113113 $ values [] = $ v ;
114114 }
You can’t perform that action at this time.
0 commit comments