From 7c3d536991ad3a83b909b2ae8d29f2933e195137 Mon Sep 17 00:00:00 2001 From: overtrue Date: Fri, 1 Jan 2016 07:56:38 -0500 Subject: [PATCH] Applied fixes from StyleCI --- src/Cache/Adapters/AdapterInterface.php | 1 - src/Cache/Adapters/FileAdapter.php | 1 - src/Cache/Manager.php | 1 - src/Card/Card.php | 1 - src/Card/CardHttpException.php | 1 - src/Card/Color.php | 1 - src/Card/Image.php | 1 - src/Core/AbstractAPI.php | 1 - src/Core/AccessToken.php | 1 - src/Core/Exception.php | 1 - src/Core/Exceptions/FaultException.php | 1 - src/Core/Exceptions/HttpException.php | 1 - src/Core/Exceptions/InvalidArgumentException.php | 1 - src/Core/Exceptions/InvalidConfigException.php | 1 - src/Core/Exceptions/RuntimeException.php | 1 - src/Core/Exceptions/UnboundServiceException.php | 1 - src/Core/Http.php | 1 - src/Device/DeviceHttpException.php | 1 - src/Encryption/EncryptionException.php | 1 - src/Encryption/Encryptor.php | 3 +-- src/Foundation/Application.php | 1 - src/Foundation/Config.php | 1 - src/Foundation/ServiceProviders/JsServiceProvider.php | 1 - .../ServiceProviders/MaterialServiceProvider.php | 1 - src/Foundation/ServiceProviders/MenuServiceProvider.php | 1 - src/Foundation/ServiceProviders/NoticeServiceProvider.php | 1 - src/Foundation/ServiceProviders/OAuthServiceProvider.php | 1 - src/Foundation/ServiceProviders/POIServiceProvider.php | 1 - .../ServiceProviders/PaymentServiceProvider.php | 1 - src/Foundation/ServiceProviders/QRCodeServiceProvider.php | 1 - .../ServiceProviders/SemanticServiceProvider.php | 1 - src/Foundation/ServiceProviders/ServerServiceProvider.php | 1 - src/Foundation/ServiceProviders/StaffServiceProvider.php | 1 - src/Foundation/ServiceProviders/StatsServiceProvider.php | 1 - src/Foundation/ServiceProviders/UrlServiceProvider.php | 1 - src/Foundation/ServiceProviders/UserServiceProvider.php | 1 - src/Js/Js.php | 1 - src/Material/Material.php | 5 ++--- src/Material/Temporary.php | 1 - src/Menu/Menu.php | 1 - src/Message/AbstractMessage.php | 1 - src/Message/Article.php | 1 - src/Message/Image.php | 1 - src/Message/Link.php | 1 - src/Message/Location.php | 1 - src/Message/Music.php | 1 - src/Message/News.php | 1 - src/Message/Raw.php | 1 - src/Message/ShortVideo.php | 1 - src/Message/Text.php | 1 - src/Message/Transfer.php | 1 - src/Message/Video.php | 1 - src/Message/Voice.php | 1 - src/Notice/Notice.php | 1 - src/POI/POI.php | 1 - src/Payment/API.php | 1 - src/Payment/Merchant.php | 1 - src/Payment/Order.php | 1 - src/Payment/Payment.php | 1 - src/Payment/helpers.php | 1 - src/QRCode/QRCode.php | 1 - src/Semantic/Semantic.php | 1 - src/Server/BadRequestException.php | 1 - src/Server/Guard.php | 1 - src/Server/Transformer.php | 1 - src/Staff/MessageBuilder.php | 1 - src/Staff/Staff.php | 1 - src/Staff/Transformer.php | 1 - src/Stats/Stats.php | 1 - src/Store/Store.php | 1 - src/Support/Arr.php | 1 - src/Support/Attribute.php | 1 - src/Support/Collection.php | 1 - src/Support/File.php | 1 - src/Support/Log.php | 1 - src/Support/Str.php | 1 - src/Support/Url.php | 1 - src/Support/XML.php | 1 - src/Url/Url.php | 1 - src/User/Group.php | 1 - src/User/User.php | 1 - tests/Material/MaterialMaterialTest.php | 8 ++++---- tests/Material/MaterialTemporaryTest.php | 4 ++-- tests/Server/ServerGuardTest.php | 2 +- 84 files changed, 10 insertions(+), 91 deletions(-) diff --git a/src/Cache/Adapters/AdapterInterface.php b/src/Cache/Adapters/AdapterInterface.php index 67a4b9192..2ad28fe83 100755 --- a/src/Cache/Adapters/AdapterInterface.php +++ b/src/Cache/Adapters/AdapterInterface.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\Cache\Adapters; /** diff --git a/src/Cache/Adapters/FileAdapter.php b/src/Cache/Adapters/FileAdapter.php index d02f3e2f9..fa2441ed6 100755 --- a/src/Cache/Adapters/FileAdapter.php +++ b/src/Cache/Adapters/FileAdapter.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\Cache\Adapters; use EasyWeChat\Core\Exceptions\RuntimeException; diff --git a/src/Cache/Manager.php b/src/Cache/Manager.php index 7f1b9ead7..8df0be106 100755 --- a/src/Cache/Manager.php +++ b/src/Cache/Manager.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\Cache; use EasyWeChat\Cache\Adapters\AdapterInterface; diff --git a/src/Card/Card.php b/src/Card/Card.php index 8b1a12d97..55b00f527 100755 --- a/src/Card/Card.php +++ b/src/Card/Card.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\Card; use EasyWeChat\Cache\Manager as Cache; diff --git a/src/Card/CardHttpException.php b/src/Card/CardHttpException.php index acce57678..12fa9f3ca 100644 --- a/src/Card/CardHttpException.php +++ b/src/Card/CardHttpException.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\Card; use EasyWeChat\Core\Exception as CoreException; diff --git a/src/Card/Color.php b/src/Card/Color.php index 628b3fbb8..91cde8eba 100755 --- a/src/Card/Color.php +++ b/src/Card/Color.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\Card; use EasyWeChat\Cache\Adapters\AdapterInterface as Cache; diff --git a/src/Card/Image.php b/src/Card/Image.php index 7033cc1da..536785cba 100755 --- a/src/Card/Image.php +++ b/src/Card/Image.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\Card; use EasyWeChat\Core\Exceptions\InvalidArgumentException; diff --git a/src/Core/AbstractAPI.php b/src/Core/AbstractAPI.php index 9346319b7..5f7113b58 100755 --- a/src/Core/AbstractAPI.php +++ b/src/Core/AbstractAPI.php @@ -19,7 +19,6 @@ * This source file is subject to the MIT license that is bundled * with this source code in the file LICENSE. */ - namespace EasyWeChat\Core; use EasyWeChat\Core\Exceptions\HttpException; diff --git a/src/Core/AccessToken.php b/src/Core/AccessToken.php index 5cdb2bfd6..1541907b8 100755 --- a/src/Core/AccessToken.php +++ b/src/Core/AccessToken.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\Core; use EasyWeChat\Cache\Manager as Cache; diff --git a/src/Core/Exception.php b/src/Core/Exception.php index bd53a8237..f29940b1d 100755 --- a/src/Core/Exception.php +++ b/src/Core/Exception.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\Core; use Exception as BaseException; diff --git a/src/Core/Exceptions/FaultException.php b/src/Core/Exceptions/FaultException.php index 33cf5507c..2745de7a2 100755 --- a/src/Core/Exceptions/FaultException.php +++ b/src/Core/Exceptions/FaultException.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\Core\Exceptions; use EasyWeChat\Core\Exception; diff --git a/src/Core/Exceptions/HttpException.php b/src/Core/Exceptions/HttpException.php index ad5f30f59..d978b473f 100755 --- a/src/Core/Exceptions/HttpException.php +++ b/src/Core/Exceptions/HttpException.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\Core\Exceptions; use EasyWeChat\Core\Exception; diff --git a/src/Core/Exceptions/InvalidArgumentException.php b/src/Core/Exceptions/InvalidArgumentException.php index 2e53d31d7..f3fee132d 100755 --- a/src/Core/Exceptions/InvalidArgumentException.php +++ b/src/Core/Exceptions/InvalidArgumentException.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\Core\Exceptions; use EasyWeChat\Core\Exception; diff --git a/src/Core/Exceptions/InvalidConfigException.php b/src/Core/Exceptions/InvalidConfigException.php index 9eb231c7b..bdf334bea 100755 --- a/src/Core/Exceptions/InvalidConfigException.php +++ b/src/Core/Exceptions/InvalidConfigException.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\Core\Exceptions; use EasyWeChat\Core\Exception; diff --git a/src/Core/Exceptions/RuntimeException.php b/src/Core/Exceptions/RuntimeException.php index 872dc6749..b8ff5c341 100755 --- a/src/Core/Exceptions/RuntimeException.php +++ b/src/Core/Exceptions/RuntimeException.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\Core\Exceptions; use EasyWeChat\Core\Exception; diff --git a/src/Core/Exceptions/UnboundServiceException.php b/src/Core/Exceptions/UnboundServiceException.php index eff46653e..489a3ff3e 100755 --- a/src/Core/Exceptions/UnboundServiceException.php +++ b/src/Core/Exceptions/UnboundServiceException.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\Core\Exceptions; use EasyWeChat\Core\Exception; diff --git a/src/Core/Http.php b/src/Core/Http.php index 5c5ac2445..22530a271 100755 --- a/src/Core/Http.php +++ b/src/Core/Http.php @@ -19,7 +19,6 @@ * This source file is subject to the MIT license that is bundled * with this source code in the file LICENSE. */ - namespace EasyWeChat\Core; use EasyWeChat\Core\Exceptions\HttpException; diff --git a/src/Device/DeviceHttpException.php b/src/Device/DeviceHttpException.php index 40c765833..83d578fb1 100644 --- a/src/Device/DeviceHttpException.php +++ b/src/Device/DeviceHttpException.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\Device; use EasyWeChat\Core\Exception as CoreException; diff --git a/src/Encryption/EncryptionException.php b/src/Encryption/EncryptionException.php index 186d017b5..f5085de4d 100755 --- a/src/Encryption/EncryptionException.php +++ b/src/Encryption/EncryptionException.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\Encryption; use EasyWeChat\Core\Exception as CoreException; diff --git a/src/Encryption/Encryptor.php b/src/Encryption/Encryptor.php index 755134326..0b13c758b 100755 --- a/src/Encryption/Encryptor.php +++ b/src/Encryption/Encryptor.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\Encryption; use EasyWeChat\Core\Exceptions\InvalidConfigException; @@ -77,7 +76,7 @@ public function __construct($appId, $token, $AESKey) $this->appId = $appId; $this->token = $token; $this->AESKey = $AESKey; - $this->blockSize = 32;// mcrypt_get_block_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC); + $this->blockSize = 32; // mcrypt_get_block_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC); } /** diff --git a/src/Foundation/Application.php b/src/Foundation/Application.php index 2347729e2..38de9ee6c 100644 --- a/src/Foundation/Application.php +++ b/src/Foundation/Application.php @@ -23,7 +23,6 @@ * @link https://github.com/overtrue/wechat * @link http://overtrue.me */ - namespace EasyWeChat\Foundation; use EasyWeChat\Cache\Manager as CacheManager; diff --git a/src/Foundation/Config.php b/src/Foundation/Config.php index 4ea550ffe..2c2cb9cfd 100644 --- a/src/Foundation/Config.php +++ b/src/Foundation/Config.php @@ -23,7 +23,6 @@ * @link https://github.com/overtrue/wechat * @link http://overtrue.me */ - namespace EasyWeChat\Foundation; use EasyWeChat\Support\Collection; diff --git a/src/Foundation/ServiceProviders/JsServiceProvider.php b/src/Foundation/ServiceProviders/JsServiceProvider.php index 985e2352a..5ce59abd0 100644 --- a/src/Foundation/ServiceProviders/JsServiceProvider.php +++ b/src/Foundation/ServiceProviders/JsServiceProvider.php @@ -19,7 +19,6 @@ * This source file is subject to the MIT license that is bundled * with this source code in the file LICENSE. */ - namespace EasyWeChat\Foundation\ServiceProviders; use EasyWeChat\Js\Js; diff --git a/src/Foundation/ServiceProviders/MaterialServiceProvider.php b/src/Foundation/ServiceProviders/MaterialServiceProvider.php index be5b340f1..c27c1c078 100644 --- a/src/Foundation/ServiceProviders/MaterialServiceProvider.php +++ b/src/Foundation/ServiceProviders/MaterialServiceProvider.php @@ -19,7 +19,6 @@ * This source file is subject to the MIT license that is bundled * with this source code in the file LICENSE. */ - namespace EasyWeChat\Foundation\ServiceProviders; use EasyWeChat\Material\Material; diff --git a/src/Foundation/ServiceProviders/MenuServiceProvider.php b/src/Foundation/ServiceProviders/MenuServiceProvider.php index 55b2b9ef5..1676f8ef9 100644 --- a/src/Foundation/ServiceProviders/MenuServiceProvider.php +++ b/src/Foundation/ServiceProviders/MenuServiceProvider.php @@ -19,7 +19,6 @@ * This source file is subject to the MIT license that is bundled * with this source code in the file LICENSE. */ - namespace EasyWeChat\Foundation\ServiceProviders; use EasyWeChat\Menu\Menu; diff --git a/src/Foundation/ServiceProviders/NoticeServiceProvider.php b/src/Foundation/ServiceProviders/NoticeServiceProvider.php index 276e28288..fde71fd80 100644 --- a/src/Foundation/ServiceProviders/NoticeServiceProvider.php +++ b/src/Foundation/ServiceProviders/NoticeServiceProvider.php @@ -19,7 +19,6 @@ * This source file is subject to the MIT license that is bundled * with this source code in the file LICENSE. */ - namespace EasyWeChat\Foundation\ServiceProviders; use EasyWeChat\Notice\Notice; diff --git a/src/Foundation/ServiceProviders/OAuthServiceProvider.php b/src/Foundation/ServiceProviders/OAuthServiceProvider.php index b99757d4c..3ab76cc4f 100644 --- a/src/Foundation/ServiceProviders/OAuthServiceProvider.php +++ b/src/Foundation/ServiceProviders/OAuthServiceProvider.php @@ -19,7 +19,6 @@ * This source file is subject to the MIT license that is bundled * with this source code in the file LICENSE. */ - namespace EasyWeChat\Foundation\ServiceProviders; use Overtrue\Socialite\SocialiteManager as Socialite; diff --git a/src/Foundation/ServiceProviders/POIServiceProvider.php b/src/Foundation/ServiceProviders/POIServiceProvider.php index 5a4c78041..dbb52e6c1 100644 --- a/src/Foundation/ServiceProviders/POIServiceProvider.php +++ b/src/Foundation/ServiceProviders/POIServiceProvider.php @@ -23,7 +23,6 @@ * @link https://github.com/overtrue/wechat * @link http://overtrue.me */ - namespace EasyWeChat\Foundation\ServiceProviders; use EasyWeChat\POI\POI; diff --git a/src/Foundation/ServiceProviders/PaymentServiceProvider.php b/src/Foundation/ServiceProviders/PaymentServiceProvider.php index 832697825..f9fc820a9 100644 --- a/src/Foundation/ServiceProviders/PaymentServiceProvider.php +++ b/src/Foundation/ServiceProviders/PaymentServiceProvider.php @@ -23,7 +23,6 @@ * @link https://github.com/overtrue/wechat * @link http://overtrue.me */ - namespace EasyWeChat\Foundation\ServiceProviders; use EasyWeChat\Payment\Merchant; diff --git a/src/Foundation/ServiceProviders/QRCodeServiceProvider.php b/src/Foundation/ServiceProviders/QRCodeServiceProvider.php index 1d7a3bf25..b5e84ef1f 100644 --- a/src/Foundation/ServiceProviders/QRCodeServiceProvider.php +++ b/src/Foundation/ServiceProviders/QRCodeServiceProvider.php @@ -23,7 +23,6 @@ * @link https://github.com/overtrue/wechat * @link http://overtrue.me */ - namespace EasyWeChat\Foundation\ServiceProviders; use EasyWeChat\QRCode\QRCode; diff --git a/src/Foundation/ServiceProviders/SemanticServiceProvider.php b/src/Foundation/ServiceProviders/SemanticServiceProvider.php index 321b0670f..4149d8053 100644 --- a/src/Foundation/ServiceProviders/SemanticServiceProvider.php +++ b/src/Foundation/ServiceProviders/SemanticServiceProvider.php @@ -23,7 +23,6 @@ * @link https://github.com/overtrue/wechat * @link http://overtrue.me */ - namespace EasyWeChat\Foundation\ServiceProviders; use EasyWeChat\Semantic\Semantic; diff --git a/src/Foundation/ServiceProviders/ServerServiceProvider.php b/src/Foundation/ServiceProviders/ServerServiceProvider.php index 8736b9dee..37e4edfb5 100644 --- a/src/Foundation/ServiceProviders/ServerServiceProvider.php +++ b/src/Foundation/ServiceProviders/ServerServiceProvider.php @@ -23,7 +23,6 @@ * @link https://github.com/overtrue/wechat * @link http://overtrue.me */ - namespace EasyWeChat\Foundation\ServiceProviders; use EasyWeChat\Encryption\Encryptor; diff --git a/src/Foundation/ServiceProviders/StaffServiceProvider.php b/src/Foundation/ServiceProviders/StaffServiceProvider.php index 3eb1118df..5ce736d2b 100644 --- a/src/Foundation/ServiceProviders/StaffServiceProvider.php +++ b/src/Foundation/ServiceProviders/StaffServiceProvider.php @@ -19,7 +19,6 @@ * This source file is subject to the MIT license that is bundled * with this source code in the file LICENSE. */ - namespace EasyWeChat\Foundation\ServiceProviders; use EasyWeChat\Staff\Staff; diff --git a/src/Foundation/ServiceProviders/StatsServiceProvider.php b/src/Foundation/ServiceProviders/StatsServiceProvider.php index ed8e389e9..3b580dbaf 100644 --- a/src/Foundation/ServiceProviders/StatsServiceProvider.php +++ b/src/Foundation/ServiceProviders/StatsServiceProvider.php @@ -19,7 +19,6 @@ * This source file is subject to the MIT license that is bundled * with this source code in the file LICENSE. */ - namespace EasyWeChat\Foundation\ServiceProviders; use EasyWeChat\Stats\Stats; diff --git a/src/Foundation/ServiceProviders/UrlServiceProvider.php b/src/Foundation/ServiceProviders/UrlServiceProvider.php index f16807be3..9afaecad0 100644 --- a/src/Foundation/ServiceProviders/UrlServiceProvider.php +++ b/src/Foundation/ServiceProviders/UrlServiceProvider.php @@ -19,7 +19,6 @@ * This source file is subject to the MIT license that is bundled * with this source code in the file LICENSE. */ - namespace EasyWeChat\Foundation\ServiceProviders; use EasyWeChat\Url\Url; diff --git a/src/Foundation/ServiceProviders/UserServiceProvider.php b/src/Foundation/ServiceProviders/UserServiceProvider.php index 69fba981c..e7ca5e91f 100644 --- a/src/Foundation/ServiceProviders/UserServiceProvider.php +++ b/src/Foundation/ServiceProviders/UserServiceProvider.php @@ -23,7 +23,6 @@ * @link https://github.com/overtrue/wechat * @link http://overtrue.me */ - namespace EasyWeChat\Foundation\ServiceProviders; use EasyWeChat\User\User; diff --git a/src/Js/Js.php b/src/Js/Js.php index 7cc5353fc..ecc40e57a 100755 --- a/src/Js/Js.php +++ b/src/Js/Js.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\Js; use EasyWeChat\Cache\Manager as Cache; diff --git a/src/Material/Material.php b/src/Material/Material.php index 09dc2d35c..43865e557 100755 --- a/src/Material/Material.php +++ b/src/Material/Material.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\Material; use EasyWeChat\Core\AbstractAPI; @@ -119,11 +118,11 @@ public function uploadArticle($articles) $articles = [$articles]; } - $params = ['articles' => array_map(function($article){ + $params = ['articles' => array_map(function ($article) { if ($article instanceof Article) { return $article->only([ 'title', 'thumb_media_id', 'author', 'digest', - 'show_cover_pic', 'content', 'content_source_url' + 'show_cover_pic', 'content', 'content_source_url', ]); } diff --git a/src/Material/Temporary.php b/src/Material/Temporary.php index 33c0df1b6..15f40e0b3 100755 --- a/src/Material/Temporary.php +++ b/src/Material/Temporary.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\Material; use EasyWeChat\Core\AbstractAPI; diff --git a/src/Menu/Menu.php b/src/Menu/Menu.php index 4b8319960..25646449a 100755 --- a/src/Menu/Menu.php +++ b/src/Menu/Menu.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\Menu; use EasyWeChat\Core\AbstractAPI; diff --git a/src/Message/AbstractMessage.php b/src/Message/AbstractMessage.php index dc05fbf42..2863e4aeb 100755 --- a/src/Message/AbstractMessage.php +++ b/src/Message/AbstractMessage.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\Message; use EasyWeChat\Support\Arr; diff --git a/src/Message/Article.php b/src/Message/Article.php index 7a24bac09..a6ff24d88 100644 --- a/src/Message/Article.php +++ b/src/Message/Article.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\Message; use EasyWeChat\Support\Attribute; diff --git a/src/Message/Image.php b/src/Message/Image.php index fc7d448d8..33db79b1e 100755 --- a/src/Message/Image.php +++ b/src/Message/Image.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\Message; /** diff --git a/src/Message/Link.php b/src/Message/Link.php index 49f383aa5..a8b6ccdf7 100755 --- a/src/Message/Link.php +++ b/src/Message/Link.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\Message; /** diff --git a/src/Message/Location.php b/src/Message/Location.php index 7f5743a29..d15631a25 100755 --- a/src/Message/Location.php +++ b/src/Message/Location.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\Message; /** diff --git a/src/Message/Music.php b/src/Message/Music.php index 9fcd55f78..cd41b4de4 100755 --- a/src/Message/Music.php +++ b/src/Message/Music.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\Message; /** diff --git a/src/Message/News.php b/src/Message/News.php index 320a38bb2..74268531f 100755 --- a/src/Message/News.php +++ b/src/Message/News.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\Message; use EasyWeChat\Support\Attribute; diff --git a/src/Message/Raw.php b/src/Message/Raw.php index fc25394da..6d79b7c12 100755 --- a/src/Message/Raw.php +++ b/src/Message/Raw.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\Message; /** diff --git a/src/Message/ShortVideo.php b/src/Message/ShortVideo.php index a03e4e423..8d10ea824 100755 --- a/src/Message/ShortVideo.php +++ b/src/Message/ShortVideo.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\Message; /** diff --git a/src/Message/Text.php b/src/Message/Text.php index 0e06f3e9f..4be36672f 100755 --- a/src/Message/Text.php +++ b/src/Message/Text.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\Message; /** diff --git a/src/Message/Transfer.php b/src/Message/Transfer.php index 87cf4916d..fbb603abf 100755 --- a/src/Message/Transfer.php +++ b/src/Message/Transfer.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\Message; /** diff --git a/src/Message/Video.php b/src/Message/Video.php index 835b7d011..5a2f7b922 100755 --- a/src/Message/Video.php +++ b/src/Message/Video.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\Message; /** diff --git a/src/Message/Voice.php b/src/Message/Voice.php index 52cddb55f..f47d45080 100755 --- a/src/Message/Voice.php +++ b/src/Message/Voice.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\Message; /** diff --git a/src/Notice/Notice.php b/src/Notice/Notice.php index 62c089beb..00fc122c4 100755 --- a/src/Notice/Notice.php +++ b/src/Notice/Notice.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\Notice; use EasyWeChat\Core\AbstractAPI; diff --git a/src/POI/POI.php b/src/POI/POI.php index a07bb14fb..79a7fc18e 100755 --- a/src/POI/POI.php +++ b/src/POI/POI.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\POI; use EasyWeChat\Core\AbstractAPI; diff --git a/src/Payment/API.php b/src/Payment/API.php index b470e5b10..e30615007 100755 --- a/src/Payment/API.php +++ b/src/Payment/API.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\Payment; use EasyWeChat\Core\AbstractAPI; diff --git a/src/Payment/Merchant.php b/src/Payment/Merchant.php index 6e072b520..1fff738c9 100755 --- a/src/Payment/Merchant.php +++ b/src/Payment/Merchant.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\Payment; use EasyWeChat\Support\Attribute; diff --git a/src/Payment/Order.php b/src/Payment/Order.php index b05fa21e8..02dd58244 100755 --- a/src/Payment/Order.php +++ b/src/Payment/Order.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\Payment; use EasyWeChat\Support\Attribute; diff --git a/src/Payment/Payment.php b/src/Payment/Payment.php index 44ec93394..8b7f609ee 100755 --- a/src/Payment/Payment.php +++ b/src/Payment/Payment.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\Payment; /** diff --git a/src/Payment/helpers.php b/src/Payment/helpers.php index 830654e38..a3a7c0a4d 100644 --- a/src/Payment/helpers.php +++ b/src/Payment/helpers.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\Payment; /** diff --git a/src/QRCode/QRCode.php b/src/QRCode/QRCode.php index 7aa49d07e..3c43a9e47 100755 --- a/src/QRCode/QRCode.php +++ b/src/QRCode/QRCode.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\QRCode; use EasyWeChat\Core\AbstractAPI; diff --git a/src/Semantic/Semantic.php b/src/Semantic/Semantic.php index e8af18ea8..674f3c108 100755 --- a/src/Semantic/Semantic.php +++ b/src/Semantic/Semantic.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\Semantic; use EasyWeChat\Core\AbstractAPI; diff --git a/src/Server/BadRequestException.php b/src/Server/BadRequestException.php index 835ffe689..04c0c543a 100755 --- a/src/Server/BadRequestException.php +++ b/src/Server/BadRequestException.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\Server; use EasyWeChat\Core\Exception; diff --git a/src/Server/Guard.php b/src/Server/Guard.php index 865045a22..d92527ed6 100755 --- a/src/Server/Guard.php +++ b/src/Server/Guard.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\Server; use EasyWeChat\Core\Exceptions\FaultException; diff --git a/src/Server/Transformer.php b/src/Server/Transformer.php index 3e6eed1a3..ff5bac1a2 100755 --- a/src/Server/Transformer.php +++ b/src/Server/Transformer.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\Server; use EasyWeChat\Message\AbstractMessage; diff --git a/src/Staff/MessageBuilder.php b/src/Staff/MessageBuilder.php index 196a7102c..355f9ea2f 100755 --- a/src/Staff/MessageBuilder.php +++ b/src/Staff/MessageBuilder.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\Staff; use EasyWeChat\Core\Exceptions\InvalidArgumentException; diff --git a/src/Staff/Staff.php b/src/Staff/Staff.php index e37b968ac..85000720c 100755 --- a/src/Staff/Staff.php +++ b/src/Staff/Staff.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\Staff; use EasyWeChat\Core\AbstractAPI; diff --git a/src/Staff/Transformer.php b/src/Staff/Transformer.php index 8eefe5b9c..ca618c60c 100755 --- a/src/Staff/Transformer.php +++ b/src/Staff/Transformer.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\Staff; use EasyWeChat\Message\AbstractMessage; diff --git a/src/Stats/Stats.php b/src/Stats/Stats.php index 7332712e1..f7d824d45 100755 --- a/src/Stats/Stats.php +++ b/src/Stats/Stats.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\Stats; use EasyWeChat\Core\AbstractAPI; diff --git a/src/Store/Store.php b/src/Store/Store.php index c29daa38d..08531d734 100755 --- a/src/Store/Store.php +++ b/src/Store/Store.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\Store; use EasyWeChat\Core\AbstractAPI; diff --git a/src/Support/Arr.php b/src/Support/Arr.php index 57bf34f90..7928b1292 100755 --- a/src/Support/Arr.php +++ b/src/Support/Arr.php @@ -19,7 +19,6 @@ * @link http://overtrue.me * @link https://github.com/laravel/framework/blob/4.2/src/Illuminate/Support/Arr.php */ - namespace EasyWeChat\Support; use Closure; diff --git a/src/Support/Attribute.php b/src/Support/Attribute.php index 6428dc4bd..e43134c27 100755 --- a/src/Support/Attribute.php +++ b/src/Support/Attribute.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\Support; use EasyWeChat\Core\Exceptions\InvalidArgumentException; diff --git a/src/Support/Collection.php b/src/Support/Collection.php index a0f1e43c8..3a50ad3ba 100755 --- a/src/Support/Collection.php +++ b/src/Support/Collection.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\Support; use ArrayAccess; diff --git a/src/Support/File.php b/src/Support/File.php index 0068df6e8..9741a8f90 100755 --- a/src/Support/File.php +++ b/src/Support/File.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\Support; /** diff --git a/src/Support/Log.php b/src/Support/Log.php index 0952e838a..ef1f68336 100755 --- a/src/Support/Log.php +++ b/src/Support/Log.php @@ -19,7 +19,6 @@ * This source file is subject to the MIT license that is bundled * with this source code in the file LICENSE. */ - namespace EasyWeChat\Support; use Monolog\Handler\ErrorLogHandler; diff --git a/src/Support/Str.php b/src/Support/Str.php index 3f294ac5c..476c455a4 100755 --- a/src/Support/Str.php +++ b/src/Support/Str.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\Support; use EasyWeChat\Core\Exceptions\RuntimeException; diff --git a/src/Support/Url.php b/src/Support/Url.php index 0581605dc..7c3b911cd 100755 --- a/src/Support/Url.php +++ b/src/Support/Url.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\Support; /** diff --git a/src/Support/XML.php b/src/Support/XML.php index 95979bd6b..0ec8a0678 100755 --- a/src/Support/XML.php +++ b/src/Support/XML.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\Support; /** diff --git a/src/Url/Url.php b/src/Url/Url.php index 66f99ee48..9e85827c3 100755 --- a/src/Url/Url.php +++ b/src/Url/Url.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\Url; use EasyWeChat\Core\AbstractAPI; diff --git a/src/User/Group.php b/src/User/Group.php index e12264f81..28cdb6d6f 100755 --- a/src/User/Group.php +++ b/src/User/Group.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\User; use EasyWeChat\Core\AbstractAPI; diff --git a/src/User/User.php b/src/User/User.php index 0cb01c4cc..f2c5a47e2 100755 --- a/src/User/User.php +++ b/src/User/User.php @@ -18,7 +18,6 @@ * @link https://github.com/overtrue * @link http://overtrue.me */ - namespace EasyWeChat\User; use EasyWeChat\Core\AbstractAPI; diff --git a/tests/Material/MaterialMaterialTest.php b/tests/Material/MaterialMaterialTest.php index b4becc168..786f05f7d 100755 --- a/tests/Material/MaterialMaterialTest.php +++ b/tests/Material/MaterialMaterialTest.php @@ -164,7 +164,7 @@ public function testGet() $material = $this->getMaterial(); $http = Mockery::mock(Http::class.'[get]'); $http->shouldReceive('addMiddleware')->andReturn($http); - $http->shouldReceive('get')->andReturnUsing(function($api, $params){ + $http->shouldReceive('get')->andReturnUsing(function ($api, $params) { return new Response(200, ['Content-Type' => ['text/plain']], json_encode(compact('api', 'params'))); }); $material->setHttp($http); @@ -178,14 +178,14 @@ public function testGet() // media $http = Mockery::mock(Http::class.'[get]'); $http->shouldReceive('addMiddleware')->andReturn($http); - $http->shouldReceive('get')->andReturnUsing(function($api, $params){ - return new Response(200, ['Content-Type' => ['media/video']], "media content"); + $http->shouldReceive('get')->andReturnUsing(function ($api, $params) { + return new Response(200, ['Content-Type' => ['media/video']], 'media content'); }); $material->setHttp($http); $response = $material->get('bar'); - $this->assertEquals("media content", $response); + $this->assertEquals('media content', $response); } /** diff --git a/tests/Material/MaterialTemporaryTest.php b/tests/Material/MaterialTemporaryTest.php index 2ebbef1a6..872d935a1 100755 --- a/tests/Material/MaterialTemporaryTest.php +++ b/tests/Material/MaterialTemporaryTest.php @@ -84,7 +84,7 @@ public function testUpload() $this->assertStringStartsWith(Temporary::API_UPLOAD, $result[0]); $this->assertEquals(['media' => __DIR__.'/stubs/image.jpg'], $result[1]); - $temporary->upload('image', '/this-is-are-non-exists-path/foo.jpg');// exception,invalid path + $temporary->upload('image', '/this-is-are-non-exists-path/foo.jpg'); // exception,invalid path } /** @@ -95,7 +95,7 @@ public function testUpload() public function testUploadWithInvalidType() { $temporary = new Temporary($this->getMockAccessToken()); - $temporary->upload('img', __DIR__.'/stubs/image.jpg');// exception,invalid type + $temporary->upload('img', __DIR__.'/stubs/image.jpg'); // exception,invalid type } /** diff --git a/tests/Server/ServerGuardTest.php b/tests/Server/ServerGuardTest.php index 5ec85d8dc..01872cf64 100755 --- a/tests/Server/ServerGuardTest.php +++ b/tests/Server/ServerGuardTest.php @@ -155,7 +155,7 @@ public function testSetMessageHandler() $this->assertEquals('Foo::bar', $server->getMessageHandler()); - $server->setMessageHandler('foo');// invalid + $server->setMessageHandler('foo'); // invalid } /**