Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Insights Code scanning report #225

Open
RenierLewis opened this issue Apr 16, 2018 · 0 comments
Open

Insights Code scanning report #225

RenierLewis opened this issue Apr 16, 2018 · 0 comments

Comments

@RenierLewis
Copy link

Hi

Thank you for your great work with this bundle and your contribution to the open source community.

I have put the bundle through Sensiolabs Insights code scanning and just wanted to share the findings with you.

The scanning found 1 Major, 1 minor issue and 1 info issue.

They are:

Absolute path constants DIR and FILE should not be used
MajorBugrisk
in Drivers/ShmDriver.php, line 52
$key = ftok(FILE, 'm');

DIR and FILE constants may conflict with the Symfony resource overriding system

For more information see https://insight.sensiolabs.com/what-we-analyse/symfony.dependency_injection.use_dir_file_constant


Object parameters should be type hinted
MinorBugrisk
in Drivers/Query/PdoQuery.php, line 115
protected function prepareStatement($db, $query)
The parameter db, which is an object, should be typehinted.

For more information see https://insight.sensiolabs.com/what-we-analyse/php.object_parameter_not_type_hinted


Methods and properties visibility should always be explicitly defined 5
InfoReadability
in Drivers/Query/PdoQuery.php, line 40
abstract function createTableQuery();
This method has no explicit visibility which may lead to maintenability issues. You should always declare a visibility for methods and properties.

For more information see https://insight.sensiolabs.com/what-we-analyse/php.method_or_property_missing_visibility

If possible for you to fix these issues/comments/recommendations with a future commit, it will be appreciated.

Kind Regards
Renier Lewis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant