Passed
Push — master ( c055e2...351bf1 )
by Jelly
03:24
created
src/Translation.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
      */
66 66
     private function getTranslatedText($text)
67 67
     {
68
-        if ( $this->isEnglish($text) ) {
68
+        if ($this->isEnglish($text)) {
69 69
             return $text;
70 70
         }
71 71
         $text = $this->removeSegment($text);
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
      */
83 83
     private function getTranslation(array $translateResponse)
84 84
     {
85
-        if ((int) $translateResponse['errorCode'] === 0 ) {
85
+        if ((int) $translateResponse['errorCode'] === 0) {
86 86
             return $this->getTranslatedTextFromResponse($translateResponse);
87 87
         }
88 88
         throw new TranslationErrorException('Translate error, error_code : ' . $translateResponse['errorCode'] . '. Refer url: http://ai.youdao.com/docs/api.s');
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
      */
122 122
     private function isEnglish($text)
123 123
     {
124
-        if ( preg_match("/\p{Han}+/u", $text) ) {
124
+        if (preg_match("/\p{Han}+/u", $text)) {
125 125
             return false;
126 126
         }
127 127
 
Please login to merge, or discard this patch.
src/TranslugServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
      */
32 32
     public function register()
33 33
     {
34
-        $this->app->singleton('translug', function () {
34
+        $this->app->singleton('translug', function() {
35 35
             return new Translation(new Client(), config('services.youdao'));
36 36
         });
37 37
     }
Please login to merge, or discard this patch.