@@ -77,7 +77,7 @@ public function hasAccess($permissions, $all = true)
7777 // Now, let's check if the permission ends in a wildcard "*" symbol.
7878 // If it does, we'll check through all the merged permissions to see
7979 // if a permission exists which matches the wildcard.
80- if ((strlen ($ permission ) > 1 ) && ends_with ($ permission , '* ' )) {
80+ if ((strlen ($ permission ) > 1 ) && str_ends_with ($ permission , '* ' )) {
8181 $ matched = false ;
8282
8383 foreach ($ rolePermissions as $ rolePermission => $ value ) {
@@ -88,7 +88,7 @@ public function hasAccess($permissions, $all = true)
8888 // exactly match our permission, but starts with it.
8989 if (
9090 $ checkPermission !== $ rolePermission &&
91- starts_with ($ rolePermission , $ checkPermission ) &&
91+ str_starts_with ($ rolePermission , $ checkPermission ) &&
9292 (int ) $ value === 1
9393 ) {
9494 $ matched = true ;
@@ -99,7 +99,7 @@ public function hasAccess($permissions, $all = true)
9999 // Now, let's check if the permission starts in a wildcard "*" symbol.
100100 // If it does, we'll check through all the merged permissions to see
101101 // if a permission exists which matches the wildcard.
102- elseif ((strlen ($ permission ) > 1 ) && starts_with ($ permission , '* ' )) {
102+ elseif ((strlen ($ permission ) > 1 ) && str_starts_with ($ permission , '* ' )) {
103103 $ matched = false ;
104104
105105 foreach ($ rolePermissions as $ rolePermission => $ value ) {
@@ -110,7 +110,7 @@ public function hasAccess($permissions, $all = true)
110110 // exactly match our permission, but ends with it.
111111 if (
112112 $ checkPermission !== $ rolePermission &&
113- ends_with ($ rolePermission , $ checkPermission ) &&
113+ str_ends_with ($ rolePermission , $ checkPermission ) &&
114114 (int ) $ value === 1
115115 ) {
116116 $ matched = true ;
@@ -123,7 +123,7 @@ public function hasAccess($permissions, $all = true)
123123
124124 foreach ($ rolePermissions as $ rolePermission => $ value ) {
125125 // This time check if the rolePermission ends in wildcard "*" symbol.
126- if ((strlen ($ rolePermission ) > 1 ) && ends_with ($ rolePermission , '* ' )) {
126+ if ((strlen ($ rolePermission ) > 1 ) && str_ends_with ($ rolePermission , '* ' )) {
127127 $ matched = false ;
128128
129129 // Strip the '*' off the end of the permission.
@@ -133,7 +133,7 @@ public function hasAccess($permissions, $all = true)
133133 // exactly match our permission, but starts with it.
134134 if (
135135 $ checkGroupPermission !== $ permission &&
136- starts_with ($ permission , $ checkGroupPermission ) &&
136+ str_starts_with ($ permission , $ checkGroupPermission ) &&
137137 (int ) $ value === 1
138138 ) {
139139 $ matched = true ;
0 commit comments