Completed
Push — master ( 92f766...492373 )
by Davide
02:13
created
app.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -36,24 +36,24 @@  discard block
 block discarded – undo
36 36
 );
37 37
 
38 38
 //Home page
39
-$app->get('/', function (Silex\Application $app) {
39
+$app->get('/', function(Silex\Application $app) {
40 40
     return $app['twig']->render('index.twig');
41 41
 })
42 42
 ->bind('homepage');
43 43
 
44 44
 //Documentazione
45
-$app->get('/documentazione', function (Silex\Application $app) {
45
+$app->get('/documentazione', function(Silex\Application $app) {
46 46
     return $app['twig']->render('documentazione.twig');
47 47
 })
48 48
 ->bind('documentazione');
49 49
 
50 50
 //Prova
51
-$app->get('/prova', function (Silex\Application $app) {
51
+$app->get('/prova', function(Silex\Application $app) {
52 52
     return $app['twig']->render('prova.twig');
53 53
 })
54 54
 ->bind('prova');
55 55
 
56
-$app->error(function (\Exception $e, $code) {
56
+$app->error(function(\Exception $e, $code) {
57 57
     switch ($code) {
58 58
         case 404:
59 59
             $message = 'The requested page could not be found.';
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 
69 69
 $app->mount('/api/codiceFiscale', require 'api.php');
70 70
 
71
-$app->after(function (Request $request, Response $response) {
71
+$app->after(function(Request $request, Response $response) {
72 72
     $response->headers->set('Access-Control-Allow-Origin', '*');
73 73
 });
74 74
 
Please login to merge, or discard this patch.
src/DavidePastore/CodiceFiscaleRest/CodiceFiscaleControllerProvider.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
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'],
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 
70 70
 
71 71
         //Calculate all the codice fiscale by the given parameters.
72
-        $api->get('/calculateAll', function (Application $app, Request $request) {
72
+        $api->get('/calculateAll', function(Application $app, Request $request) {
73 73
             $constraint = new Assert\Collection(array(
74 74
                 'name' => $app['codice-fiscale-rest.constraints']['name'],
75 75
                 'surname' => $app['codice-fiscale-rest.constraints']['surname'],
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
         ->bind('apiCalculateAll');
115 115
 
116 116
         //Check if the given parameters are ok for the given parameters.
117
-        $api->get('/check', function (Application $app, Request $request) {
117
+        $api->get('/check', function(Application $app, Request $request) {
118 118
             $constraint = new Assert\Collection(array(
119 119
                 'name' => $app['codice-fiscale-rest.constraints']['name'],
120 120
                 'surname' => $app['codice-fiscale-rest.constraints']['surname'],
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -128,8 +128,8 @@
 block discarded – undo
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()) {
Please login to merge, or discard this patch.