Skip to content

Commit

Permalink
corrections conventions du dossier sans sources/appBundle
Browse files Browse the repository at this point in the history
  • Loading branch information
agallou committed Feb 25, 2017
1 parent 21c6517 commit fb1569d
Show file tree
Hide file tree
Showing 51 changed files with 36 additions and 93 deletions.
2 changes: 1 addition & 1 deletion sources/AppBundle/AppBundle.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

namespace AppBundle;

use Symfony\Component\HttpKernel\Bundle\Bundle;

class AppBundle extends Bundle
{

}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

namespace AppBundle\Association\CompanyMembership;


use Afup\Site\Association\Cotisations;
use AppBundle\Association\Model\CompanyMember;
use AppBundle\LegacyModelFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

namespace AppBundle\Association\Form;


use AppBundle\Association\Model\CompanyMemberInvitation;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
Expand All @@ -23,8 +22,8 @@ public function buildForm(FormBuilderInterface $builder, array $options)

public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults(array(
$resolver->setDefaults([
'data_class' => CompanyMemberInvitation::class,
));
]);
}
}
5 changes: 2 additions & 3 deletions sources/AppBundle/Association/Form/CompanyMemberType.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

namespace AppBundle\Association\Form;


use AppBundle\Association\Model\CompanyMember;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
Expand Down Expand Up @@ -54,8 +53,8 @@ public function buildForm(FormBuilderInterface $builder, array $options)

public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults(array(
$resolver->setDefaults([
'data_class' => CompanyMember::class,
));
]);
}
}
5 changes: 2 additions & 3 deletions sources/AppBundle/Association/Form/UserType.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

namespace AppBundle\Association\Form;


use AppBundle\Association\Model\User;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\EmailType;
Expand Down Expand Up @@ -39,8 +38,8 @@ public function buildForm(FormBuilderInterface $builder, array $options)

public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults(array(
$resolver->setDefaults([
'data_class' => User::class,
));
]);
}
}
1 change: 0 additions & 1 deletion sources/AppBundle/Association/Model/CompanyMember.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

namespace AppBundle\Association\Model;


use CCMBenchmark\Ting\Entity\NotifyProperty;
use CCMBenchmark\Ting\Entity\NotifyPropertyInterface;
use Symfony\Component\Validator\Constraints as Assert;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

namespace AppBundle\Association\Model;


use CCMBenchmark\Ting\Entity\NotifyProperty;
use CCMBenchmark\Ting\Entity\NotifyPropertyInterface;
use Symfony\Component\Validator\Constraints as Assert;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

namespace AppBundle\Association\Model\Repository;


use AppBundle\Association\Model\CompanyMemberInvitation;
use CCMBenchmark\Ting\Driver\Mysqli\Serializer\Boolean;
use CCMBenchmark\Ting\Repository\Metadata;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

namespace AppBundle\Association\Model\Repository;


use AppBundle\Association\Model\CompanyMember;
use CCMBenchmark\Ting\Repository\Metadata;
use CCMBenchmark\Ting\Repository\MetadataInitializer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

namespace AppBundle\Association\Model\Repository;


use AppBundle\Association\Model\User;
use CCMBenchmark\Ting\Repository\Metadata;
use CCMBenchmark\Ting\Repository\MetadataInitializer;
Expand Down
2 changes: 0 additions & 2 deletions sources/AppBundle/Association/Model/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
use CCMBenchmark\Ting\Entity\NotifyProperty;
use CCMBenchmark\Ting\Entity\NotifyPropertyInterface;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Component\Validator\Constraints as Assert;

/**
* @AppAssert\UniqueEntity(fields={"username"}, repository="\AppBundle\Association\Model\Repository\UserRepository")
Expand Down Expand Up @@ -477,7 +476,6 @@ public function getSalt()
*/
public function eraseCredentials()
{

}

