File tree Expand file tree Collapse file tree 4 files changed +12
-6
lines changed Expand file tree Collapse file tree 4 files changed +12
-6
lines changed Original file line number Diff line number Diff line change 66
77use Scn \DeeplApiConnector \DeeplClientFactory ;
88use Scn \DeeplApiConnector \Enum \GlossarySubmissionEntryFormatEnum ;
9+ use Scn \DeeplApiConnector \Enum \TextHandlingEnum ;
910use Scn \DeeplApiConnector \Model \GlossariesInterface ;
1011use Scn \DeeplApiConnector \Model \GlossaryEntries ;
1112use Scn \DeeplApiConnector \Model \GlossaryIdSubmission ;
9293 'Hello World ' ,
9394 $ target ,
9495 $ 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 ' ] : ''
96102);
97103$ translationObj = $ deepl ->getTranslation ($ translationConfig );
98104var_dump ($ translationObj );
Original file line number Diff line number Diff line change @@ -18,9 +18,9 @@ final class DeeplClientFactory
1818{
1919 public static function create (
2020 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
2424 ): DeeplClientInterface {
2525 return new DeeplClient (
2626 new DeeplRequestFactory (
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ public function __construct(
4242 array $ ignoreTags = [],
4343 string $ splitSentences = TextHandlingEnum::SPLITSENTENCES_ON ,
4444 string $ preserveFormatting = TextHandlingEnum::PRESERVEFORMATTING_OFF ,
45- string $ glossaryId = '' ,
45+ string $ glossaryId = ''
4646 ) {
4747 $ this ->setText ($ text );
4848 $ this ->setTargetLang ($ targetLang );
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ public function __construct(
4040 array $ ignoreTags = [],
4141 string $ splitSentences = TextHandlingEnum::SPLITSENTENCES_ON ,
4242 string $ preserveFormatting = TextHandlingEnum::PRESERVEFORMATTING_OFF ,
43- string $ glossaryId = '' ,
43+ string $ glossaryId = ''
4444 ) {
4545 $ this ->setText ($ text );
4646 $ this ->setTargetLang ($ targetLang );
You can’t perform that action at this time.
0 commit comments