@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | return [ |
4 | - //Stuff |
|
5 | - 'stuff' => 1, |
|
4 | + //Stuff |
|
5 | + 'stuff' => 1, |
|
6 | 6 | ]; |
7 | 7 | \ No newline at end of file |
@@ -21,11 +21,11 @@ discard block |
||
21 | 21 | * @return null |
22 | 22 | */ |
23 | 23 | public static function getFirstMatch($regexp, $target) |
24 | - { |
|
25 | - preg_match_all($regexp, $target, $matches); |
|
26 | - $match = array_key_exists(0,$matches[1]) ? $matches[1][0] : null; |
|
27 | - return $match; |
|
28 | - } |
|
24 | + { |
|
25 | + preg_match_all($regexp, $target, $matches); |
|
26 | + $match = array_key_exists(0,$matches[1]) ? $matches[1][0] : null; |
|
27 | + return $match; |
|
28 | + } |
|
29 | 29 | |
30 | 30 | /** |
31 | 31 | * @param $regexp |
@@ -33,10 +33,10 @@ discard block |
||
33 | 33 | * @return null |
34 | 34 | */ |
35 | 35 | public static function getAllMatch($regexp, $target) |
36 | - { |
|
37 | - $matches = null; |
|
38 | - preg_match_all($regexp, $target, $matches); |
|
39 | - return $matches; |
|
40 | - } |
|
36 | + { |
|
37 | + $matches = null; |
|
38 | + preg_match_all($regexp, $target, $matches); |
|
39 | + return $matches; |
|
40 | + } |
|
41 | 41 | |
42 | 42 | } |
43 | 43 | \ No newline at end of file |
@@ -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,12 +20,12 @@ |
||
20 | 20 | * @return string |
21 | 21 | */ |
22 | 22 | public static function getHtml($node) { |
23 | - $innerHTML= ''; |
|
24 | - $children = $node->childNodes; |
|
25 | - foreach ($children as $child) { |
|
26 | - $innerHTML .= $child->ownerDocument->saveXML( $child ); |
|
27 | - } |
|
28 | - return $innerHTML; |
|
29 | - } |
|
23 | + $innerHTML= ''; |
|
24 | + $children = $node->childNodes; |
|
25 | + foreach ($children as $child) { |
|
26 | + $innerHTML .= $child->ownerDocument->saveXML( $child ); |
|
27 | + } |
|
28 | + return $innerHTML; |
|
29 | + } |
|
30 | 30 | |
31 | 31 | } |
32 | 32 | \ No newline at end of file |
@@ -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 | } |
@@ -5,25 +5,25 @@ |
||
5 | 5 | class EloquentConnectionTest extends PHPUnit_Framework_TestCase |
6 | 6 | { |
7 | 7 | |
8 | - /** |
|
9 | - * |
|
10 | - */ |
|
11 | - public function testIlluminateConnection() |
|
12 | - { |
|
13 | - Illuminate\Database\Capsule\Manager::schema()->create('test', function (Blueprint $table) { |
|
14 | - $table->increments('id'); |
|
15 | - $table->string('email')->unique(); |
|
16 | - $table->timestamps(); |
|
17 | - }); |
|
8 | + /** |
|
9 | + * |
|
10 | + */ |
|
11 | + public function testIlluminateConnection() |
|
12 | + { |
|
13 | + Illuminate\Database\Capsule\Manager::schema()->create('test', function (Blueprint $table) { |
|
14 | + $table->increments('id'); |
|
15 | + $table->string('email')->unique(); |
|
16 | + $table->timestamps(); |
|
17 | + }); |
|
18 | 18 | |
19 | - \Illuminate\Database\Capsule\Manager::table('test')->insert( |
|
20 | - [ |
|
21 | - 'email' => '[email protected]' |
|
22 | - ] |
|
23 | - ); |
|
19 | + \Illuminate\Database\Capsule\Manager::table('test')->insert( |
|
20 | + [ |
|
21 | + 'email' => '[email protected]' |
|
22 | + ] |
|
23 | + ); |
|
24 | 24 | |
25 | - $test = \Illuminate\Database\Capsule\Manager::table('test')->first(); |
|
26 | - $this->assertNotEmpty($test); |
|
27 | - \Illuminate\Database\Capsule\Manager::schema()->drop('test'); |
|
28 | - } |
|
25 | + $test = \Illuminate\Database\Capsule\Manager::table('test')->first(); |
|
26 | + $this->assertNotEmpty($test); |
|
27 | + \Illuminate\Database\Capsule\Manager::schema()->drop('test'); |
|
28 | + } |
|
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(); |
@@ -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 |
@@ -43,8 +43,8 @@ discard block |
||
43 | 43 | $checkedElements = 0; |
44 | 44 | |
45 | 45 | foreach ($metrics as $metric) { |
46 | - $totalElements += (int)$metric['elements']; |
|
47 | - $checkedElements += (int)$metric['coveredelements']; |
|
46 | + $totalElements += (int) $metric['elements']; |
|
47 | + $checkedElements += (int) $metric['coveredelements']; |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | return round(($checkedElements / $totalElements) * 100, 2); |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | private function getTargetCoverage() |
54 | 54 | { |
55 | 55 | $target = $this->getArg(0); |
56 | - $target = (int)(!empty($target) ? $target : 1); |
|
56 | + $target = (int) (!empty($target) ? $target : 1); |
|
57 | 57 | $percentage = min(100, max(0, $target)); |
58 | 58 | if (!$percentage) { |
59 | 59 | throw new InvalidArgumentException('An integer checked percentage must be given as second parameter [0-100]'); |
@@ -12,7 +12,7 @@ |
||
12 | 12 | { |
13 | 13 | $tableName = 'users'; |
14 | 14 | Capsule::schema()->dropIfExists($tableName); |
15 | - Capsule::schema()->create($tableName, function (Blueprint $table) { |
|
15 | + Capsule::schema()->create($tableName, function(Blueprint $table) { |
|
16 | 16 | $table->increments('id'); |
17 | 17 | $table->string('name'); |
18 | 18 | $table->string('surname'); |
@@ -21,7 +21,7 @@ |
||
21 | 21 | protected function getStub() |
22 | 22 | { |
23 | 23 | return PHP_EOL . |
24 | - '$api->get(\'/'.$this->getArg(0).'\', function ($request, $response, $args) { |
|
24 | + '$api->get(\'/' . $this->getArg(0) . '\', function ($request, $response, $args) { |
|
25 | 25 | return ( |
26 | 26 | new SOMEACTION( |
27 | 27 | $request, |
@@ -2,7 +2,7 @@ |
||
2 | 2 | use App\Actions\User\UserGetAll; |
3 | 3 | |
4 | 4 | |
5 | -$api->get('/users', function ($request, $response, $args) { |
|
5 | +$api->get('/users', function($request, $response, $args) { |
|
6 | 6 | return ( |
7 | 7 | new UserGetAll( |
8 | 8 | $request, |