/**
Expand Down
5 changes: 2 additions & 3 deletions sources/AppBundle/CFP/PhotoStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

namespace AppBundle\CFP;


use AppBundle\Event\Model\Speaker;
use Symfony\Component\HttpFoundation\File\Exception\FileException;
use Symfony\Component\HttpFoundation\File\UploadedFile;
Expand Down Expand Up @@ -34,7 +33,7 @@ public function store(UploadedFile $photo, Speaker $speaker)
$directory = $this->basePath . '/' . $speaker->getEventId() . '/' . self::DIR_ORIGINAL;
if (file_exists($directory) === false) {
mkdir($directory, 0755, true);
} elseif(is_dir($directory) === false || is_writable($directory) === false) {
} elseif (is_dir($directory) === false || is_writable($directory) === false) {
throw new FileException(sprintf('Could not create directory for storage'));
}

Expand Down Expand Up @@ -83,7 +82,7 @@ public function getPath(Speaker $speaker, $format)
$directory = $this->basePath . '/' . $speaker->getEventId() . '/' . $format;
if (file_exists($directory) === false) {
mkdir($directory, 0755, true);
} elseif(is_dir($directory) === false || is_writable($directory) === false) {
} elseif (is_dir($directory) === false || is_writable($directory) === false) {
throw new FileException(sprintf('Could not create directory for storage'));
}

Expand Down
1 change: 0 additions & 1 deletion sources/AppBundle/CFP/SpeakerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

namespace AppBundle\CFP;


use AppBundle\Event\Model\Event;
use AppBundle\Event\Model\Repository\SpeakerRepository;
use AppBundle\Event\Model\Speaker;
Expand Down
6 changes: 2 additions & 4 deletions sources/AppBundle/Controller/CFPController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

namespace AppBundle\Controller;


use Afup\Site\Utils\Mail;
use AppBundle\CFP\PhotoStorage;
use AppBundle\Event\Form\SpeakerType;
Expand Down Expand Up @@ -152,7 +151,7 @@ public function editAction($eventSlug, $talkId, Request $request)
}
$user = $this->getUser();
// Send mail to the other guy, begging for him to join the talk
$this->get('event_dispatcher')->addListener(KernelEvents::TERMINATE, function() use ($talk, $user, $talkId, $eventSlug, $invitation){
$this->get('event_dispatcher')->addListener(KernelEvents::TERMINATE, function () use ($talk, $user, $talkId, $eventSlug, $invitation) {
$text = $this->get('translator')->trans('mail.invitation.text',
[
'%login%' => $user->getLogin(),
Expand Down Expand Up @@ -258,7 +257,6 @@ public function inviteAction($eventSlug, $talkId, $token)
// Save cospeaker
$talkInvitationRepository->save($invitation);
$this->get('ting')->get(TalkToSpeakersRepository::class)->addSpeakerToTalk($talk, $speaker);

}
return $this->redirectToRoute('cfp_edit', ['eventSlug' => $eventSlug, 'talkId' => $talkId]);
}
Expand All @@ -285,7 +283,7 @@ private function handleTalkForm(Request $request, Event $event, Form $form)
$this->get('ting')->get(SpeakerRepository::class)->save($this->get('app.speaker_factory')->getSpeaker($event));

if ($this->get('ting.unitofwork')->isManaged($talk) === false) {
$this->get('event_dispatcher')->addListener(KernelEvents::TERMINATE, function() use ($talk) {
$this->get('event_dispatcher')->addListener(KernelEvents::TERMINATE, function () use ($talk) {
$this->get('app.slack_notifier')->notifyTalk($talk);
});
}
Expand Down
1 change: 0 additions & 1 deletion sources/AppBundle/Controller/EventBaseController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

namespace AppBundle\Controller;


use AppBundle\Event\Model\Event;
use AppBundle\Event\Model\Repository\EventRepository;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
Expand Down
2 changes: 0 additions & 2 deletions sources/AppBundle/Controller/EventController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

namespace AppBundle\Controller;


use AppBundle\Event\Model\Repository\EventRepository;
use AppBundle\Event\Model\Repository\TalkRepository;
use AppBundle\Event\Model\Repository\VoteRepository;
Expand All @@ -24,7 +23,6 @@ public function indexAction()
return $this->render(':event:none.html.twig');
}
return new RedirectResponse($this->generateUrl('event', ['eventSlug' => $event->getPath()]), Response::HTTP_TEMPORARY_REDIRECT);

}

public function eventAction($eventSlug)
Expand Down
2 changes: 0 additions & 2 deletions sources/AppBundle/Controller/GithubController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@

namespace AppBundle\Controller;


use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;

class GithubController extends Controller
Expand Down
7 changes: 3 additions & 4 deletions sources/AppBundle/Controller/MemberShipController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

namespace AppBundle\Controller;


use Afup\Site\Association\Cotisations;
use Afup\Site\Utils\Mail;
use AppBundle\Association\Form\CompanyMemberType;
Expand Down Expand Up @@ -42,7 +41,7 @@ public function companyAction(Request $request)
*/
$invitationRepository = $this->get('ting')->get(CompanyMemberInvitationRepository::class);

