From 53107d897fc65698bfa9245d1e0fd8af778508ca Mon Sep 17 00:00:00 2001 From: PHP Shift Date: Thu, 12 Dec 2019 17:42:23 +0000 Subject: [PATCH 1/2] Shift phpunit/phpunit dependency --- composer.json | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/composer.json b/composer.json index bf7f8f1..3818110 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,10 @@ { "name": "laravel/laravel", "description": "The Laravel Framework.", - "keywords": ["framework", "laravel"], + "keywords": [ + "framework", + "laravel" + ], "license": "MIT", "type": "project", "require": { @@ -16,7 +19,7 @@ "fzaninotto/faker": "^1.4", "mockery/mockery": "^1.0", "nunomaduro/collision": "^2.0", - "phpunit/phpunit": "^7.0" + "phpunit/phpunit": "^8.0" }, "autoload": { "classmap": [ @@ -26,7 +29,7 @@ "psr-4": { "App\\": "app/" }, - "files":[ + "files": [ "app/Helpers/Bet360Helpers.php" ] }, @@ -37,8 +40,7 @@ }, "extra": { "laravel": { - "dont-discover": [ - ] + "dont-discover": [] } }, "scripts": { @@ -52,7 +54,7 @@ "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", "@php artisan package:discover" ], - "test" : [ + "test": [ "vendor/bin/phpunit" ] }, @@ -63,4 +65,4 @@ }, "minimum-stability": "dev", "prefer-stable": true -} +} \ No newline at end of file From 9e3a081dfc26f8770b22a7febd708f597e7237d1 Mon Sep 17 00:00:00 2001 From: PHP Shift Date: Thu, 12 Dec 2019 17:42:23 +0000 Subject: [PATCH 2/2] Convert to short array syntax Since PHP 5.4 the short array syntax replaces `array()` with `[]`. If you do not wish to adopt this syntax you can use [git revert][1] to undo these changes. [1]: https://www.atlassian.com/git/tutorials/undoing-changes/git-revert --- app/Http/Controllers/ApiController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/ApiController.php b/app/Http/Controllers/ApiController.php index e26e233..d7ac089 100644 --- a/app/Http/Controllers/ApiController.php +++ b/app/Http/Controllers/ApiController.php @@ -167,11 +167,11 @@ public function transactions(Request $request) $to = $request->get('to'); $user_id = $request->get('user_id'); - $request = Transaction::with(array('user' => function($query) + $request = Transaction::with(['user' => function($query) { $query->select('name', 'id'); - })); + }]); if($user_id){ $request->where('user_id', $user_id);