Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
TYPO3
sg_rest
Commits
e611c249
Commit
e611c249
authored
Apr 04, 2022
by
Matthias Adrowski
Browse files
[TASK] Alot of phpstan issues fixed
parent
f70626a7
Changes
9
Hide whitespace changes
Inline
Side-by-side
Classes/Controller/AbstractRestController.php
View file @
e611c249
...
...
@@ -58,7 +58,7 @@ abstract class AbstractRestController extends ActionController {
protected
$defaultViewObjectName
=
JsonView
::
class
;
/**
* @var
string
* @var
array
*/
protected
$viewFormatToObjectNameMap
=
[
'json'
=>
JsonView
::
class
...
...
Classes/Domain/Model/FrontendUser.php
View file @
e611c249
...
...
@@ -50,7 +50,7 @@ class FrontendUser extends ExtbaseFrontendUser {
/**
* Setter for auth token
*
* @param $token
* @param
string
$token
* @return void
*/
public
function
setAuthToken
(
$token
):
void
{
...
...
Classes/Middleware/AbstractRestMiddleware.php
View file @
e611c249
...
...
@@ -157,7 +157,7 @@ abstract class AbstractRestMiddleware implements LoggerAwareInterface, Middlewar
/**
* Method returns the requested action for the rest controller. If no
*
* @param $method
* @param
string
$method
* @return string
*/
protected
function
getCallableActionName
(
$method
):
string
{
...
...
@@ -183,7 +183,7 @@ abstract class AbstractRestMiddleware implements LoggerAwareInterface, Middlewar
}
/**
* @param $data
* @param
mixed
$data
* @param int $statusCode
* @return Response
*/
...
...
Classes/Service/Authentication/AbstractAuthenticationService.php
View file @
e611c249
...
...
@@ -60,7 +60,7 @@ abstract class AbstractAuthenticationService implements AuthenticationServiceInt
/**
* Verify if the authenticated user has access to the given apikey.
*
* @param $apiKey
* @param
string
$apiKey
* @return bool
*/
public
function
verifyUserAccess
(
$apiKey
):
bool
{
...
...
Classes/Service/Authentication/AuthenticationServiceInterface.php
View file @
e611c249
...
...
@@ -43,7 +43,7 @@ interface AuthenticationServiceInterface {
/**
* Verify if the authenticated user has access to the given apikey.
*
* @param $apiKey
* @param
string
$apiKey
* @return bool
*/
public
function
verifyUserAccess
(
string
$apiKey
):
bool
;
...
...
Classes/Service/Authentication/BasicAuthenticationService.php
View file @
e611c249
...
...
@@ -69,7 +69,7 @@ class BasicAuthenticationService extends AbstractAuthenticationService implement
)
)
->
execute
()
->
fetchAll
()[
0
];
->
fetchAll
Associative
()[
0
];
if
(
!
empty
(
$user
))
{
$this
->
authenticatedUser
=
$user
;
...
...
@@ -103,7 +103,7 @@ class BasicAuthenticationService extends AbstractAuthenticationService implement
)
)
->
execute
()
->
fetchAll
()[
0
];
->
fetchAll
Associative
()[
0
];
if
(
!
$frontendUser
)
{
throw
new
\
Exception
(
'The requested user does not exist or is invalid'
,
500
);
...
...
Classes/Service/Authentication/BearerAuthenticationService.php
View file @
e611c249
...
...
@@ -64,7 +64,7 @@ class BearerAuthenticationService extends AbstractAuthenticationService implemen
}
/**
* @param $bearerToken
* @param
string
$bearerToken
* @return bool
* @throws Exception
*/
...
...
@@ -93,7 +93,7 @@ class BearerAuthenticationService extends AbstractAuthenticationService implemen
)
)
->
execute
()
->
fetchAll
()[
0
];
->
fetchAll
Associative
()[
0
];
if
(
!
empty
(
$user
))
{
$this
->
authenticatedUser
=
$user
;
...
...
Classes/Service/BearerTokenService.php
View file @
e611c249
...
...
@@ -65,7 +65,7 @@ class BearerTokenService implements SingletonInterface {
* Will default to PHP time() value if null.
* @var int
*/
public
$timestamp
=
NULL
;
public
$timestamp
;
/**
* @var array
...
...
ext_emconf.php
View file @
e611c249
<?php
$EM_CONF
[
$_EXTKEY
]
=
[
$EM_CONF
[
'sg_rest'
]
=
[
'title'
=>
'REST API basis'
,
'description'
=>
'The extension provieds a basis REST environment. New endpoints provides a REST environment, so that other extensions only need to register them.'
,
'category'
=>
'misc'
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment