From 19fb768a1eb8b84bffc90ae89a28cbf6c572c352 Mon Sep 17 00:00:00 2001 From: Angel Fernando Quiroz Campos Date: Wed, 11 Aug 2021 11:57:51 -0500 Subject: [PATCH] Minor - Format code --- src/CoreBundle/Entity/User.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/CoreBundle/Entity/User.php b/src/CoreBundle/Entity/User.php index 5b57a6911c..54f3ffd6bf 100644 --- a/src/CoreBundle/Entity/User.php +++ b/src/CoreBundle/Entity/User.php @@ -57,6 +57,7 @@ use UserManager; 'security' => "is_granted('ROLE_ADMIN')", ], ], + iri: 'http://schema.org/Person', itemOperations: [ 'get' => [ 'security' => "is_granted('ROLE_ADMIN')", @@ -68,7 +69,6 @@ use UserManager; 'security' => "is_granted('ROLE_ADMIN')", ], ], - iri: 'http://schema.org/Person', attributes: [ 'security' => 'is_granted("ROLE_USER")', ], @@ -85,7 +85,6 @@ use UserManager; 'lastname' => 'partial', ])] #[ApiFilter(BooleanFilter::class, properties: ['isActive'])] - class User implements UserInterface, EquatableInterface, ResourceInterface, ResourceIllustrationInterface, PasswordAuthenticatedUserInterface, LegacyPasswordAuthenticatedUserInterface { use TimestampableEntity; @@ -1406,8 +1405,8 @@ class User implements UserInterface, EquatableInterface, ResourceInterface, Reso public function isPasswordRequestNonExpired(int $ttl): bool { - return $this->getPasswordRequestedAt() instanceof DateTime && - $this->getPasswordRequestedAt()->getTimestamp() + $ttl > time(); + return $this->getPasswordRequestedAt() instanceof DateTime + && $this->getPasswordRequestedAt()->getTimestamp() + $ttl > time(); } public function getPasswordRequestedAt(): ?DateTime @@ -2437,10 +2436,8 @@ class User implements UserInterface, EquatableInterface, ResourceInterface, Reso * Reimplemented using the ORM cache. * * @param null|UserCourseCategory $userCourseCategory the user_course_category - * - * @return int|mixed */ - public function getMaxSortValue(?UserCourseCategory $userCourseCategory = null) + public function getMaxSortValue(?UserCourseCategory $userCourseCategory = null): int { $categoryCourses = $this->courses->matching( Criteria::create()