mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-19 01:19:31 +00:00
Fixed code style.
This commit is contained in:
parent
2853e471c4
commit
d0b1024d80
212 changed files with 495 additions and 1005 deletions
|
|
@ -53,8 +53,6 @@ class AttachmentVoter extends ExtendedVoter
|
|||
* The current user (or the anonymous user) is passed by $user.
|
||||
*
|
||||
* @param string $attribute
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function voteOnUser($attribute, $subject, User $user): bool
|
||||
{
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ abstract class ExtendedVoter extends Voter
|
|||
}
|
||||
|
||||
// if the user is anonymous, we use the anonymous user.
|
||||
if (! $user instanceof User) {
|
||||
if (!$user instanceof User) {
|
||||
/** @var UserRepository $repo */
|
||||
$repo = $this->entityManager->getRepository(User::class);
|
||||
$user = $repo->getAnonymousUser();
|
||||
|
|
@ -93,8 +93,6 @@ abstract class ExtendedVoter extends Voter
|
|||
* The current user (or the anonymous user) is passed by $user.
|
||||
*
|
||||
* @param string $attribute
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
abstract protected function voteOnUser($attribute, $subject, User $user): bool;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,8 +52,6 @@ class GroupVoter extends ExtendedVoter
|
|||
* The current user (or the anonymous user) is passed by $user.
|
||||
*
|
||||
* @param string $attribute
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function voteOnUser($attribute, $subject, User $user): bool
|
||||
{
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ class LabelProfileVoter extends ExtendedVoter
|
|||
protected function supports($attribute, $subject)
|
||||
{
|
||||
if ($subject instanceof LabelProfile) {
|
||||
if (! isset(self::MAPPING[$attribute])) {
|
||||
if (!isset(self::MAPPING[$attribute])) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ class StructureVoter extends ExtendedVoter
|
|||
*/
|
||||
protected function instanceToPermissionName($subject): ?string
|
||||
{
|
||||
if (! is_string($subject)) {
|
||||
if (!is_string($subject)) {
|
||||
$class_name = get_class($subject);
|
||||
} else {
|
||||
$class_name = $subject;
|
||||
|
|
@ -122,8 +122,6 @@ class StructureVoter extends ExtendedVoter
|
|||
* The current user (or the anonymous user) is passed by $user.
|
||||
*
|
||||
* @param string $attribute
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function voteOnUser($attribute, $subject, User $user): bool
|
||||
{
|
||||
|
|
|
|||
|
|
@ -73,8 +73,6 @@ class UserVoter extends ExtendedVoter
|
|||
* The current user (or the anonymous user) is passed by $user.
|
||||
*
|
||||
* @param string $attribute
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function voteOnUser($attribute, $subject, User $user): bool
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue