Skip to content
Snippets Groups Projects
Commit 042e2087 authored by Georgi's avatar Georgi
Browse files

[BUGFIX] PHPStan code quality

parent 6e007887
No related branches found
No related tags found
No related merge requests found
...@@ -26,22 +26,18 @@ ...@@ -26,22 +26,18 @@
namespace SGalinski\SgVimeo\Event; namespace SGalinski\SgVimeo\Event;
final class AfterFilterVideosEvent final class AfterFilterVideosEvent {
{
private array $response; private array $response;
public function __construct(array $response) public function __construct(array $response) {
{
$this->response = $response; $this->response = $response;
} }
public function getResponse(): array public function getResponse(): array {
{
return $this->response; return $this->response;
} }
public function setResponse(array $response): void public function setResponse(array $response): void {
{
$this->response = $response; $this->response = $response;
} }
} }
...@@ -26,22 +26,18 @@ ...@@ -26,22 +26,18 @@
namespace SGalinski\SgVimeo\Event; namespace SGalinski\SgVimeo\Event;
final class AfterMapCustomThumbnailsEvent final class AfterMapCustomThumbnailsEvent {
{
private array $response; private array $response;
public function __construct(array $response) public function __construct(array $response) {
{
$this->response = $response; $this->response = $response;
} }
public function getResponse(): array public function getResponse(): array {
{
return $this->response; return $this->response;
} }
public function setResponse(array $response): void public function setResponse(array $response): void {
{
$this->response = $response; $this->response = $response;
} }
} }
...@@ -26,22 +26,18 @@ ...@@ -26,22 +26,18 @@
namespace SGalinski\SgVimeo\Event; namespace SGalinski\SgVimeo\Event;
final class AfterVimeoCallEvent final class AfterVimeoCallEvent {
{
private array $response; private array $response;
public function __construct(array $response) public function __construct(array $response) {
{
$this->response = $response; $this->response = $response;
} }
public function getResponse(): array public function getResponse(): array {
{
return $this->response; return $this->response;
} }
public function setResponse(array $response): void public function setResponse(array $response): void {
{
$this->response = $response; $this->response = $response;
} }
} }
...@@ -26,35 +26,29 @@ ...@@ -26,35 +26,29 @@
namespace SGalinski\SgVimeo\Event; namespace SGalinski\SgVimeo\Event;
final class BeforeVimeoCallEvent final class BeforeVimeoCallEvent {
{
private $id; private $id;
private $maxResultsWithFilters; private $maxResultsWithFilters;
private string $apiKey; private string $apiKey;
public function __construct($id, $maxResultsWithFilters) public function __construct($id, $maxResultsWithFilters) {
{
$this->id = $id; $this->id = $id;
$this->maxResultsWithFilters = $maxResultsWithFilters; $this->maxResultsWithFilters = $maxResultsWithFilters;
} }
public function getId() public function getId() {
{
return $this->id; return $this->id;
} }
public function setId($id): void public function setId($id): void {
{
$this->id = $id; $this->id = $id;
} }
public function getMaxResultsWithFilters() public function getMaxResultsWithFilters() {
{
return $this->maxResultsWithFilters; return $this->maxResultsWithFilters;
} }
public function setMaxResultsWithFilters($maxResultsWithFilters): void public function setMaxResultsWithFilters($maxResultsWithFilters): void {
{
$this->maxResultsWithFilters = $maxResultsWithFilters; $this->maxResultsWithFilters = $maxResultsWithFilters;
} }
} }
...@@ -27,10 +27,8 @@ namespace SGalinski\SgVimeo\EventListeners; ...@@ -27,10 +27,8 @@ namespace SGalinski\SgVimeo\EventListeners;
use SGalinski\SgVimeo\Event\AfterFilterVideosEvent; use SGalinski\SgVimeo\Event\AfterFilterVideosEvent;
class AfterFilterVideosEventListener class AfterFilterVideosEventListener {
{ public function __invoke(AfterFilterVideosEvent $event): void {
public function __invoke(AfterFilterVideosEvent $event): void
{
// Modify the response if needed // Modify the response if needed
$response = $event->getResponse(); $response = $event->getResponse();
// Add some custom processing here // Add some custom processing here
......
...@@ -27,10 +27,8 @@ namespace SGalinski\SgVimeo\EventListeners; ...@@ -27,10 +27,8 @@ namespace SGalinski\SgVimeo\EventListeners;
use SGalinski\SgVimeo\Event\AfterMapCustomThumbnailsEvent; use SGalinski\SgVimeo\Event\AfterMapCustomThumbnailsEvent;
class AfterMapCustomThumbnailsEventListener class AfterMapCustomThumbnailsEventListener {
{ public function __invoke(AfterMapCustomThumbnailsEvent $event): void {
public function __invoke(AfterMapCustomThumbnailsEvent $event): void
{
$response = $event->getResponse(); $response = $event->getResponse();
// Add a custom thumbnail URL // Add a custom thumbnail URL
foreach ($response['items'] as $key => $item) { foreach ($response['items'] as $key => $item) {
......
...@@ -27,10 +27,8 @@ namespace SGalinski\SgVimeo\EventListeners; ...@@ -27,10 +27,8 @@ namespace SGalinski\SgVimeo\EventListeners;
use SGalinski\SgVimeo\Event\AfterVimeoCallEvent; use SGalinski\SgVimeo\Event\AfterVimeoCallEvent;
class AfterVimeoCallEventListener class AfterVimeoCallEventListener {
{ public function __invoke(AfterVimeoCallEvent $event): void {
public function __invoke(AfterVimeoCallEvent $event): void
{
$response = $event->getResponse(); $response = $event->getResponse();
// Add custom data // Add custom data
$response['customData'] = 'This is some custom data'; $response['customData'] = 'This is some custom data';
......
...@@ -30,10 +30,8 @@ use SGalinski\SgVimeo\Event\BeforeVimeoCallEvent; ...@@ -30,10 +30,8 @@ use SGalinski\SgVimeo\Event\BeforeVimeoCallEvent;
/** /**
* Called before we call the Vimeo API * Called before we call the Vimeo API
*/ */
class BeforeVimeoCallEventListener class BeforeVimeoCallEventListener {
{ public function __invoke(BeforeVimeoCallEvent $event): void {
public function __invoke(BeforeVimeoCallEvent $event): void
{
// Change the max results because we want to filter some more // Change the max results because we want to filter some more
$event->setMaxResultsWithFilters($event->getMaxResultsWithFilters() + 10); $event->setMaxResultsWithFilters($event->getMaxResultsWithFilters() + 10);
} }
......
...@@ -26,10 +26,10 @@ ...@@ -26,10 +26,10 @@
namespace SGalinski\SgVimeo\Service; namespace SGalinski\SgVimeo\Service;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
use Psr\Log\LoggerAwareInterface; use Psr\Log\LoggerAwareInterface;
use Psr\Log\LoggerAwareTrait; use Psr\Log\LoggerAwareTrait;
use TYPO3\CMS\Core\Cache\Frontend\FrontendInterface; use TYPO3\CMS\Core\Cache\Frontend\FrontendInterface;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Core\Utility\GeneralUtility;
// Fallback to the PHAR archive containing the dependency on the vimeo API in case // Fallback to the PHAR archive containing the dependency on the vimeo API in case
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment