@@ -152,8 +152,8 @@ |
||
| 152 | 152 | $subject = new Subject($data); |
| 153 | 153 | |
| 154 | 154 | $checker = new Checker($subject, array( |
| 155 | - 'codiceFiscaleToCheck' => $data['codiceFiscale'], |
|
| 156 | - 'omocodiaLevel' => $data['omocodiaLevel'] |
|
| 155 | + 'codiceFiscaleToCheck' => $data['codiceFiscale'], |
|
| 156 | + 'omocodiaLevel' => $data['omocodiaLevel'] |
|
| 157 | 157 | )); |
| 158 | 158 | |
| 159 | 159 | 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'], |
@@ -69,7 +69,7 @@ discard block |
||
| 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 |
||
| 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'], |
@@ -159,8 +159,7 @@ |
||
| 159 | 159 | if ($checker->check()) { |
| 160 | 160 | $response->status = true; |
| 161 | 161 | $response->message = 'Valid codice fiscale'; |
| 162 | - } |
|
| 163 | - else { |
|
| 162 | + } else { |
|
| 164 | 163 | $response->status = false; |
| 165 | 164 | $response->message = 'Invalid codice fiscale'; |
| 166 | 165 | } |