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

Fix problems found by static analysis #492

Merged
merged 1 commit into from
Jul 19, 2023
Merged

Fix problems found by static analysis #492

merged 1 commit into from
Jul 19, 2023

Conversation

szepeviktor
Copy link
Contributor

Please see comments below.

@@ -14,7 +14,7 @@
/**
* Registers the custom rewrite rule for the 'BaseStyle' route.
*/
add_filter('init', function () {
add_action('init', function () {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

init is an action.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@szepeviktor: Can confirm this. Thanks!

@@ -35,8 +35,6 @@ class TimberDynamicResize

/**
* Constructor.
*
* @var TimberDynamicResize
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stray something. No clue what it wants to be.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@szepeviktor: Can confirm this. Thanks!

Comment on lines -206 to -207
* @param integer|float $w The width of the image.
* @param integer|float $h The height of the image.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is a float in the code.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@szepeviktor: Can confirm this. Thanks!

$data = $data === false ? [] : $data;
$data = $data === null ? [] : $data;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

data may be an array or null.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@szepeviktor: This makes sense. Thanks!

@@ -80,7 +80,7 @@ public function renderComponent(Environment $env, array $context, $componentName

$output = Api::renderComponent($componentName, $data);

remove_filter('Flynt/renderComponent', $fn, PHP_INT_MIN, 3);
Copy link
Contributor Author

@szepeviktor szepeviktor Jul 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove_filter accepts 3 parameters.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@szepeviktor: Can confirm this. Thanks!

@szepeviktor
Copy link
Contributor Author

Scrutinizer says

The node version 18 could not be installed, please check the log below.

@timohubois timohubois self-assigned this Jul 19, 2023
@timohubois timohubois merged commit 36bd472 into flyntwp:master Jul 19, 2023
1 check passed
@szepeviktor szepeviktor deleted the fix-stan branch July 19, 2023 05:54
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

Successfully merging this pull request may close these issues.

2 participants