foreach($member->getInvitations() as $index => $invitation) {
foreach ($member->getInvitations() as $index => $invitation) {
$invitation
->setSubmittedOn(new \DateTime())
->setCompanyId($member->getId())
Expand All @@ -57,7 +56,7 @@ public function companyAction(Request $request)
$invitationRepository->save($invitation);

// Send mail to the other guy, begging for him to join the talk
$this->get('event_dispatcher')->addListener(KernelEvents::TERMINATE, function() use ($member, $invitation){
$this->get('event_dispatcher')->addListener(KernelEvents::TERMINATE, function () use ($member, $invitation) {
$text = $this->get('translator')->trans('mail.invitationMembership.text',
[
'%firstname%' => $member->getFirstName(),
Expand Down Expand Up @@ -110,7 +109,7 @@ public function paymentAction($invoiceNumber, $token)

$paybox = $this->get('app.paybox_factory')->createPayboxForSubscription(
'F' . $invoiceNumber,
(float)$invoice['montant'],
(float) $invoice['montant'],
$company->getEmail()
);

Expand Down
3 changes: 1 addition & 2 deletions sources/AppBundle/Controller/SiteBaseController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

namespace AppBundle\Controller;


use Afup\Site\Utils\Configuration;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Response;
Expand Down Expand Up @@ -36,7 +35,7 @@ public function setConfiguration(Configuration $conf)
/**
* @inheritDoc
*/
protected function render($view, array $parameters = array(), Response $response = null)
protected function render($view, array $parameters = [], Response $response = null)
{
return parent::render($view, $parameters + $this->defaultBlocks, $response);
}
Expand Down
1 change: 0 additions & 1 deletion sources/AppBundle/Controller/SiteControllerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

namespace AppBundle\Controller;


use Afup\Site\Utils\Configuration;

interface SiteControllerInterface
Expand Down
1 change: 0 additions & 1 deletion sources/AppBundle/Controller/StaticController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

namespace AppBundle\Controller;


class StaticController extends SiteBaseController
{
public function officesAction()
Expand Down
7 changes: 2 additions & 5 deletions sources/AppBundle/Controller/VoteController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

namespace AppBundle\Controller;


use AppBundle\Event\Form\VoteType;
use AppBundle\Event\Model\Repository\TalkRepository;
use AppBundle\Event\Model\Repository\VoteRepository;
Expand Down Expand Up @@ -45,8 +44,7 @@ public function indexAction($eventSlug, $page = 1, $all = false)
}

$vote = new Vote();
$forms = function () use ($talks, $vote, $eventSlug)
{
$forms = function () use ($talks, $vote, $eventSlug) {
foreach ($talks as $talk) {
if (isset($talk['asvg'])) {
$myVote = $talk['asvg'];
Expand Down Expand Up @@ -148,7 +146,7 @@ public function newAction(Request $request, $eventSlug, $talkId)

try {
$vote->setTalk($talk);
$this->get('event_dispatcher')->addListener(KernelEvents::TERMINATE, function() use ($vote) {
$this->get('event_dispatcher')->addListener(KernelEvents::TERMINATE, function () use ($vote) {
$this->get('app.slack_notifier')->notifyVote($vote);
});
$voteRepository->upsert($vote);
Expand All @@ -171,5 +169,4 @@ public function adminAction($eventSlug)

return $this->render('admin/vote/liste.html.twig', ['votes' => $votes]);
}

}
1 change: 0 additions & 1 deletion sources/AppBundle/Event/Form/SpeakerType.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

namespace AppBundle\Event\Form;


use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\Extension\Core\Type\EmailType;
Expand Down
1 change: 0 additions & 1 deletion sources/AppBundle/Event/Form/TalkInvitationType.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

namespace AppBundle\Event\Form;


use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
Expand Down
1 change: 0 additions & 1 deletion sources/AppBundle/Event/Form/TalkType.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

namespace AppBundle\Event\Form;


use AppBundle\Event\Model\Talk;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
Expand Down
1 change: 0 additions & 1 deletion sources/AppBundle/Event/Form/VoteType.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

namespace AppBundle\Event\Form;


use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
Expand Down
2 changes: 1 addition & 1 deletion sources/AppBundle/Event/Model/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function getId()
*/
public function setId($id)
{
$id = (int)$id;
$id = (int) $id;
$this->propertyChanged('id', $this->id, $id);
$this->id = $id;
return $this;
Expand Down
3 changes: 0 additions & 3 deletions sources/AppBundle/Event/Model/GithubUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,6 @@ public function getUsername()
*/
public function eraseCredentials()
{

}
/***************
* Serializable
Expand Down Expand Up @@ -281,6 +280,4 @@ public function isEqualTo(UserInterface $user)
*/
return ($user->getId() === $this->id);
}


}
Loading

0 comments on commit fb1569d

Please sign in to comment.