Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correction de docblocks #1368

Merged
merged 1 commit into from
Dec 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class UserRepository extends Repository implements MetadataInitializer, UserProv

/**
* @param string $username
* @return User|UserInterface
* @return User
* @throws \CCMBenchmark\Ting\Query\QueryException
*/
public function loadUserByUsername($username)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public function __invoke(Request $request)
Assertion::isInstanceOf($user, User::class);
$companyId = $user->getCompanyId();
}
/** @var $company CompanyMember */
/** @var CompanyMember $company */
$company = $this->companyMemberRepository->get($companyId);
if ($company === null) {
throw new NotFoundHttpException('Company not found');
Expand Down Expand Up @@ -199,7 +199,7 @@ private function removeInvitation($emailToDelete, CollectionInterface $pendingIn

private function resendInvitation($emailToSend, CollectionInterface $pendingInvitations, CompanyMember $company)
{
/** @var $invitationToSend CompanyMemberInvitation */
/** @var CompanyMemberInvitation $invitationToSend */
$invitationToSend = $this->collectionFilter->findOne($pendingInvitations, 'getEmail', $emailToSend);
if ($invitationToSend !== null) {
$this->invitationMail->sendInvitation($company, $invitationToSend);
Expand All @@ -223,7 +223,7 @@ private function promoteUser($emailToPromote, CollectionInterface $users)

private function disproveUser($emailToDisapprove, CollectionInterface $users)
{
/** @var $user User */
/** @var User $user */
$user = $this->collectionFilter->findOne($users, 'getEmail', $emailToDisapprove);
/** @var User $connectedUser */
$connectedUser = $this->security->getUser();
Expand All @@ -241,7 +241,7 @@ private function disproveUser($emailToDisapprove, CollectionInterface $users)

private function removeUser($emailToRemove, CollectionInterface $users)
{
/** @var $user User */
/** @var User $user */
$user = $this->collectionFilter->findOne($users, 'getEmail', $emailToRemove);
/** @var User $connectedUser */
$connectedUser = $this->security->getUser();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public function historyAction()
public function generateAction($techletterId, Request $request)
{
/**
* @var $sending Techletter\Sending
* @var Techletter\Sending $sending
*/
$sending = $this->sendingRepository->get($techletterId);
if ($sending === null) {
Expand Down Expand Up @@ -231,7 +231,7 @@ public function previewAction(Request $request)
{
$sendingId = $request->request->getInt('techletterId');
/**
* @var $sending Techletter\Sending
* @var Techletter\Sending $sending
*/
$sending = $this->sendingRepository->get($sendingId);

Expand Down Expand Up @@ -263,7 +263,7 @@ public function sendTestAction(Request $request)
{
$sendingId = $request->query->getInt('techletterId');
/**
* @var $sending Techletter\Sending
* @var Techletter\Sending $sending
*/
$sending = $this->sendingRepository->get($sendingId);

Expand Down
2 changes: 1 addition & 1 deletion sources/AppBundle/Controller/BlocksHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class BlocksHandler
* sidebar: string,
* social: string,
* footer: string
* }
* } $blocks
*
* @return void
*/
Expand Down
14 changes: 7 additions & 7 deletions sources/AppBundle/Controller/BlogController.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function programAction(Request $request, $eventSlug)
$event = $this->checkEventSlug($eventSlug);

/**
* @var $talkRepository TalkRepository
* @var TalkRepository $talkRepository
*/
$talkRepository = $this->get('ting')->get(TalkRepository::class);
$jsonld = $this->get(\AppBundle\Event\JsonLd::class)->getDataForEvent($event);
Expand Down Expand Up @@ -59,7 +59,7 @@ public function planningAction(Request $request, $eventSlug)
}

/**
* @var $talkRepository TalkRepository
* @var TalkRepository $talkRepository
*/
$talkRepository = $this->get('ting')->get(TalkRepository::class);
$applyPublicationDateFilters = $request->query->getBoolean('apply-publication-date-filters', true);
Expand All @@ -80,17 +80,17 @@ public function planningAction(Request $request, $eventSlug)

foreach ($talks as $talkWithData) {
/**
* @var $talk Talk
* @var Talk $talk
*/
$talk = $talkWithData['talk'];

/**
* @var $planning Planning
* @var Planning $planning
*/
$planning = $talkWithData['planning'];

/**
* @var $room Room
* @var Room $room
*/
$room = $talkWithData['room'];

Expand Down Expand Up @@ -162,7 +162,7 @@ public function planningAction(Request $request, $eventSlug)
public function talkWidgetAction(Request $request)
{
/**
* @var $talkRepository TalkRepository
* @var TalkRepository $talkRepository
*/
$talkRepository = $this->get('ting')->get(TalkRepository::class);

Expand Down Expand Up @@ -200,7 +200,7 @@ public function speakersAction(Request $request, $eventSlug)
$event = $this->checkEventSlug($eventSlug);

/**
* @var $speakerRepository SpeakerRepository
* @var SpeakerRepository $speakerRepository
*/
$speakerRepository = $this->get('ting')->get(SpeakerRepository::class);
$speakers = $speakerRepository->getScheduledSpeakersByEvent($event, !$request->query->getBoolean('apply-publication-date-filters', true));
Expand Down
4 changes: 2 additions & 2 deletions sources/AppBundle/Controller/Event/CFP/InviteAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ public function __invoke(Request $request)
$event = $this->eventActionHelper->getEvent($request->attributes->get('eventSlug'));
$token = $request->attributes->get('token');
$talkId = (int) $request->attributes->get('talkId');
/** @var $invitation TalkInvitation */
/** @var TalkInvitation $invitation */
$invitation = $this->talkInvitationRepository->get(['talk_id' => $talkId, 'token' => $token]);
/** @var $talk Talk */
/** @var Talk $talk */
$talk = $this->talkRepository->get($talkId);
if ($invitation === null || $talk === null || $talk->getForumId() !== $event->getId()) {
throw new NotFoundHttpException('Invitation or talk not found');
Expand Down
2 changes: 1 addition & 1 deletion sources/AppBundle/Controller/EventBaseController.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ abstract class EventBaseController extends Controller
protected function checkEventSlug($eventSlug)
{
/**
* @var $eventRepository EventRepository
* @var EventRepository $eventRepository
*/
$eventRepository = $this->get('ting')->get(EventRepository::class);
$event = $eventRepository->getOneBy(['path' => $eventSlug]);
Expand Down
6 changes: 2 additions & 4 deletions sources/AppBundle/Controller/EventController.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ class EventController extends EventBaseController
public function indexAction()
{
/**
* @var $eventRepository EventRepository
*
* @return Response
* @var EventRepository $eventRepository
*/
$eventRepository = $this->get('ting')->get(EventRepository::class);
$events = $eventRepository->getNextEvents();
Expand All @@ -37,7 +35,7 @@ public function indexAction()
public function speakerInfosIndexAction()
{
/**
* @var $eventRepository EventRepository
* @var EventRepository $eventRepository
*/
$eventRepository = $this->get('ting')->get(EventRepository::class);
$event = $eventRepository->getNextEventForGithubUser($this->getUser());
Expand Down
20 changes: 10 additions & 10 deletions sources/AppBundle/Controller/MemberShipController.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ public function companyAction(Request $request)

if ($subscribeForm->isSubmitted() && $subscribeForm->isValid()) {
/**
* @var $member CompanyMember
* @var CompanyMember $member
*/
$member = $subscribeForm->getData();
$this->get('ting')->get(CompanyMemberRepository::class)->save($member);
/**
* @var $invitationRepository CompanyMemberInvitationRepository
* @var CompanyMemberInvitationRepository $invitationRepository
*/
$invitationRepository = $this->get('ting')->get(CompanyMemberInvitationRepository::class);

Expand Down Expand Up @@ -108,12 +108,12 @@ public function companyAction(Request $request)
public function paymentAction($invoiceNumber, $token)
{
/**
* @var $subscription Cotisations
* @var Cotisations $subscription
*/
$subscription = $this->get(\AppBundle\LegacyModelFactory::class)->createObject(Cotisations::class);
$invoice = $subscription->getByInvoice($invoiceNumber, $token);
/**
* @var $company CompanyMember
* @var CompanyMember $company
*/
$company = $this->get('ting')->get(CompanyMemberRepository::class)->get($invoice['id_personne']);

Expand All @@ -140,7 +140,7 @@ public function paymentAction($invoiceNumber, $token)
public function invoiceAction($invoiceNumber, $token)
{
/**
* @var $subscription Cotisations
* @var Cotisations $subscription
*/
$subscription = $this->get(\AppBundle\LegacyModelFactory::class)->createObject(Cotisations::class);
$invoice = $subscription->getByInvoice($invoiceNumber, $token);
Expand All @@ -162,18 +162,18 @@ public function invoiceAction($invoiceNumber, $token)
public function memberInvitationAction(Request $request, $invitationId, $token)
{
/**
* @var $invitationRepository CompanyMemberInvitationRepository
* @var CompanyMemberInvitationRepository $invitationRepository
*/
$invitationRepository = $this->get('ting')->get(CompanyMemberInvitationRepository::class);

/**
* @var $invitation CompanyMemberInvitation
* @var CompanyMemberInvitation $invitation
*/
$invitation = $invitationRepository->getOneBy(['id' => $invitationId, 'token' => $token, 'status' => CompanyMemberInvitation::STATUS_PENDING]);
$company = null;
if ($invitation) {
/**
* @var $company CompanyMember
* @var CompanyMember $company
*/
$company = $this->get('ting')->get(CompanyMemberRepository::class)->get($invitation->getCompanyId());
}
Expand All @@ -187,7 +187,7 @@ public function memberInvitationAction(Request $request, $invitationId, $token)
$userForm->handleRequest($request);
if ($userForm->isSubmitted() && $userForm->isValid()) {
/**
* @var $user User
* @var User $user
*/
$user = $userForm->getData();
$user->setCivility('');
Expand Down Expand Up @@ -241,7 +241,7 @@ public function payboxCallbackAction(Request $request)
$payboxResponse = PayboxResponseFactory::createFromRequest($request);
$userRepository = $this->get(UserRepository::class);
/**
* @var $cotisations Cotisations
* @var Cotisations $cotisations
*/
$cotisations = $this->get(\AppBundle\LegacyModelFactory::class)->createObject(Cotisations::class);
$logs = $this->get(\AppBundle\LegacyModelFactory::class)->createObject(Logs::class);
Expand Down
16 changes: 8 additions & 8 deletions sources/AppBundle/Controller/TicketController.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function sponsorTicketAction(Request $request, $eventSlug)
} else {
$token = $request->request->get('sponsor_token');
/**
* @var $sponsorTicket SponsorTicket
* @var SponsorTicket $sponsorTicket
*/
$sponsorTicket = $this->get('ting')->get(SponsorTicketRepository::class)->getOneBy(['token' => $token]);
if (
Expand Down Expand Up @@ -80,7 +80,7 @@ public function sponsorTicketFormAction(Request $request, $eventSlug)
}

/**
* @var $sponsorTicket SponsorTicket
* @var SponsorTicket $sponsorTicket
*/
$sponsorTicket = $this->get('ting')->get(SponsorTicketRepository::class)->get($request->getSession()->get('sponsor_ticket_id'));
if ($sponsorTicket === null) {
Expand All @@ -94,7 +94,7 @@ public function sponsorTicketFormAction(Request $request, $eventSlug)
$edit = false;
if ($request->query->has('ticket')) {
/**
* @var $ticket Ticket
* @var Ticket $ticket
*/
$ticket = $this->get('ting')->get(TicketRepository::class)->get($request->query->get('ticket'));

Expand Down Expand Up @@ -123,7 +123,7 @@ public function sponsorTicketFormAction(Request $request, $eventSlug)
return $this->redirectToRoute('sponsor_ticket_form', ['eventSlug' => $eventSlug]);
} elseif ($request->isMethod(Request::METHOD_POST) && $request->request->has('delete')) {
/**
* @var $ticket Ticket
* @var Ticket $ticket
*/
$ticket = $this->get('ting')->get(TicketRepository::class)->get($request->request->get('delete'));

Expand Down Expand Up @@ -168,19 +168,19 @@ public function ticketAction($eventSlug, Request $request)
$purchaseForm->handleRequest($request);

/**
* @var $user User
* @var User $user
*/
$user = $this->getUser();

if ($purchaseForm->isSubmitted() && $purchaseForm->isValid()) {
$invoiceRepository = $this->get(\AppBundle\Event\Model\Repository\InvoiceRepository::class);
/**
* @var $invoice Invoice
* @var Invoice $invoice
*/
$invoice = $purchaseForm->getData();

/**
* @var $tickets Ticket[]
* @var Ticket[] $tickets
*/
$tickets = array_slice($invoice->getTickets(), 0, $purchaseForm->get('nbPersonnes')->getData());
$tickets[0]
Expand Down Expand Up @@ -350,7 +350,7 @@ public function payboxCallbackAction($eventSlug, Request $request)

if ($paymentStatus === Ticket::STATUS_PAID) {
/**
* @var $forumFacturation Facturation
* @var Facturation $forumFacturation
*/
$forumFacturation = $this->get(\AppBundle\LegacyModelFactory::class)->createObject(Facturation::class);
$forumFacturation->envoyerFacture($invoice->getReference());
Expand Down
8 changes: 4 additions & 4 deletions sources/AppBundle/Controller/VoteController.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function indexAction($eventSlug, $page = 1, $all = false)
}

/**
* @var $talkRepository TalkRepository
* @var TalkRepository $talkRepository
*/
$talkRepository = $this->get('ting')->get(TalkRepository::class);

Expand Down Expand Up @@ -135,9 +135,9 @@ public function newAction(Request $request, $eventSlug, $talkId)
return new JsonResponse(['errors' => ['Talk does not exists']], Response::HTTP_BAD_REQUEST);
}

/** @var $voteRepository VoteRepository */
/** @var VoteRepository $voteRepository */
$voteRepository = $this->get('ting')->get(VoteRepository::class);
/** @var $vote Vote */
/** @var Vote $vote */
$vote = $form->getData();
$vote->setSubmittedOn(new \DateTime());

Expand Down Expand Up @@ -175,7 +175,7 @@ public function adminAction(Request $request)
*/
private function findTalk($talkId)
{
/** @var $talkRepository TalkRepository */
/** @var TalkRepository $talkRepository */
$talkRepository = $this->get('ting')->get(TalkRepository::class);
/** @var Talk $talk */
$talk = $talkRepository->getOneBy(['id' => $talkId]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function indexAction($id, $slug)
private function checkAndGetCompanyMember($id, $slug)
{
/**
* @var $companyRepository CompanyMemberRepository
* @var CompanyMemberRepository $companyRepository
*/
$companyRepository = $this->get('ting')->get(CompanyMemberRepository::class);
$companyMember = $companyRepository->findById($id);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class CompanyPublicProfileListController extends SiteBaseController
public function indexAction()
{
/**
* @var $companyRepository CompanyMemberRepository
* @var CompanyMemberRepository $companyRepository
*/
$companyRepository = $this->get('ting')->get(CompanyMemberRepository::class);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class CompanyPublicProfileController extends SiteBaseController
public function indexAction(Request $request)
{
/**
* @var $companyRepository CompanyMemberRepository
* @var CompanyMemberRepository $companyRepository
*/
$companyRepository = $this->get('ting')->get(CompanyMemberRepository::class);
/** @var CompanyMember $companyMember */
Expand Down
1 change: 0 additions & 1 deletion sources/AppBundle/Email/Mailer/Attachment.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ class Attachment
private $type;

/**
* @param string $email
* @param string $name
*/
public function __construct($path, $name, $encoding, $type)
Expand Down
Loading
Loading