@@ -128,8 +128,8 @@ |
||
| 128 | 128 | $subject = new Subject($data); |
| 129 | 129 | |
| 130 | 130 | $checker = new Checker($subject, array( |
| 131 | - 'codiceFiscaleToCheck' => $data['codiceFiscale'], |
|
| 132 | - 'omocodiaLevel' => $data['omocodiaLevel'], |
|
| 131 | + 'codiceFiscaleToCheck' => $data['codiceFiscale'], |
|
| 132 | + 'omocodiaLevel' => $data['omocodiaLevel'], |
|
| 133 | 133 | )); |
| 134 | 134 | |
| 135 | 135 | if ($checker->check()) { |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | $api = $app['controllers_factory']; |
| 21 | 21 | |
| 22 | 22 | //Calculate the codice fiscale by the given parameters. |
| 23 | - $api->get('/calculate', function (Application $app, Request $request) { |
|
| 23 | + $api->get('/calculate', function(Application $app, Request $request) { |
|
| 24 | 24 | $constraint = new Assert\Collection(array( |
| 25 | 25 | 'name' => $app['codice-fiscale-rest.constraints']['name'], |
| 26 | 26 | 'surname' => $app['codice-fiscale-rest.constraints']['surname'], |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | ->bind('apiCalculate'); |
| 62 | 62 | |
| 63 | 63 | //Calculate all the codice fiscale by the given parameters. |
| 64 | - $api->get('/calculateAll', function (Application $app, Request $request) { |
|
| 64 | + $api->get('/calculateAll', function(Application $app, Request $request) { |
|
| 65 | 65 | $constraint = new Assert\Collection(array( |
| 66 | 66 | 'name' => $app['codice-fiscale-rest.constraints']['name'], |
| 67 | 67 | 'surname' => $app['codice-fiscale-rest.constraints']['surname'], |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | ->bind('apiCalculateAll'); |
| 99 | 99 | |
| 100 | 100 | //Check if the given parameters are ok for the given parameters. |
| 101 | - $api->get('/check', function (Application $app, Request $request) { |
|
| 101 | + $api->get('/check', function(Application $app, Request $request) { |
|
| 102 | 102 | $constraint = new Assert\Collection(array( |
| 103 | 103 | 'name' => $app['codice-fiscale-rest.constraints']['name'], |
| 104 | 104 | 'surname' => $app['codice-fiscale-rest.constraints']['surname'], |
@@ -67,8 +67,8 @@ |
||
| 67 | 67 | break; |
| 68 | 68 | } |
| 69 | 69 | return $app['twig']->render('error.twig', array( |
| 70 | - 'message' => $message, |
|
| 71 | - 'code' => $code |
|
| 70 | + 'message' => $message, |
|
| 71 | + 'code' => $code |
|
| 72 | 72 | )); |
| 73 | 73 | }); |
| 74 | 74 | |
@@ -39,24 +39,24 @@ discard block |
||
| 39 | 39 | ); |
| 40 | 40 | |
| 41 | 41 | //Home page |
| 42 | -$app->get('/', function (Silex\Application $app) { |
|
| 42 | +$app->get('/', function(Silex\Application $app) { |
|
| 43 | 43 | return $app['twig']->render('index.twig'); |
| 44 | 44 | }) |
| 45 | 45 | ->bind('homepage'); |
| 46 | 46 | |
| 47 | 47 | //Documentazione |
| 48 | -$app->get('/documentazione', function (Silex\Application $app) { |
|
| 48 | +$app->get('/documentazione', function(Silex\Application $app) { |
|
| 49 | 49 | return $app['twig']->render('documentazione.twig'); |
| 50 | 50 | }) |
| 51 | 51 | ->bind('documentazione'); |
| 52 | 52 | |
| 53 | 53 | //Prova |
| 54 | -$app->get('/prova', function (Silex\Application $app) { |
|
| 54 | +$app->get('/prova', function(Silex\Application $app) { |
|
| 55 | 55 | return $app['twig']->render('prova.twig'); |
| 56 | 56 | }) |
| 57 | 57 | ->bind('prova'); |
| 58 | 58 | |
| 59 | -$app->error(function (\Exception $e, $code) use ($app) { |
|
| 59 | +$app->error(function(\Exception $e, $code) use ($app) { |
|
| 60 | 60 | switch ($code) { |
| 61 | 61 | case 404: |
| 62 | 62 | $message = 'The requested page could not be found.'; |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | |
| 75 | 75 | $app->mount('/api/codiceFiscale', new DavidePastore\CodiceFiscaleRest\CodiceFiscaleControllerProvider()); |
| 76 | 76 | |
| 77 | -$app->after(function (Request $request, Response $response) { |
|
| 77 | +$app->after(function(Request $request, Response $response) { |
|
| 78 | 78 | $response->headers->set('Access-Control-Allow-Origin', '*'); |
| 79 | 79 | }); |
| 80 | 80 | |