Method post
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function post(): array
{
$db = \App\Db::getInstance('webservice');
$userData = (new \App\Db\Query())->from($this->controller->app['tables']['user'])
->where(['user_name' => $this->controller->request->get('userName'), 'status' => 1])
Missing class import via use statement (line '103', column '20'). Open
$userData = (new \App\Db\Query())->from($this->controller->app['tables']['user'])
- 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 '218', column '20'). Open
$userData = (new \App\Db\Query())->from($this->controller->app['tables']['user'])->where(['id' => $tokenData['params'][0], 'status' => 1])
- 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 '215', column '14'). Open
throw new \App\Exceptions\Security('ERR_TOKEN_DOES_NOT_EXIST', 405);
- 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 '110', column '14'). Open
throw new \Api\Core\Exception(\App\Language::translate('LBL_USER_MAIL_NOT_EXIST', 'Users'), 404);
- 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 '224', column '14'). Open
throw new \App\Exceptions\Security(\App\Language::translate('LBL_USER_MAIL_NOT_EXIST', 'Users'), 404);
- 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\Language' in method 'post'. Open
throw new \Api\Core\Exception(\App\Language::translate('LBL_USER_MAIL_NOT_EXIST', 'Users'), 404);
- 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\Tokens' in method 'post'. Open
$token = \App\Utils\Tokens::generate('\Api\WebserviceStandard\Users\ResetPassword', [$id], $expirationDate);
- 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 'post'. Open
\App\User::setCurrentUserId($userData['user_id']);
- 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\Tokens' in method 'put'. Open
$tokenData = \App\Utils\Tokens::get($token);
- 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\Mailer' in method 'post'. Open
$status = \App\Mailer::sendFromTemplate([
'template' => 'UsersResetPassword',
'to' => $userData['user_name'],
'siteUrl' => $this->controller->app['url'] ?: '',
'url' => $this->controller->app['url'] ? ($this->controller->app['url'] . 'index.php?module=Users&view=LoginPassReset&mode=token&token=' . $token) : '',
- 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\Db' in method 'post'. Open
$db = \App\Db::getInstance('webservice');
- 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\Db' in method 'put'. Open
$db = \App\Db::getInstance('webservice');
- 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\Encryption' in method 'put'. Open
'password' => \App\Encryption::createPasswordHash($this->controller->request->getRaw('password'), $this->controller->app['type']),
- 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
The method post uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$this->saveLoginHistory([
'status' => 'ERR_RESET_PASSWORD_REQUEST_SMTP_ERROR',
]);
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid using static access to class '\App\Language' in method 'put'. Open
throw new \App\Exceptions\Security(\App\Language::translate('LBL_USER_MAIL_NOT_EXIST', 'Users'), 404);
- 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 "status" 7 times. Open
->where(['user_name' => $this->controller->request->get('userName'), 'status' => 1])
- 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.
Possibly zero references to use statement for classlike/namespace OA
(\OpenApi\Annotations)
Open
use OpenApi\Annotations as OA;
- Exclude checks
Call to undeclared method \App\Db\Query::from
Open
$userData = (new \App\Db\Query())->from($this->controller->app['tables']['user'])
- Exclude checks
Doc-block of post
contains declared return type bool
which is incompatible with the return type array
declared in the signature Open
* @return bool
- Exclude checks
Call to method setCurrentUserId
from undeclared class \App\User
(Did you mean class \Tests\App\User) Open
\App\User::setCurrentUserId($userData['user_id']);
- Exclude checks
Call to undeclared method \App\Db\Query::from
Open
$userData = (new \App\Db\Query())->from($this->controller->app['tables']['user'])->where(['id' => $tokenData['params'][0], 'status' => 1])
- Exclude checks
Call to method createPasswordHash
from undeclared class \App\Encryption
(Did you mean class \Tests\App\Encryption) Open
'password' => \App\Encryption::createPasswordHash($this->controller->request->getRaw('password'), $this->controller->app['type']),
- Exclude checks
Avoid variables with short names like $db. Configured minimum length is 3. Open
$db = \App\Db::getInstance('webservice');
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
Avoid variables with short names like $id. Configured minimum length is 3. Open
$id = (int) $userData['id'];
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
Avoid variables with short names like $db. Configured minimum length is 3. Open
$db = \App\Db::getInstance('webservice');
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Post(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* required=true,
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\MediaType(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\JsonContent(ref="#/components/schemas/Users_Post_ResetPassword_Response"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\JsonContent(ref="#/components/schemas/Users_Post_ResetPassword_Response"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Schema(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* security={
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* description="User with this email address does not exist",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* required={"userName"},
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* {"basicAuth" : {}, "ApiKeyAuth" : {}}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\JsonContent(ref="#/components/schemas/Users_Post_ResetPassword_Request"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* response=200,
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\JsonContent(ref="#/components/schemas/Exception"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* summary="User password reset-Generatingandsendingaone-timetoken",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\RequestBody(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\MediaType(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Schema(ref="#/components/schemas/Users_Post_ResetPassword_Request")
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Parameter(name="X-ENCRYPTED", in="header", @OA\Schema(ref="#/components/schemas/Header-Encrypted"), required=true),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\MediaType(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* mediaType="multipart/form-data",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* mediaType="multipart/form-data",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* title="Users module - Users password reset request body",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* {"basicAuth" : {}, "ApiKeyAuth" : {}}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\RequestBody(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* description="Input data",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* mediaType="application/x-www-form-urlencoded",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Schema(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* description="User password reset - Generating and sending a one-time token",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* tags={"Users"},
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* security={
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* },
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Response(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* response=404,
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Schema(ref="#/components/schemas/Users_Post_ResetPassword_Request")
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Response(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Response(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* type="object",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* required={"userName"},
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* description="Input data",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Schema(ref="#/components/schemas/Users_Post_ResetPassword_Request")
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* description="Response",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* description="Response",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* description="User with this email address does not exist",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* schema="Users_Post_ResetPassword_Request",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* schema="Users_Post_ResetPassword_Request",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* summary="User password reset-Generatingandsendingaone-timetoken",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Schema(ref="#/components/schemas/Users_Post_ResetPassword_Request")
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\XmlContent(ref="#/components/schemas/Exception"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* type="object",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* path="/webservice/WebserviceStandard/Users/ResetPassword",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* description="User password reset - Generating and sending a one-time token",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* tags={"Users"},
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* },
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* response=200,
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* title="Content of responses from a given method",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="expirationDate", type="string", example="2019-10-07 08:32:38"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$db = \App\Db::getInstance('webservice');
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$token = \App\Utils\Tokens::generate('\Api\WebserviceStandard\Users\ResetPassword', [$id], $expirationDate);
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
'siteUrl' => $this->controller->app['url'] ?: '',
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* path="/webservice/WebserviceStandard/Users/ResetPassword",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* tags={"Users"},
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\JsonContent(ref="#/components/schemas/Users_Put_ResetPassword_Request"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* mediaType="application/x-www-form-urlencoded",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* response=200,
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\MediaType(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* mediaType="application/x-www-form-urlencoded",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\XmlContent(ref="#/components/schemas/Users_Post_ResetPassword_Response"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* type="object",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* required={"status", "result"},
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
*
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* description="User password reset - Password change",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* description="Input data",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* mediaType="multipart/form-data",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* response=200,
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Response(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* response=404,
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
'status' => 'LBL_RESET_PASSWORD_REQUEST',
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* Put method.
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @api
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Parameter(name="X-ENCRYPTED", in="header", @OA\Schema(ref="#/components/schemas/Header-Encrypted"), required=true),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\JsonContent(ref="#/components/schemas/Exception"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* title="Users module - Users password reset request body",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="userName", type="string", description="User name / email"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="userName", type="string", description="User name / email"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* title="Content of responses from a given method",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
'token' => $token,
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
]);
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
'status' => 'ERR_RESET_PASSWORD_REQUEST_SMTP_ERROR',
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
];
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\RequestBody(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* required=true,
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\MediaType(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Response(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$status = \App\Mailer::sendFromTemplate([
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
'mailerStatus' => $status,
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @return bool
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\JsonContent(ref="#/components/schemas/Users_Put_ResetPassword_Request"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Response(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* path="/webservice/WebserviceStandard/Users/ResetPassword",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* required=true,
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\JsonContent(ref="#/components/schemas/Users_Post_ResetPassword_Request"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Parameter(name="X-ENCRYPTED", in="header", @OA\Schema(ref="#/components/schemas/Header-Encrypted"), required=true),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\XmlContent(ref="#/components/schemas/Users_Post_ResetPassword_Response"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Response(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\XmlContent(ref="#/components/schemas/Exception"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* title="Users module - Users password reset response body",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="status", type="integer", enum={0, 1}, description="A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="expirationDate", type="string", example="2019-10-07 08:32:38"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$this->saveLoginHistory([
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
'status' => 'ERR_EMAIL_NOT_FOUND',
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
'url' => $this->controller->app['url'] ? ($this->controller->app['url'] . 'index.php?module=Users&view=LoginPassReset&mode=token&token=' . $token) : '',
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
*
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Put(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* {"basicAuth" : {}, "ApiKeyAuth" : {}}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* required=true,
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* description="Input data",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Schema(ref="#/components/schemas/Users_Put_ResetPassword_Request")
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Parameter(name="X-ENCRYPTED", in="header", @OA\Schema(ref="#/components/schemas/Header-Encrypted"), required=true),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Response(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\JsonContent(ref="#/components/schemas/Users_Put_ResetPassword_Response"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* description="User with this email address does not exist",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* schema="Users_Post_ResetPassword_Response",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* type="object",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* property="result",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="mailerStatus", type="boolean", example=true),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$userData = (new \App\Db\Query())->from($this->controller->app['tables']['user'])
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
if (!$userData) {
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
'expirationDate' => date('Y-m-d H:i:s (T P)', strtotime($expirationDate)),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
*
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\MediaType(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Schema(ref="#/components/schemas/Users_Put_ResetPassword_Request")
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\XmlContent(ref="#/components/schemas/Exception"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\XmlContent(ref="#/components/schemas/Exception"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* response=405,
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* description="ERR_TOKEN_DOES_NOT_EXIST",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
throw new \App\Exceptions\Security('ERR_TOKEN_DOES_NOT_EXIST', 405);
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
if (!$userData) {
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\JsonContent(ref="#/components/schemas/Exception"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\XmlContent(ref="#/components/schemas/Exception"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* type="object",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* property="result",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
]);
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* response=404,
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Schema(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
'to' => $userData['user_name'],
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
]);
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* description="User password reset - Password change",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Response(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Schema(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* schema="Users_Put_ResetPassword_Response",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* type="boolean",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$this->setAllUserData($userData);
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* type="object",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
public function post(): array
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$this->setAllUserData($userData);
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Put(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* summary="User password reset-Passwordchange",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* schema="Users_Put_ResetPassword_Request",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* schema="Users_Put_ResetPassword_Request",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* type="object",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
public function put(): bool
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* schema="Users_Post_ResetPassword_Response",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
->limit(1)->one($db);
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$expirationDate = date('Y-m-d H:i:s', strtotime('+1 hour'));
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* summary="User password reset-Passwordchange",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* },
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\RequestBody(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* mediaType="multipart/form-data",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\JsonContent(ref="#/components/schemas/Exception"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* schema="Users_Put_ResetPassword_Response",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="status", type="integer", enum={0, 1}, description="A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* title="Password reset status",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
throw new \Api\Core\Exception(\App\Language::translate('LBL_USER_MAIL_NOT_EXIST', 'Users'), 404);
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$this->saveLoginHistory([
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$this->saveLoginHistory([
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* {"basicAuth" : {}, "ApiKeyAuth" : {}}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\XmlContent(ref="#/components/schemas/Users_Put_ResetPassword_Response"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\JsonContent(ref="#/components/schemas/Exception"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* required={"status", "result"},
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* property="result",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* type="object",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
->where(['user_name' => $this->controller->request->get('userName'), 'status' => 1])
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
'expirationDate' => date('Y-m-d H:i:s (T P)', strtotime($expirationDate)),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
if ($status) {
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* security={
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* },
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\MediaType(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* type="object",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="token", type="string", description="A one-time password reset token"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="password", type="string", description="New password"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$tokenData = \App\Utils\Tokens::get($token);
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* required={"status", "result"},
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* tags={"Users"},
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Schema(ref="#/components/schemas/Users_Put_ResetPassword_Request")
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* description="Response",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\JsonContent(ref="#/components/schemas/Exception"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* response=405,
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* required={"status", "result"},
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
]);
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* path="/webservice/WebserviceStandard/Users/ResetPassword",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* security={
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* mediaType="application/x-www-form-urlencoded",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Response(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\XmlContent(ref="#/components/schemas/Users_Put_ResetPassword_Response"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* type="object",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* required={"token", "password"},
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Schema(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* type="boolean",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$db = \App\Db::getInstance('webservice');
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
->limit(1)->one($db);
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Schema(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* title="Users module - Users password reset response body",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="status", type="integer", enum={0, 1}, description="A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
{
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$id = (int) $userData['id'];
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
'template' => 'UsersResetPassword',
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
} else {
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
return [
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* title="Users module - Users password reset request body",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$this->updateUser([
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
'password' => \App\Encryption::createPasswordHash($this->controller->request->getRaw('password'), $this->controller->app['type']),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="mailerStatus", type="boolean", example=true),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
\App\User::setCurrentUserId($userData['user_id']);
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
]);
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\MediaType(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Schema(ref="#/components/schemas/Users_Put_ResetPassword_Request")
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* description="Response",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\JsonContent(ref="#/components/schemas/Users_Put_ResetPassword_Response"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* response=404,
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* description="User with this email address does not exist",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* required={"token", "password"},
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="password", type="string", description="New password"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* example=false,
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
'status' => 'LBL_RESET_PASSWORD_CHANGED',
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* description="ERR_TOKEN_DOES_NOT_EXIST",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Schema(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="status", type="integer", enum={0, 1}, description="A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$token = $this->controller->request->getByType('token', \App\Purifier::ALNUM);
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$userData = (new \App\Db\Query())->from($this->controller->app['tables']['user'])->where(['id' => $tokenData['params'][0], 'status' => 1])
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
'status' => 'ERR_EMAIL_NOT_FOUND',
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
throw new \App\Exceptions\Security(\App\Language::translate('LBL_USER_MAIL_NOT_EXIST', 'Users'), 404);
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="token", type="string", description="A one-time password reset token"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
{
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
]);
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* title="Users module - Users password reset request body",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Schema(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* title="Password reset status",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* example=false,
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$this->saveLoginHistory([
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$this->saveLoginHistory([
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
]);
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\XmlContent(ref="#/components/schemas/Exception"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* title="Users module - Users password reset response body",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* title="Users module - Users password reset response body",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* property="result",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
if (empty($tokenData) || empty($tokenData['params'][0])) {
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
return 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
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @api
- 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
/** {@inheritdoc} */
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
use \Api\Core\Traits\LoginHistory;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
protected function checkPermission(): 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
* Post method.
- 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
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/** {@inheritdoc} */
- 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
/** {@inheritdoc} */
- Exclude checks
Line exceeds 120 characters; contains 131 characters Open
* @OA\Parameter(name="X-ENCRYPTED", in="header", @OA\Schema(ref="#/components/schemas/Header-Encrypted"), required=true),
- Exclude checks
Line exceeds 120 characters; contains 131 characters Open
* @OA\Parameter(name="X-ENCRYPTED", in="header", @OA\Schema(ref="#/components/schemas/Header-Encrypted"), required=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
protected function checkPermissionToModule(): void
- Exclude checks
Line exceeds 120 characters; contains 189 characters Open
* @OA\Property(property="status", type="integer", enum={0, 1}, description="A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error"),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public $allowedMethod = ['POST', 'PUT'];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @OA\Post(
- Exclude checks
Line exceeds 120 characters; contains 189 characters Open
* @OA\Property(property="status", type="integer", enum={0, 1}, description="A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error"),
- Exclude checks
Line exceeds 120 characters; contains 164 characters Open
'url' => $this->controller->app['url'] ? ($this->controller->app['url'] . 'index.php?module=Users&view=LoginPassReset&mode=token&token=' . $token) : '',
- Exclude checks
Line exceeds 120 characters; contains 142 characters Open
'password' => \App\Encryption::createPasswordHash($this->controller->request->getRaw('password'), $this->controller->app['type']),
- Exclude checks
Line exceeds 120 characters; contains 146 characters Open
$userData = (new \App\Db\Query())->from($this->controller->app['tables']['user'])->where(['id' => $tokenData['params'][0], 'status' => 1])
- Exclude checks