Skip to content

Commit

Permalink
v1.1.5
Browse files Browse the repository at this point in the history
Remove unused $expression from end directives
Bump dependencies
  • Loading branch information
Log1x committed Nov 20, 2019
1 parent c9bdc17 commit 3b0f228
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"php": ">=7.1.3"
},
"require-dev": {
"squizlabs/php_codesniffer": "^3.4"
"squizlabs/php_codesniffer": "^3.5"
},
"scripts": {
"lint": [
Expand Down
10 changes: 5 additions & 5 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions src/Directives/Helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
return "<?php if (is_null({$expression})) : ?>";
},

'endisnull' => function ($expression) {
'endisnull' => function () {
return '<?php endif; ?>';
},

Expand All @@ -87,7 +87,7 @@
return "<?php if (! is_null({$expression})) : ?>";
},

'endisnotnull' => function ($expression) {
'endisnotnull' => function () {
return "<?php endif; ?>";
},

Expand All @@ -110,7 +110,7 @@
return "<?php if (! empty({$expression})) : ?>";
},

'endnotempty' => function ($expression) {
'endnotempty' => function () {
return "<?php endif; ?>";
},

Expand Down Expand Up @@ -215,7 +215,7 @@
]; ?>";
},

'endrepeat' => function ($expression) {
'endrepeat' => function () {
return '<?php endfor; ?>';
},

Expand Down
3 changes: 2 additions & 1 deletion src/Directives/WordPress.php
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,8 @@
$expression = Util::parse($expression);
$image = Util::strip($expression->get(0));

if (is_string($image) &&
if (
is_string($image) &&
! is_numeric($image) &&
$image = Util::field($image)
) {
Expand Down

0 comments on commit 3b0f228

Please sign in to comment.