Missing use statement should be avoided 6

  • Major
  • Bugrisk

More information: https://insight.sensiolabs.com/what-we-analyse/php.missing_use_statement

  1. * @param array $options
  2. */
  3. public function buildForm(FormBuilderInterface $builder, array $options)
  4. {
  5. $builder
  6. ->add('username', TextType::class, [

    The TextType class resolves to the following classes: Doctrine\DBAL\Types\TextType or Symfony\Component\Form\Extension\Core\Type\TextType.
    Did you forget to add a corresponding use statement for one of them?

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by chapterjason
  7. 'label' => 'sourecode.form.user.username',
  8. ])
  9. ->add('email', EmailType::class, [
  10. 'label' => 'sourecode.form.user.email',
  11. ])
  1. {
  2. $builder
  3. ->add('username', TextType::class, [
  4. 'label' => 'sourecode.form.user.username',
  5. ])
  6. ->add('email', EmailType::class, [

    The EmailType class resolves to the following class: Symfony\Component\Form\Extension\Core\Type\EmailType.
    Did you forget to add a corresponding use statement?

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by chapterjason
  7. 'label' => 'sourecode.form.user.email',
  8. ])
  9. ->add('plainPassword', PasswordType::class, [
  10. 'label' => 'sourecode.form.user.password.label',
  11. ])
  1. 'label' => 'sourecode.form.user.username',
  2. ])
  3. ->add('email', EmailType::class, [
  4. 'label' => 'sourecode.form.user.email',
  5. ])
  6. ->add('plainPassword', PasswordType::class, [

    The PasswordType class resolves to the following class: Symfony\Component\Form\Extension\Core\Type\PasswordType.
    Did you forget to add a corresponding use statement?

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by chapterjason
  7. 'label' => 'sourecode.form.user.password.label',
  8. ])
  9. ->add('enabled', CheckboxType::class, [
  10. 'label' => 'sourecode.form.user.enabled',
  11. ])
  1. 'label' => 'sourecode.form.user.email',
  2. ])
  3. ->add('plainPassword', PasswordType::class, [
  4. 'label' => 'sourecode.form.user.password.label',
  5. ])
  6. ->add('enabled', CheckboxType::class, [

    The CheckboxType class resolves to the following class: Symfony\Component\Form\Extension\Core\Type\CheckboxType.
    Did you forget to add a corresponding use statement?

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by chapterjason
  7. 'label' => 'sourecode.form.user.enabled',
  8. ])
  9. ;
  10. }
  1. * {@inheritdoc}
  2. */
  3. public function refreshUser(\Symfony\Component\Security\Core\User\UserInterface $user)
  4. {
  5. if (!$this->supportsClass(get_class($user))) {
  6. throw new UnsupportedUserException(

    The UnsupportedUserException class resolves to the following class: Symfony\Component\Security\Core\Exception\UnsupportedUserException.
    Did you forget to add a corresponding use statement?

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by chapterjason
  7. sprintf('Instances of "%s" are not supported.', get_class($user))
  8. );
  9. }
  10. /** @var UserInterface|null $reloadedUser */
  11. $reloadedUser = $this->repository->find($user->getId());
  1. );
  2. }
  3. /** @var UserInterface|null $reloadedUser */
  4. $reloadedUser = $this->repository->find($user->getId());
  5. if (null === $reloadedUser) {
  6. throw new UsernameNotFoundException(

    The UsernameNotFoundException class resolves to the following class: Symfony\Component\Security\Core\Exception\UsernameNotFoundException.
    Did you forget to add a corresponding use statement?

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by chapterjason
  7. sprintf('User with ID "%d" could not be refreshed.', $user->getId())
  8. );
  9. }
  10. return $reloadedUser;

Source code should not contain TODO comments

  • Minor
  • Architecture

