Skip to content

Commit

Permalink
[CLEANUP] Call static methods statically (#670)
Browse files Browse the repository at this point in the history
[CLEANUP] Call static methods statically

In `CssConcatenator`, create `callable` for `static` method using
`static::class` not `$this`.

(Spotted in #669.  Instances of `static` methods being called through `$this`
were previously corrected in #525.)
  • Loading branch information
JakeQZ committed Jul 3, 2019
1 parent 3b7d317 commit 2a27b45
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -20,6 +20,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).
### Removed

### Fixed
- Call all static methods statically in `CssConcatenator`
([#670](https://github.com/MyIntervals/emogrifier/pull/670))
- Support all HTML5 self-closing tags, including `<embed>`, `<source>`,
`<track>` and `<wbr>`
([#653](https://github.com/MyIntervals/emogrifier/pull/653))
Expand Down
2 changes: 1 addition & 1 deletion src/Emogrifier/CssConcatenator.php
Expand Up @@ -87,7 +87,7 @@ public function append(array $selectors, $declarationsBlock, $media = '')
*/
public function getCss()
{
return \implode('', \array_map([$this, 'getMediaRuleCss'], $this->mediaRules));
return \implode('', \array_map([static::class, 'getMediaRuleCss'], $this->mediaRules));
}

/**
Expand Down

0 comments on commit 2a27b45

Please sign in to comment.