File tree 4 files changed +12
-6
lines changed 4 files changed +12
-6
lines changed Original file line number Diff line number Diff line change 6
6
7
7
use Scn \DeeplApiConnector \DeeplClientFactory ;
8
8
use Scn \DeeplApiConnector \Enum \GlossarySubmissionEntryFormatEnum ;
9
+ use Scn \DeeplApiConnector \Enum \TextHandlingEnum ;
9
10
use Scn \DeeplApiConnector \Model \GlossariesInterface ;
10
11
use Scn \DeeplApiConnector \Model \GlossaryEntries ;
11
12
use Scn \DeeplApiConnector \Model \GlossaryIdSubmission ;
92
93
'Hello World ' ,
93
94
$ target ,
94
95
$ source ,
95
- glossaryId: $ glossary !== false ? $ glossary ['glossary_id ' ] : ''
96
+ [],
97
+ [],
98
+ [],
99
+ TextHandlingEnum::SPLITSENTENCES_ON ,
100
+ TextHandlingEnum::PRESERVEFORMATTING_OFF ,
101
+ $ glossary !== false ? $ glossary ['glossary_id ' ] : ''
96
102
);
97
103
$ translationObj = $ deepl ->getTranslation ($ translationConfig );
98
104
var_dump ($ translationObj );
Original file line number Diff line number Diff line change @@ -18,9 +18,9 @@ final class DeeplClientFactory
18
18
{
19
19
public static function create (
20
20
string $ authKey ,
21
- ClientInterface $ httpClient = null ,
22
- RequestFactoryInterface $ requestFactory = null ,
23
- StreamFactoryInterface $ streamFactory = null
21
+ ? ClientInterface $ httpClient = null ,
22
+ ? RequestFactoryInterface $ requestFactory = null ,
23
+ ? StreamFactoryInterface $ streamFactory = null
24
24
): DeeplClientInterface {
25
25
return new DeeplClient (
26
26
new DeeplRequestFactory (
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ public function __construct(
42
42
array $ ignoreTags = [],
43
43
string $ splitSentences = TextHandlingEnum::SPLITSENTENCES_ON ,
44
44
string $ preserveFormatting = TextHandlingEnum::PRESERVEFORMATTING_OFF ,
45
- string $ glossaryId = '' ,
45
+ string $ glossaryId = ''
46
46
) {
47
47
$ this ->setText ($ text );
48
48
$ this ->setTargetLang ($ targetLang );
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ public function __construct(
40
40
array $ ignoreTags = [],
41
41
string $ splitSentences = TextHandlingEnum::SPLITSENTENCES_ON ,
42
42
string $ preserveFormatting = TextHandlingEnum::PRESERVEFORMATTING_OFF ,
43
- string $ glossaryId = '' ,
43
+ string $ glossaryId = ''
44
44
) {
45
45
$ this ->setText ($ text );
46
46
$ this ->setTargetLang ($ targetLang );
You can’t perform that action at this time.
0 commit comments