Converts 'strpos()' calls to improve code readability.
Signed-off-by: Faraz Samapoor <fsamapoor@gmail.com>
This commit is contained in:
@@ -51,11 +51,11 @@ class BeforeTemplateRenderedListener implements IEventListener {
|
||||
Util::addStyle('deck', 'deck');
|
||||
|
||||
$pathInfo = $this->request->getPathInfo();
|
||||
if (strpos($pathInfo, '/apps/calendar') === 0) {
|
||||
if (str_starts_with($pathInfo, '/apps/calendar')) {
|
||||
Util::addScript('deck', 'deck-calendar');
|
||||
}
|
||||
|
||||
if (strpos($pathInfo, '/call/') === 0 || strpos($pathInfo, '/apps/spreed') === 0) {
|
||||
if (str_starts_with($pathInfo, '/call/') || str_starts_with($pathInfo, '/apps/spreed')) {
|
||||
Util::addScript('deck', 'deck-talk');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ class ResourceAdditionalScriptsListener implements IEventListener {
|
||||
return;
|
||||
}
|
||||
|
||||
if (strpos($this->request->getPathInfo(), '/call/') === 0) {
|
||||
if (str_starts_with($this->request->getPathInfo(), '/call/')) {
|
||||
// Talk integration has its own entrypoint which already includes collections handling
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user