More information: https://insight.sensiolabs.com/what-we-analyse/task_todo_comment

  1. protected function addClassesSection($node)
  2. {
  3. $node
  4. ->children()
  5. ->arrayNode('classes')
  6. // @todo wait for https://github.com/symfony/symfony/issues/22052

    TODO comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by chapterjason
  7. //->addDefaultsIfNotSet()
  8. ->children()
  9. ->scalarNode('user')
  10. ->defaultValue('SoureCode\Component\User\Model\User')->cannotBeEmpty()
  11. ->validate()

Booleans and null should be compared strictly

  • Minor
  • Bugrisk

More information: https://insight.sensiolabs.com/what-we-analyse/php.strict_boolean_comparison_should_be_used

  1. * @return null|object
  2. */
  3. protected function findUser(string $uniqueIdentifier)
  4. {
  5. foreach ($this->fields as $field) {
  6. if (null != ($user = $this->repository->findOneBy([$field => $uniqueIdentifier]))) {

    With booleans and null, only strict comparison (with !== operator) should be used to lower bug risks and to improve performances.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by chapterjason
  7. return $user;
  8. }
  9. }
  10. return null;

User specific files should not appear in .gitignore

  • Minor
  • Codestyle

More information: https://insight.sensiolabs.com/what-we-analyse/git.user_specific_ignored_file

in .gitignore, line 2
  1. /phpunit.xml
  2. .idea/

    .idea/ is user-specific and should not appear in a project .gitignore. Consider adding it to the user global .gitignore instead.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by chapterjason
  3. app/
  4. vendor/
  5. *~
  6. composer.phar
  7. phpunit.phar

Commented code should not be committed 28

  • Minor
  • Deadcode

More information: https://insight.sensiolabs.com/what-we-analyse/php.commented_out_code

  1. }
  2. //
  3. // public function createFormAction(Request $request)
  4. // {
  5. // $user = new User();

    Commented out code reduces readability and lowers the code confidence for other developers. If it's common usage for debug, it should not be committed. Using a version control system, such code can be safely removed.

    Time to fix: about 30 minutes
    Open Issue Permalink
    Last edited by chapterjason
  6. // $form = $this->createForm(UserType::class, $user, ['action' => $this->generateUrl('sourecode_user_create')]);
  7. //
  8. // return $this->render(
  9. // '@SoureCodeUser/User/create.html.twig',
  10. // ['form' => $form->createView()]
  1. }
  2. //
  3. // public function createFormAction(Request $request)
  4. // {
  5. // $user = new User();
  6. // $form = $this->createForm(UserType::class, $user, ['action' => $this->generateUrl('sourecode_user_create')]);

    Commented out code reduces readability and lowers the code confidence for other developers. If it's common usage for debug, it should not be committed. Using a version control system, such code can be safely removed.

    Time to fix: about 30 minutes
    Open Issue Permalink
    Last edited by chapterjason
  7. //
  8. // return $this->render(
  9. // '@SoureCodeUser/User/create.html.twig',
  10. // ['form' => $form->createView()]
  11. // );
  1. // );
  2. // }
  3. //
  4. // public function createAction(Request $request)
  5. // {
  6. // $user = new User();

    Commented out code reduces readability and lowers the code confidence for other developers. If it's common usage for debug, it should not be committed. Using a version control system, such code can be safely removed.

    Time to fix: about 30 minutes
    Open Issue Permalink
    Last edited by chapterjason
  7. // $form = $this->createForm(UserType::class, $user);
  8. //
  9. // $form->handleRequest($request);
  10. //
  11. // if ($form->isSubmitted() && $form->isValid()) {
  1. // }
  2. //
  3. // public function createAction(Request $request)
  4. // {
  5. // $user = new User();
  6. // $form = $this->createForm(UserType::class, $user);

    Commented out code reduces readability and lowers the code confidence for other developers. If it's common usage for debug, it should not be committed. Using a version control system, such code can be safely removed.

    Time to fix: about 30 minutes
    Open Issue Permalink
    Last edited by chapterjason
  7. //
  8. // $form->handleRequest($request);
  9. //
  10. // if ($form->isSubmitted() && $form->isValid()) {
  11. // $entityManager = $this->getDoctrine()->getManager();
  1. // public function createAction(Request $request)
  2. // {
  3. // $user = new User();
  4. // $form = $this->createForm(UserType::class, $user);
  5. //
  6. // $form->handleRequest($request);

    Commented out code reduces readability and lowers the code confidence for other developers. If it's common usage for debug, it should not be committed. Using a version control system, such code can be safely removed.

    Time to fix: about 30 minutes
    Open Issue Permalink
    Last edited by chapterjason
  7. //
  8. // if ($form->isSubmitted() && $form->isValid()) {
  9. // $entityManager = $this->getDoctrine()->getManager();
  10. //
  11. // $passwordEncoder = $this->get('security.password_encoder');
  1. // $form = $this->createForm(UserType::class, $user);
  2. //
  3. // $form->handleRequest($request);
  4. //
  5. // if ($form->isSubmitted() && $form->isValid()) {
  6. // $entityManager = $this->getDoctrine()->getManager();

    Commented out code reduces readability and lowers the code confidence for other developers. If it's common usage for debug, it should not be committed. Using a version control system, such code can be safely removed.

    Time to fix: about 30 minutes
    Open Issue Permalink
    Last edited by chapterjason
  7. //
  8. // $passwordEncoder = $this->get('security.password_encoder');
  9. // $user->setPassword($passwordEncoder->encodePassword($user, $user->getPlainPassword()));
  10. //
  11. // $entityManager->persist($user);
  1. // $form->handleRequest($request);
  2. //
  3. // if ($form->isSubmitted() && $form->isValid()) {
  4. // $entityManager = $this->getDoctrine()->getManager();
  5. //
  6. // $passwordEncoder = $this->get('security.password_encoder');

    Commented out code reduces readability and lowers the code confidence for other developers. If it's common usage for debug, it should not be committed. Using a version control system, such code can be safely removed.

    Time to fix: about 30 minutes
    Open Issue Permalink
    Last edited by chapterjason
  7. // $user->setPassword($passwordEncoder->encodePassword($user, $user->getPlainPassword()));
  8. //
  9. // $entityManager->persist($user);
  10. // $entityManager->flush();
  11. //
  1. //
  2. // if ($form->isSubmitted() && $form->isValid()) {
  3. // $entityManager = $this->getDoctrine()->getManager();
  4. //
  5. // $passwordEncoder = $this->get('security.password_encoder');
  6. // $user->setPassword($passwordEncoder->encodePassword($user, $user->getPlainPassword()));

    Commented out code reduces readability and lowers the code confidence for other developers. If it's common usage for debug, it should not be committed. Using a version control system, such code can be safely removed.

    Time to fix: about 30 minutes
    Open Issue Permalink
    Last edited by chapterjason
  7. //
  8. // $entityManager->persist($user);
  9. // $entityManager->flush();
  10. //
  11. // return $this->redirect('/');
  1. // $entityManager = $this->getDoctrine()->getManager();
  2. //
  3. // $passwordEncoder = $this->get('security.password_encoder');
  4. // $user->setPassword($passwordEncoder->encodePassword($user, $user->getPlainPassword()));
  5. //
  6. // $entityManager->persist($user);

    Commented out code reduces readability and lowers the code confidence for other developers. If it's common usage for debug, it should not be committed. Using a version control system, such code can be safely removed.

    Time to fix: about 30 minutes
    Open Issue Permalink
    Last edited by chapterjason
  7. // $entityManager->flush();
  8. //
  9. // return $this->redirect('/');
  10. // }
  11. //
  1. //
  2. // $passwordEncoder = $this->get('security.password_encoder');
  3. // $user->setPassword($passwordEncoder->encodePassword($user, $user->getPlainPassword()));
  4. //
  5. // $entityManager->persist($user);
  6. // $entityManager->flush();

    Commented out code reduces readability and lowers the code confidence for other developers. If it's common usage for debug, it should not be committed. Using a version control system, such code can be safely removed.

    Time to fix: about 30 minutes
    Open Issue Permalink
    Last edited by chapterjason
  7. //
  8. // return $this->redirect('/');
  9. // }
  10. //
  11. // return $this->redirectToRoute('sourecode_user_create_form');
  1. // $user->setPassword($passwordEncoder->encodePassword($user, $user->getPlainPassword()));
  2. //
  3. // $entityManager->persist($user);
  4. // $entityManager->flush();
  5. //
  6. // return $this->redirect('/');

    Commented out code reduces readability and lowers the code confidence for other developers. If it's common usage for debug, it should not be committed. Using a version control system, such code can be safely removed.

    Time to fix: about 30 minutes
    Open Issue Permalink
    Last edited by chapterjason
  7. // }
  8. //
  9. // return $this->redirectToRoute('sourecode_user_create_form');
  10. // }
  11. //
  1. // $entityManager->flush();
  2. //
  3. // return $this->redirect('/');
  4. // }
  5. //
  6. // return $this->redirectToRoute('sourecode_user_create_form');

    Commented out code reduces readability and lowers the code confidence for other developers. If it's common usage for debug, it should not be committed. Using a version control system, such code can be safely removed.

    Time to fix: about 30 minutes
    Open Issue Permalink
    Last edited by chapterjason
  7. // }
  8. //
  9. // public function readAction()
  10. // {
  11. //
  1. // */
  2. //// public function registerAction(Request $request)
  3. //// {
  4. //
  5. // /*
  6. // * $user = new User();

    Commented out code reduces readability and lowers the code confidence for other developers. If it's common usage for debug, it should not be committed. Using a version control system, such code can be safely removed.

    Time to fix: about 30 minutes
    Open Issue Permalink
    Last edited by chapterjason
  7. // $form = $this->createForm(RegisterType::class, $user);
  8. //
  9. // $form->handleRequest($request);
  10. //
  11. // if ($form->isSubmitted() && $form->isValid()) {
  1. //// public function registerAction(Request $request)
  2. //// {
  3. //
  4. // /*
  5. // * $user = new User();
  6. // $form = $this->createForm(RegisterType::class, $user);

    Commented out code reduces readability and lowers the code confidence for other developers. If it's common usage for debug, it should not be committed. Using a version control system, such code can be safely removed.

    Time to fix: about 30 minutes
    Open Issue Permalink
    Last edited by chapterjason
  7. //
  8. // $form->handleRequest($request);
  9. //
  10. // if ($form->isSubmitted() && $form->isValid()) {
  11. // $entityManager = $this->getDoctrine()->getManager();
  1. //
  2. // /*
  3. // * $user = new User();
  4. // $form = $this->createForm(RegisterType::class, $user);
  5. //
  6. // $form->handleRequest($request);

    Commented out code reduces readability and lowers the code confidence for other developers. If it's common usage for debug, it should not be committed. Using a version control system, such code can be safely removed.

    Time to fix: about 30 minutes
    Open Issue Permalink
    Last edited by chapterjason
  7. //
  8. // if ($form->isSubmitted() && $form->isValid()) {
  9. // $entityManager = $this->getDoctrine()->getManager();
  10. //
  11. // $passwordEncoder = $this->get('security.password_encoder');
  1. // $form = $this->createForm(RegisterType::class, $user);
  2. //
  3. // $form->handleRequest($request);
  4. //
  5. // if ($form->isSubmitted() && $form->isValid()) {
  6. // $entityManager = $this->getDoctrine()->getManager();

    Commented out code reduces readability and lowers the code confidence for other developers. If it's common usage for debug, it should not be committed. Using a version control system, such code can be safely removed.

    Time to fix: about 30 minutes
    Open Issue Permalink
    Last edited by chapterjason
  7. //
  8. // $passwordEncoder = $this->get('security.password_encoder');
  9. // $password = $passwordEncoder->encodePassword($user, $user->getPlainPassword());
  10. //
  11. // $user->setPassword($password);
  1. // $form->handleRequest($request);
  2. //
  3. // if ($form->isSubmitted() && $form->isValid()) {
  4. // $entityManager = $this->getDoctrine()->getManager();
  5. //
  6. // $passwordEncoder = $this->get('security.password_encoder');

    Commented out code reduces readability and lowers the code confidence for other developers. If it's common usage for debug, it should not be committed. Using a version control system, such code can be safely removed.

    Time to fix: about 30 minutes
    Open Issue Permalink
    Last edited by chapterjason
  7. // $password = $passwordEncoder->encodePassword($user, $user->getPlainPassword());
  8. //
  9. // $user->setPassword($password);
  10. // $user->addRole(
  11. // $entityManager->getRepository('SoureCodeUserBundle:Role')->findOneBy(['name' => 'role_user'])
  1. //
  2. // if ($form->isSubmitted() && $form->isValid()) {
  3. // $entityManager = $this->getDoctrine()->getManager();
  4. //
  5. // $passwordEncoder = $this->get('security.password_encoder');
  6. // $password = $passwordEncoder->encodePassword($user, $user->getPlainPassword());

    Commented out code reduces readability and lowers the code confidence for other developers. If it's common usage for debug, it should not be committed. Using a version control system, such code can be safely removed.

    Time to fix: about 30 minutes
    Open Issue Permalink
    Last edited by chapterjason
  7. //
  8. // $user->setPassword($password);
  9. // $user->addRole(
  10. // $entityManager->getRepository('SoureCodeUserBundle:Role')->findOneBy(['name' => 'role_user'])
  11. // );
  1. // $entityManager = $this->getDoctrine()->getManager();
  2. //
  3. // $passwordEncoder = $this->get('security.password_encoder');
  4. // $password = $passwordEncoder->encodePassword($user, $user->getPlainPassword());
  5. //
  6. // $user->setPassword($password);

    Commented out code reduces readability and lowers the code confidence for other developers. If it's common usage for debug, it should not be committed. Using a version control system, such code can be safely removed.

    Time to fix: about 30 minutes
    Open Issue Permalink
    Last edited by chapterjason
  7. // $user->addRole(
  8. // $entityManager->getRepository('SoureCodeUserBundle:Role')->findOneBy(['name' => 'role_user'])
  9. // );
  10. //
  11. // $entityManager->persist($user);
  1. // $user->setPassword($password);
  2. // $user->addRole(
  3. // $entityManager->getRepository('SoureCodeUserBundle:Role')->findOneBy(['name' => 'role_user'])
  4. // );
  5. //
  6. // $entityManager->persist($user);

    Commented out code reduces readability and lowers the code confidence for other developers. If it's common usage for debug, it should not be committed. Using a version control system, such code can be safely removed.

    Time to fix: about 30 minutes
    Open Issue Permalink
    Last edited by chapterjason
  7. // $entityManager->flush();
  8. //
  9. // return $this->redirect('/');
  10. // }
  11. //
  1. // $user->addRole(
  2. // $entityManager->getRepository('SoureCodeUserBundle:Role')->findOneBy(['name' => 'role_user'])
  3. // );
  4. //
  5. // $entityManager->persist($user);
  6. // $entityManager->flush();

    Commented out code reduces readability and lowers the code confidence for other developers. If it's common usage for debug, it should not be committed. Using a version control system, such code can be safely removed.

    Time to fix: about 30 minutes
    Open Issue Permalink
    Last edited by chapterjason
  7. //
  8. // return $this->redirect('/');
  9. // }
  10. //
  11. // return $this->render(
  1. // );
  2. //
  3. // $entityManager->persist($user);
  4. // $entityManager->flush();
  5. //
  6. // return $this->redirect('/');

    Commented out code reduces readability and lowers the code confidence for other developers. If it's common usage for debug, it should not be committed. Using a version control system, such code can be safely removed.

    Time to fix: about 30 minutes
    Open Issue Permalink
    Last edited by chapterjason
  7. // }
  8. //
  9. // return $this->render(
  10. // '@SoureCodeUser/User/register.html.twig',
  11. // ['form' => $form->createView()]
  1. // * @return Response
  2. // */
  3. //// public function loginAction()
  4. //// {
  5. //
  6. // /*$authenticationUtils = $this->get('security.authentication_utils');

    Commented out code reduces readability and lowers the code confidence for other developers. If it's common usage for debug, it should not be committed. Using a version control system, such code can be safely removed.

    Time to fix: about 30 minutes
    Open Issue Permalink
    Last edited by chapterjason
  7. //
  8. // $form = $this->createForm(LoginType::class);
  9. //
  10. // $error = $authenticationUtils->getLastAuthenticationError();
  11. // if ($error !== null) {
  1. //// public function loginAction()
  2. //// {
  3. //
  4. // /*$authenticationUtils = $this->get('security.authentication_utils');
  5. //
  6. // $form = $this->createForm(LoginType::class);

    Commented out code reduces readability and lowers the code confidence for other developers. If it's common usage for debug, it should not be committed. Using a version control system, such code can be safely removed.

    Time to fix: about 30 minutes
    Open Issue Permalink
    Last edited by chapterjason
  7. //
  8. // $error = $authenticationUtils->getLastAuthenticationError();
  9. // if ($error !== null) {
  10. // $this->addFlash('danger', $error->getMessage());
  11. // }
  1. //
  2. // /*$authenticationUtils = $this->get('security.authentication_utils');
  3. //
  4. // $form = $this->createForm(LoginType::class);
  5. //
  6. // $error = $authenticationUtils->getLastAuthenticationError();

    Commented out code reduces readability and lowers the code confidence for other developers. If it's common usage for debug, it should not be committed. Using a version control system, such code can be safely removed.

    Time to fix: about 30 minutes
    Open Issue Permalink
    Last edited by chapterjason
  7. // if ($error !== null) {
  8. // $this->addFlash('danger', $error->getMessage());
  9. // }
  10. //
  11. // return $this->render('@SoureCodeUser/User/login.html.twig', ['form' => $form->createView()]);
  1. //
  2. // $form = $this->createForm(LoginType::class);
  3. //
  4. // $error = $authenticationUtils->getLastAuthenticationError();
  5. // if ($error !== null) {
  6. // $this->addFlash('danger', $error->getMessage());

    Commented out code reduces readability and lowers the code confidence for other developers. If it's common usage for debug, it should not be committed. Using a version control system, such code can be safely removed.

    Time to fix: about 30 minutes
    Open Issue Permalink
    Last edited by chapterjason
  7. // }
  8. //
  9. // return $this->render('@SoureCodeUser/User/login.html.twig', ['form' => $form->createView()]);
  10. // */
  11. //// }
  1. // $error = $authenticationUtils->getLastAuthenticationError();
  2. // if ($error !== null) {
  3. // $this->addFlash('danger', $error->getMessage());
  4. // }
  5. //
  6. // return $this->render('@SoureCodeUser/User/login.html.twig', ['form' => $form->createView()]);

    Commented out code reduces readability and lowers the code confidence for other developers. If it's common usage for debug, it should not be committed. Using a version control system, such code can be safely removed.

    Time to fix: about 30 minutes
    Open Issue Permalink
    Last edited by chapterjason
  7. // */
  8. //// }
  9. ////
  10. //// public function logoutAction()
  11. //// {
  1. public function load(array $configs, ContainerBuilder $container)
  2. {
  3. $configuration = new Configuration();
  4. $config = $this->processConfiguration($configuration, $configs);
  5. //var_dump($config);

    Commented out code reduces readability and lowers the code confidence for other developers. If it's common usage for debug, it should not be committed. Using a version control system, such code can be safely removed.

    Time to fix: about 30 minutes
    Open Issue Permalink
    Last edited by chapterjason
  6. $container->setParameter('soure_code_user.configuration', $config);
  7. $container->setParameter('soure_code_user.configuration.classes.user', $config['classes']['user']);
  8. $container->setParameter('soure_code_user.configuration.provider.single', $config['provider']['single']);
  9. $container->setParameter('soure_code_user.configuration.provider.multiple', $config['provider']['multiple']);

The composer.lock is not up to date.

  • Info
  • Bugrisk

More information: https://insight.sensiolabs.com/what-we-analyse/composer.outdated_lock_file

The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them.

Time to fix: about 1 hour
Open Issue Permalink
Last edited by chapterjason

Text files should end with a newline character 28

  • Info
  • Codestyle

More information: https://insight.sensiolabs.com/what-we-analyse/missing_e_o_l

  1. [
  2. 'data_class' => UserInterface::class
  3. ]
  4. );
  5. }
  6. }

    This file ends with no newline character. It won't render properly on a terminal, and it's considered a bad practice. Add a simple line feed as the last character to fix it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by chapterjason
  1. return UserInterface::class === $class || is_subclass_of($class, UserInterface::class);
  2. }
  3. abstract protected function findUser(string $uniqueIdentifier);
  4. }

    This file ends with no newline character. It won't render properly on a terminal, and it's considered a bad practice. Add a simple line feed as the last character to fix it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by chapterjason
in .gitignore, line 8
  1. app/
  2. vendor/
  3. *~
  4. composer.phar
  5. phpunit.phar
  6. public/

    This file ends with no newline character. It won't render properly on a terminal, and it's considered a bad practice. Add a simple line feed as the last character to fix it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by chapterjason
  1. }
  2. }
  3. return null;
  4. }
  5. }

    This file ends with no newline character. It won't render properly on a terminal, and it's considered a bad practice. Add a simple line feed as the last character to fix it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by chapterjason
in .coveralls.yml, line 3
  1. service_name: travis-ci
  2. coverage_clover: build/logs/clover.xml
  3. json_path: build/logs/coveralls-upload.json

    This file ends with no newline character. It won't render properly on a terminal, and it's considered a bad practice. Add a simple line feed as the last character to fix it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by chapterjason
in phpunit.xml.dist, line 27
  1. <directory>./src/SoureCode/Bundle/*/Resources</directory>
  2. <directory>./src/SoureCode/Bundle/*/vendor</directory>
  3. </exclude>
  4. </whitelist>
  5. </filter>
  6. </phpunit>

    This file ends with no newline character. It won't render properly on a terminal, and it's considered a bad practice. Add a simple line feed as the last character to fix it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by chapterjason
in README.md, line 6
  1. # SoureCode
  2. ## Status
  3. [![Build Status](https://travis-ci.org/SoureCode/SoureCode.svg?branch=master)](https://travis-ci.org/SoureCode/SoureCode)
  4. [![Codacy Badge](https://api.codacy.com/project/badge/Grade/39295ec96c774ea9aee124e51d80180a)](https://www.codacy.com/app/jason.schilling/SoureCode?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=SoureCode/SoureCode&amp;utm_campaign=Badge_Grade)
  5. [![Coverage Status](https://coveralls.io/repos/github/SoureCode/SoureCode/badge.svg?branch=master)](https://coveralls.io/github/SoureCode/SoureCode?branch=master)

    This file ends with no newline character. It won't render properly on a terminal, and it's considered a bad practice. Add a simple line feed as the last character to fix it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by chapterjason
  1. 'error' => $error,
  2. )
  3. );
  4. }
  5. }

    This file ends with no newline character. It won't render properly on a terminal, and it's considered a bad practice. Add a simple line feed as the last character to fix it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by chapterjason
  1. $resolver->setDefaults(
  2. [
  3. ]
  4. );
  5. }
  6. }

    This file ends with no newline character. It won't render properly on a terminal, and it's considered a bad practice. Add a simple line feed as the last character to fix it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by chapterjason
  1. [
  2. 'data_class' => UserInterface::class,
  3. ]
  4. );
  5. }
  6. }

    This file ends with no newline character. It won't render properly on a terminal, and it's considered a bad practice. Add a simple line feed as the last character to fix it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by chapterjason
  1. vendor/

    This file ends with no newline character. It won't render properly on a terminal, and it's considered a bad practice. Add a simple line feed as the last character to fix it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by chapterjason
  1. <directory>./Tests</directory>
  2. <directory>./vendor</directory>
  3. </exclude>
  4. </whitelist>
  5. </filter>
  6. </phpunit>

    This file ends with no newline character. It won't render properly on a terminal, and it's considered a bad practice. Add a simple line feed as the last character to fix it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by chapterjason
  1. */
  2. protected function findUser(string $uniqueIdentifier)
  3. {
  4. return $this->repository->findOneBy([$this->field => $uniqueIdentifier]);
  5. }
  6. }

    This file ends with no newline character. It won't render properly on a terminal, and it's considered a bad practice. Add a simple line feed as the last character to fix it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by chapterjason
  1. * Interface UserProviderInterface
  2. * @package SoureCode\Bundle\UserBundle\Provider
  3. */
  4. interface UserProviderInterface extends BaseUserProviderInterface
  5. {
  6. }

    This file ends with no newline character. It won't render properly on a terminal, and it's considered a bad practice. Add a simple line feed as the last character to fix it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by chapterjason
  1. **framework.yaml**
  2. framework:
  3. session:
  4. handler_id: ~
  5. This file ends with no newline character. It won't render properly on a terminal, and it's considered a bad practice. Add a simple line feed as the last character to fix it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by chapterjason
  1. use Doctrine\ORM\EntityRepository;
  2. use SoureCode\Component\User\Repository\UserRepositoryInterface;
  3. class UserRepository extends EntityRepository implements UserRepositoryInterface
  4. {
  5. }

    This file ends with no newline character. It won't render properly on a terminal, and it's considered a bad practice. Add a simple line feed as the last character to fix it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by chapterjason
  1. <field name="credentialsExpireAt" column="credentials_expire_at" type="datetime" nullable="true"/>
  2. <field name="roles" column="roles" type="array" nullable="false"/>
  3. </entity>
  4. </doctrine-mapping>

    This file ends with no newline character. It won't render properly on a terminal, and it's considered a bad practice. Add a simple line feed as the last character to fix it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by chapterjason
  1. <route id="soure_code_user_login" path="/login" methods="GET|POST">
  2. <default key="_controller">SoureCodeUserBundle:Authentication:login</default>
  3. </route>
  4. <route id="soure_code_user_logout" path="/logout" methods="GET"/>
  5. </routes>

    This file ends with no newline character. It won't render properly on a terminal, and it's considered a bad practice. Add a simple line feed as the last character to fix it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by chapterjason
  1. <!-- For Controller Autowire -->
  2. <prototype namespace="SoureCode\Bundle\UserBundle\Controller\" resource="../../Controller">
  3. <tag name="controller.service_arguments"/>
  4. </prototype>
  5. </services>
  6. </container>

    This file ends with no newline character. It won't render properly on a terminal, and it's considered a bad practice. Add a simple line feed as the last character to fix it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by chapterjason
  1. {% if error %}
  2. <div>{{ error.messageKey|trans(error.messageData, 'security') }}</div>
  3. {% endif %}
  4. {{ form(form) }}

    This file ends with no newline character. It won't render properly on a terminal, and it's considered a bad practice. Add a simple line feed as the last character to fix it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by chapterjason
  1. {{ form(form) }}

    This file ends with no newline character. It won't render properly on a terminal, and it's considered a bad practice. Add a simple line feed as the last character to fix it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by chapterjason
  1. /phpunit.xml
  2. vendor/

    This file ends with no newline character. It won't render properly on a terminal, and it's considered a bad practice. Add a simple line feed as the last character to fix it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by chapterjason
  1. * @param null|UserInterface $user
  2. * @return mixed
  3. */
  4. public function setUser(?UserInterface $user);
  5. }

    This file ends with no newline character. It won't render properly on a terminal, and it's considered a bad practice. Add a simple line feed as the last character to fix it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by chapterjason
  1. /**
  2. * @param string $role
  3. */
  4. public function removeRole(string $role): void;
  5. }

    This file ends with no newline character. It won't render properly on a terminal, and it's considered a bad practice. Add a simple line feed as the last character to fix it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by chapterjason
  1. <directory>./Tests</directory>
  2. <directory>./vendor</directory>
  3. </exclude>
  4. </whitelist>
  5. </filter>
  6. </phpunit>

    This file ends with no newline character. It won't render properly on a terminal, and it's considered a bad practice. Add a simple line feed as the last character to fix it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by chapterjason
  1. SoureCode - UserComponent
  2. ======================
  3. This component provides you with the basic resources for creating user-relevant systems.

    This file ends with no newline character. It won't render properly on a terminal, and it's considered a bad practice. Add a simple line feed as the last character to fix it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by chapterjason
  1. * Interface UserRepositoryInterface
  2. * @package SoureCode\Component\User\Repository
  3. */
  4. interface UserRepositoryInterface extends ObjectRepository
  5. {
  6. }

    This file ends with no newline character. It won't render properly on a terminal, and it's considered a bad practice. Add a simple line feed as the last character to fix it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by chapterjason
in .travis.yml, line 36
  1. script:
  2. - phpunit --coverage-clover build/logs/clover.xml
  3. # Execute coveralls
  4. after_success:
  5. - travis_retry php coveralls.phar -v

    This file ends with no newline character. It won't render properly on a terminal, and it's considered a bad practice. Add a simple line feed as the last character to fix it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by chapterjason