@@ -3,7 +3,6 @@ |
||
| 3 | 3 | namespace LoginCidadao\APIBundle\Controller; |
| 4 | 4 | |
| 5 | 5 | use FOS\RestBundle\Controller\FOSRestController; |
| 6 | -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; |
|
| 7 | 6 | use FOS\RestBundle\Controller\Annotations as REST; |
| 8 | 7 | use Symfony\Component\HttpFoundation\Request; |
| 9 | 8 | use LoginCidadao\CoreBundle\Entity\Country; |
@@ -5,11 +5,9 @@ |
||
| 5 | 5 | use FOS\RestBundle\Controller\FOSRestController; |
| 6 | 6 | use JMS\Serializer\SerializationContext; |
| 7 | 7 | use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException; |
| 8 | -use LoginCidadao\CoreBundle\Entity\Person; |
|
| 9 | 8 | use LoginCidadao\CoreBundle\Entity\Authorization; |
| 10 | 9 | use LoginCidadao\CoreBundle\Model\PersonInterface; |
| 11 | 10 | use LoginCidadao\OAuthBundle\Model\ClientInterface; |
| 12 | -use LoginCidadao\OAuthBundle\Model\ClientUser; |
|
| 13 | 11 | |
| 14 | 12 | class BaseController extends FOSRestController |
| 15 | 13 | { |
@@ -7,15 +7,11 @@ |
||
| 7 | 7 | use LoginCidadao\APIBundle\Exception\RequestTimeoutException; |
| 8 | 8 | use LoginCidadao\CoreBundle\Entity\Person; |
| 9 | 9 | use LoginCidadao\CoreBundle\Entity\Authorization; |
| 10 | -use Symfony\Component\HttpKernel\Exception\BadRequestHttpException; |
|
| 11 | -use Symfony\Component\Security\Core\Exception\AccessDeniedException; |
|
| 12 | 10 | use Symfony\Component\HttpFoundation\Request; |
| 13 | -use Symfony\Component\HttpKernel\Exception\HttpException; |
|
| 14 | 11 | use LoginCidadao\NotificationBundle\Entity\Notification; |
| 15 | 12 | use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; |
| 16 | 13 | use Nelmio\ApiDocBundle\Annotation\ApiDoc; |
| 17 | 14 | use LoginCidadao\CoreBundle\Model\PersonInterface; |
| 18 | -use LoginCidadao\OAuthBundle\Model\ClientInterface; |
|
| 19 | 15 | use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException; |
| 20 | 16 | use LoginCidadao\OAuthBundle\Model\ClientUser; |
| 21 | 17 | use LoginCidadao\APIBundle\Security\Audit\Annotation as Audit; |
@@ -3,7 +3,6 @@ |
||
| 3 | 3 | namespace LoginCidadao\APIBundle\Entity; |
| 4 | 4 | |
| 5 | 5 | use Doctrine\ORM\Mapping as ORM; |
| 6 | -use LoginCidadao\CoreBundle\Model\PersonInterface; |
|
| 7 | 6 | use LoginCidadao\OAuthBundle\Model\ClientInterface; |
| 8 | 7 | |
| 9 | 8 | /** |
@@ -5,7 +5,6 @@ |
||
| 5 | 5 | use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; |
| 6 | 6 | use Symfony\Component\Console\Input\InputArgument; |
| 7 | 7 | use Symfony\Component\Console\Input\InputInterface; |
| 8 | -use Symfony\Component\Console\Input\InputOption; |
|
| 9 | 8 | use Symfony\Component\Console\Output\OutputInterface; |
| 10 | 9 | use Doctrine\ORM\EntityManager; |
| 11 | 10 | use LoginCidadao\NotificationBundle\Entity\Category; |
@@ -2,7 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace LoginCidadao\CoreBundle\Controller\Admin; |
| 4 | 4 | |
| 5 | -use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; |
|
| 6 | 5 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; |
| 7 | 6 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
| 8 | 7 | use Symfony\Component\Routing\Annotation\Route; |
@@ -7,7 +7,6 @@ |
||
| 7 | 7 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
| 8 | 8 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; |
| 9 | 9 | use Symfony\Component\Security\Core\Exception\AccessDeniedException; |
| 10 | -use LoginCidadao\CoreBundle\Helper\GridHelper; |
|
| 11 | 10 | use LoginCidadao\CoreBundle\Form\Type\RemoveIdCardFormType; |
| 12 | 11 | use LoginCidadao\CoreBundle\Model\PersonInterface; |
| 13 | 12 | use Doctrine\Common\Collections\Collection; |
@@ -11,7 +11,6 @@ discard block |
||
| 11 | 11 | namespace LoginCidadao\CoreBundle\Controller; |
| 12 | 12 | |
| 13 | 13 | use Symfony\Component\HttpFoundation\Request; |
| 14 | -use JMS\Serializer\SerializationContext; |
|
| 15 | 14 | use Symfony\Component\HttpFoundation\JsonResponse; |
| 16 | 15 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
| 17 | 16 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
@@ -21,7 +20,6 @@ discard block |
||
| 21 | 20 | use FOS\UserBundle\FOSUserEvents; |
| 22 | 21 | use FOS\UserBundle\Event\FilterUserResponseEvent; |
| 23 | 22 | use FOS\UserBundle\Util\TokenGenerator; |
| 24 | -use LoginCidadao\CoreBundle\Form\Type\DocFormType; |
|
| 25 | 23 | use FOS\UserBundle\Event\GetResponseUserEvent; |
| 26 | 24 | use FOS\UserBundle\Event\FormEvent; |
| 27 | 25 | use LoginCidadao\CoreBundle\EventListener\ProfileEditListner; |
@@ -29,9 +27,6 @@ discard block |
||
| 29 | 27 | use LoginCidadao\CoreBundle\Entity\IdCard; |
| 30 | 28 | use Symfony\Component\HttpFoundation\Response; |
| 31 | 29 | use Symfony\Component\Form\FormError; |
| 32 | -use LoginCidadao\BadgesBundle\BadgesEvents; |
|
| 33 | -use LoginCidadao\BadgesBundle\Event\EvaluateBadgesEvent; |
|
| 34 | -use LoginCidadao\BadgesBundle\Event\ListBadgesEvent; |
|
| 35 | 30 | use LoginCidadao\CoreBundle\Helper\GridHelper; |
| 36 | 31 | |
| 37 | 32 | class PersonController extends Controller |
@@ -461,11 +461,21 @@ |
||
| 461 | 461 | $n5 = ($rg[0] * 2) % 9; |
| 462 | 462 | $total = $n1 + $n2 + $n3 + $n4 + $n5 + $rg[7] + $rg[5] + $rg[3] + $rg[1]; |
| 463 | 463 | |
| 464 | - if ($rg[8] == 9) $total = $total + 9; |
|
| 465 | - if ($rg[6] == 9) $total = $total + 9; |
|
| 466 | - if ($rg[4] == 9) $total = $total + 9; |
|
| 467 | - if ($rg[2] == 9) $total = $total + 9; |
|
| 468 | - if ($rg[0] == 9) $total = $total + 9; |
|
| 464 | + if ($rg[8] == 9) { |
|
| 465 | + $total = $total + 9; |
|
| 466 | + } |
|
| 467 | + if ($rg[6] == 9) { |
|
| 468 | + $total = $total + 9; |
|
| 469 | + } |
|
| 470 | + if ($rg[4] == 9) { |
|
| 471 | + $total = $total + 9; |
|
| 472 | + } |
|
| 473 | + if ($rg[2] == 9) { |
|
| 474 | + $total = $total + 9; |
|
| 475 | + } |
|
| 476 | + if ($rg[0] == 9) { |
|
| 477 | + $total = $total + 9; |
|
| 478 | + } |
|
| 469 | 479 | |
| 470 | 480 | $resto = $total % 10; |
| 471 | 481 | |
@@ -2,7 +2,6 @@ |
||
| 2 | 2 | namespace LoginCidadao\CoreBundle\Entity; |
| 3 | 3 | |
| 4 | 4 | use Doctrine\ORM\Mapping as ORM; |
| 5 | -use LoginCidadao\OAuthBundle\Entity\Client; |
|
| 6 | 5 | use LoginCidadao\CoreBundle\Entity\Person; |
| 7 | 6 | |
| 8 | 7 | /** |