Copyleaks / PHP-Plagiarism-Checker

Copyleaks Plagiarism Checker - PHP SDK.
https://api.copyleaks.com
MIT License
34 stars 25 forks source link

Error : Syntax error, unexpected 'string' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST) #11

Closed demootesting closed 3 years ago

demootesting commented 3 years ago

Syntax Error - Unexpected 'string' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST). Error is during PHP Integration.

vidhyabala commented 3 years ago

Parse error: syntax error, unexpected 'string' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST) in vendor\copyleaks\php-plagiarism-checker\src\Models\CopyleaksAuthToken.php on line 30

Am also getting the same issue. Can anyone help me out in this?

vidhyabala commented 3 years ago

The above issue is solved by using the higher version of PHP i.e above PHP 7.3.

But now am getting the security error as result: "Sensitive Data Protection is not enabled to your account."

CL-BayanAbuawad commented 3 years ago

@demootesting update to PHP 7.3 or above should solve the problem for you as @vidhyabala suggested.

@vidhyabala removing the SubmissionSensitiveData object (optional param) from the SubmissionProperties object should solve the problem for you, I updated the demo to not include that anymore. image