Commit 3dbb36e7 authored by Tino Goratsch's avatar Tino Goratsch

code style fixes

parent c33ace53
......@@ -82,6 +82,7 @@ class Libraries
/**
* Libraries constructor.
*
* @param \ACP3\Core\Http\RequestInterface $request
* @param EventDispatcherInterface $eventDispatcher
*/
......@@ -171,6 +172,7 @@ class Libraries
/**
* @param array $values
*
* @return bool
*/
private function includeInXmlHttpRequest(array $values): bool
......
<?php
/**
* Copyright (c) by the ACP3 Developers.
* See the LICENCE file at the top-level module directory for licencing details.
* See the LICENSE file at the top-level module directory for licensing details.
*/
namespace ACP3\Modules\ACP3\Share\Controller\Frontend\Index;
use ACP3\Core\Controller\Context\FrontendContext;
use ACP3\Core\Controller\Exception\ResultNotExistsException;
use ACP3\Modules\ACP3\Comments\Controller\Frontend\Index\AbstractFrontendAction;
......@@ -31,6 +31,7 @@ class Rate extends AbstractFrontendAction
/**
* Rate constructor.
*
* @param \ACP3\Core\Controller\Context\FrontendContext $context
* @param \ACP3\Modules\ACP3\Share\Model\Repository\ShareRepository $shareRepository
* @param \ACP3\Modules\ACP3\Share\Model\Repository\ShareRatingsRepository $shareRatingsRepository
......@@ -52,7 +53,9 @@ class Rate extends AbstractFrontendAction
/**
* @param int $id
* @param int $stars
*
* @return array
*
* @throws \ACP3\Core\Controller\Exception\ResultNotExistsException
* @throws \Doctrine\DBAL\DBALException
*/
......@@ -67,11 +70,11 @@ class Rate extends AbstractFrontendAction
$this->shareRatingModel->save([
'share_id' => $id,
'stars' => $stars
'stars' => $stars,
]);
return [
'rating' => $this->shareRatingsRepository->getRatingStatistics($id)
'rating' => $this->shareRatingsRepository->getRatingStatistics($id),
];
}
}
......@@ -15,7 +15,9 @@ class ShareRepository extends Core\Model\Repository\AbstractRepository
/**
* @param int $id
*
* @return bool
*
* @throws \Doctrine\DBAL\DBALException
*/
public function resultExistsById(int $id): bool
......@@ -28,7 +30,9 @@ class ShareRepository extends Core\Model\Repository\AbstractRepository
/**
* @param string $uri
*
* @return array
*
* @throws \Doctrine\DBAL\DBALException
*/
public function getOneByUri(string $uri): array
......@@ -38,6 +42,7 @@ class ShareRepository extends Core\Model\Repository\AbstractRepository
/**
* @return array
*
* @throws \Doctrine\DBAL\DBALException
*/
public function getAll(): array
......
......@@ -68,7 +68,7 @@
}
}
},
lowerCaseFirstLetter(string) {
lowerCaseFirstLetter: function (string) {
return string.charAt(0).toLowerCase() + string.slice(1);
},
findSubmitButton: function () {
......@@ -265,7 +265,7 @@
$(this.settings.targetElement).html(responseData);
}
},
rebindHandlers: function(hash) {
rebindHandlers: function (hash) {
var $bindingTarget = (hash && $(hash).length) ? $(hash) : $(this.settings.targetElement);
$bindingTarget.find('[data-ajax-form="true"]').formSubmit();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment