@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | $c = new \Slim\Container($configuration); |
| 14 | 14 | $api = new \Slim\App($c); |
| 15 | 15 | |
| 16 | -$api->get('/ping', function ($request, $response, $args) { |
|
| 16 | +$api->get('/ping', function($request, $response, $args) { |
|
| 17 | 17 | $jsonResp = json_encode( |
| 18 | 18 | [ |
| 19 | 19 | "status" => "service up", |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | return Responder::getJsonResponse($jsonResp, $response); |
| 24 | 24 | }); |
| 25 | 25 | |
| 26 | -$api->get('/users', function ($request, $response, $args) { |
|
| 26 | +$api->get('/users', function($request, $response, $args) { |
|
| 27 | 27 | return Responder::getJsonResponse( |
| 28 | 28 | \App\Models\User::all(), |
| 29 | 29 | $response |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | public function run() |
| 14 | 14 | { |
| 15 | 15 | Capsule::schema()->dropIfExists('users'); |
| 16 | - Capsule::schema()->create('users', function (Blueprint $table) { |
|
| 16 | + Capsule::schema()->create('users', function(Blueprint $table) { |
|
| 17 | 17 | $table->increments('id'); |
| 18 | 18 | $table->string('name'); |
| 19 | 19 | $table->string('surname'); |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | public static function getFirstMatch($regexp, $target) |
| 24 | 24 | { |
| 25 | 25 | preg_match_all($regexp, $target, $matches); |
| 26 | - $match = array_key_exists(0,$matches[1]) ? $matches[1][0] : null; |
|
| 26 | + $match = array_key_exists(0, $matches[1]) ? $matches[1][0] : null; |
|
| 27 | 27 | return $match; |
| 28 | 28 | } |
| 29 | 29 | |
@@ -20,10 +20,10 @@ |
||
| 20 | 20 | * @return string |
| 21 | 21 | */ |
| 22 | 22 | public static function getHtml($node) { |
| 23 | - $innerHTML= ''; |
|
| 23 | + $innerHTML = ''; |
|
| 24 | 24 | $children = $node->childNodes; |
| 25 | 25 | foreach ($children as $child) { |
| 26 | - $innerHTML .= $child->ownerDocument->saveXML( $child ); |
|
| 26 | + $innerHTML .= $child->ownerDocument->saveXML($child); |
|
| 27 | 27 | } |
| 28 | 28 | return $innerHTML; |
| 29 | 29 | } |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | */ |
| 11 | 11 | public function testIlluminateConnection() |
| 12 | 12 | { |
| 13 | - Illuminate\Database\Capsule\Manager::schema()->create('test', function (Blueprint $table) { |
|
| 13 | + Illuminate\Database\Capsule\Manager::schema()->create('test', function(Blueprint $table) { |
|
| 14 | 14 | $table->increments('id'); |
| 15 | 15 | $table->string('email')->unique(); |
| 16 | 16 | $table->timestamps(); |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | $targetCoverage = $this->getArg(1); |
| 20 | 20 | |
| 21 | 21 | $inputFile = !empty($inputFile) ? $inputFile : "clover.xml"; |
| 22 | - $targetCoverage = (int)(!empty($targetCoverage) ? $targetCoverage : 1); |
|
| 22 | + $targetCoverage = (int) (!empty($targetCoverage) ? $targetCoverage : 1); |
|
| 23 | 23 | $percentage = min(100, max(0, $targetCoverage)); |
| 24 | 24 | |
| 25 | 25 | if (!file_exists($inputFile)) { |
@@ -36,8 +36,8 @@ discard block |
||
| 36 | 36 | $checkedElements = 0; |
| 37 | 37 | |
| 38 | 38 | foreach ($metrics as $metric) { |
| 39 | - $totalElements += (int)$metric['elements']; |
|
| 40 | - $checkedElements += (int)$metric['coveredelements']; |
|
| 39 | + $totalElements += (int) $metric['elements']; |
|
| 40 | + $checkedElements += (int) $metric['coveredelements']; |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | $coverage = ($checkedElements / $totalElements) * 100; |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | */ |
| 37 | 37 | public static function snakeToCamelCase($string, $ucFirst = true) |
| 38 | 38 | { |
| 39 | - $string = preg_replace_callback("/(?:^|_)([a-z])/", function ($matches) { |
|
| 39 | + $string = preg_replace_callback("/(?:^|_)([a-z])/", function($matches) { |
|
| 40 | 40 | return strtoupper($matches[1]); |
| 41 | 41 | }, $string); |
| 42 | 42 | |