Missing class import via use statement (line '176', column '16'). Open
$jwt = new \Ahc\Jwt\JWT(\App\Encryption::getInstance()->decrypt($this->get('secret')));
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
The method getUrl has a boolean flag argument $moderator, which is a certain sign of a Single Responsibility Principle violation. Open
public function getUrl(array $data, ?int $userId = null, ?bool $moderator = false): string
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
Missing class import via use statement (line '197', column '14'). Open
$jwt = new \Ahc\Jwt\JWT(\App\Encryption::getInstance()->decrypt($this->get('secret')));
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '68', column '19'). Open
$result = (new \App\Db\Query())->from(self::TABLE_NAME)->orderBy(['status' => SORT_DESC])->indexBy('id')->all();
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '214', column '14'). Open
$jwt = new \Ahc\Jwt\JWT(\App\Encryption::getInstance()->decrypt($this->get('secret')));
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Avoid using static access to class 'App\Cache' in method 'getServices'. Open
Cache::save($cacheName, '', $result, Cache::LONG);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\App\User' in method 'getUrl'. Open
$userModel = \App\User::getUserModel($userId);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class 'App\Cache' in method 'getServices'. Open
return Cache::get($cacheName, '');
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class 'App\Cache' in method 'getServices'. Open
if (!Cache::has($cacheName, '')) {
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\App\Utils' in method 'generateRoomName'. Open
], strtolower(\App\Utils::sanitizeSpecialChars($prefix, ' ')));
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Define a constant instead of duplicating this literal "secret" 3 times. Open
$jwt = new \Ahc\Jwt\JWT(\App\Encryption::getInstance()->decrypt($this->get('secret')));
- Read upRead up
- Exclude checks
Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.
On the other hand, constants can be referenced from many places, but only need to be updated in a single place.
Noncompliant Code Example
With the default threshold of 3:
function run() { prepare('action1'); // Non-Compliant - 'action1' is duplicated 3 times execute('action1'); release('action1'); }
Compliant Solution
ACTION_1 = 'action1'; function run() { prepare(ACTION_1); execute(ACTION_1); release(ACTION_1); }
Exceptions
To prevent generating some false-positives, literals having less than 5 characters are excluded.
Call to method getInstance
from undeclared class \App\Encryption
(Did you mean class \Tests\App\Encryption) Open
$jwt = new \Ahc\Jwt\JWT(\App\Encryption::getInstance()->decrypt($this->get('secret')));
- Exclude checks
Call to method __construct
from undeclared class \Ahc\Jwt\JWT
Open
$jwt = new \Ahc\Jwt\JWT(\App\Encryption::getInstance()->decrypt($this->get('secret')));
- Exclude checks
Call to method decode
from undeclared class \Ahc\Jwt\JWT
Open
return $jwt->decode($output['jwt']);
- Exclude checks
Call to method __construct
from undeclared class \Ahc\Jwt\JWT
Open
$jwt = new \Ahc\Jwt\JWT(\App\Encryption::getInstance()->decrypt($this->get('secret')));
- Exclude checks
Call to undeclared method \App\Db\Query::from
Open
$result = (new \App\Db\Query())->from(self::TABLE_NAME)->orderBy(['status' => SORT_DESC])->indexBy('id')->all();
- Exclude checks
Call to method __construct
from undeclared class \Ahc\Jwt\JWT
Open
$jwt = new \Ahc\Jwt\JWT(\App\Encryption::getInstance()->decrypt($this->get('secret')));
- Exclude checks
Catching undeclared class \Ahc\Jwt\JWTException
Open
} catch (\Ahc\Jwt\JWTException $e) {
- Exclude checks
Doc-block of getToken
contains declared return type void
which is incompatible with the return type string
declared in the signature Open
* @return void
- Exclude checks
Call to method decode
from undeclared class \Ahc\Jwt\JWT
Open
$jwt->decode($output['jwt']);
- Exclude checks
Call to method encode
from undeclared class \Ahc\Jwt\JWT
Open
return $jwt->encode($data);
- Exclude checks
Call to method getUserModel
from undeclared class \App\User
(Did you mean class \Tests\App\User) Open
$userModel = \App\User::getUserModel($userId);
- Exclude checks
Call to method getInstance
from undeclared class \App\Encryption
(Did you mean class \Tests\App\Encryption) Open
$jwt = new \Ahc\Jwt\JWT(\App\Encryption::getInstance()->decrypt($this->get('secret')));
- Exclude checks
Argument 1 (pattern)
is array{/[^a-z0-9 ]/:Closure():'',/\b[a-z]/:Closure(mixed):(false|string),/[\s]/:Closure():''}
but \preg_replace_callback_array()
takes array<string></string>
Open
'/[^a-z0-9 ]/' => function () {
- Exclude checks
Call to method getInstance
from undeclared class \App\Encryption
(Did you mean class \Tests\App\Encryption) Open
$jwt = new \Ahc\Jwt\JWT(\App\Encryption::getInstance()->decrypt($this->get('secret')));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'email' => $userModel->getDetail('email1'),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$instance->setData(self::getService($serviceId));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Gets URL address.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param array $data
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$instance = new self();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($userId) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Generate room name.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
private const STATUS_ACTIVE = 1;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return Cache::get($cacheName, '');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (self::DEFAULT_SERVICE === $serviceId) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'avatar' => '',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function generateRoomName(string $prefix = ''): string
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Gets services data.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Gets service data.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param string $prefix
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @return array
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Cache::save($cacheName, '', $result, Cache::LONG);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public const TABLE_NAME = 's_#__meeting_services';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @var int Default service ID
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public static function getInstance(int $serviceId = self::DEFAULT_SERVICE): self
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @return bool
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param int|null $userId
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$data['moderator'] = $moderator;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @return string
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$path = parse_url($url, PHP_URL_PATH);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Check URL.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @return array
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Table name.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public const DEFAULT_SERVICE = 0;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$result = (new \App\Db\Query())->from(self::TABLE_NAME)->orderBy(['status' => SORT_DESC])->indexBy('id')->all();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @return array
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'/[\s]/' => function () {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param string $url
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @return bool
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Gets data from URL.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$cacheName = 'MeetingService::getServices';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public static function getDefaultService(): array
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return current(self::getServices()) ?: [];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @return string
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$prefix = preg_replace_callback_array([
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'/\b[a-z]/' => function ($matches) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Gets room name from URL.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
private function getToken(array $data): string
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!Cache::has($cacheName, '')) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return self::getServices()[$serviceId] ?? [];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return '';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @return string
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param string $url
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @return array
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public static function getService(int $serviceId): array
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Gets default service data.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function getUrl(array $data, ?int $userId = null, ?bool $moderator = false): string
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$data['context']['user'] = [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'/[^a-z0-9 ]/' => function () {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$query = parse_url($url, PHP_URL_QUERY);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$jwt = new \Ahc\Jwt\JWT(\App\Encryption::getInstance()->decrypt($this->get('secret')));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param array $data
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @return void
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $jwt->encode($data);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function isActive(): bool
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return self::STATUS_ACTIVE === $this->get('status');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public static function getServices(): array
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return self::getDefaultService();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param bool|null $moderator
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return mb_strtoupper($matches[0]);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$result = false;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $jwt->decode($output['jwt']);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @var int Status active
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'name' => $userModel->getName(),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'id' => $userId,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $this->get('url') . $data['room'] . '?jwt=' . $this->getToken($data);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
},
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function validateUrl(string $url): bool
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Return object instance.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param int $serviceId
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $instance;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Checks if service is active.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$userModel = \App\User::getUserModel($userId);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
parse_str($query, $output);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
], strtolower(\App\Utils::sanitizeSpecialChars($prefix, ' ')));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
parse_str($query, $output);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$data['exp'] = $data['exp'] ?? strtotime("+{$this->get('duration')} minutes");
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
},
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} catch (\Ahc\Jwt\JWTException $e) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @return self
- Exclude checks
Line exceeds 120 characters; contains 124 characters Open
$result = (new \App\Db\Query())->from(self::TABLE_NAME)->orderBy(['status' => SORT_DESC])->indexBy('id')->all();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param int $serviceId
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$data['room'] = $data['room'] ?? $this->generateRoomName();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return '';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
[$msec, $sec] = explode(' ', microtime());
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$result = true;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Gets token.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
},
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $prefix . 'ID' . str_replace('.', '', $sec . $msec) . random_int(0, 1000);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$result = false;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$jwt = new \Ahc\Jwt\JWT(\App\Encryption::getInstance()->decrypt($this->get('secret')));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function getRoomFromUrl(string $url): string
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!empty($output['jwt']) && 0 === strpos($url, $this->get('url'))) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
try {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function getDataFromUrl(string $url): array
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$data['aud'] = $this->get('key');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$data['iss'] = $this->get('key');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$jwt = new \Ahc\Jwt\JWT(\App\Encryption::getInstance()->decrypt($this->get('secret')));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return \substr($path, 1);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$jwt->decode($output['jwt']);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $result;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$query = parse_url($url, PHP_URL_QUERY);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$data['sub'] = parse_url($this->get('url'))['host'] ?? '';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param string $url
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks