From 969b205b913a491f789d53baf498657dc6a1d5fb Mon Sep 17 00:00:00 2001 From: Al Ganiev Date: Sun, 13 Mar 2016 04:05:25 -0400 Subject: [PATCH] Applied fixes from StyleCI --- Decoda/Hook/EmoticonHook.php | 2 +- Emoticon/Loader/YamlFileLoader.php | 2 +- Emoticon/Matcher/Dumper/PhpMatcherDumper.php | 4 ++-- .../FMBbcodeExtensionTest.php | 2 +- Tests/Templating/BbcodeExtensionTest.php | 18 +++++++++--------- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Decoda/Hook/EmoticonHook.php b/Decoda/Hook/EmoticonHook.php index 37aef07..91ef39e 100644 --- a/Decoda/Hook/EmoticonHook.php +++ b/Decoda/Hook/EmoticonHook.php @@ -260,7 +260,7 @@ public function getSmilies() */ public function hasSmiley($smiley) { - return (boolean) $this->getMatcher()->match($smiley); + return (bool) $this->getMatcher()->match($smiley); } /** diff --git a/Emoticon/Loader/YamlFileLoader.php b/Emoticon/Loader/YamlFileLoader.php index d4e0f26..7495d70 100644 --- a/Emoticon/Loader/YamlFileLoader.php +++ b/Emoticon/Loader/YamlFileLoader.php @@ -102,7 +102,7 @@ private function parseImports(EmoticonCollection $collection, $content, $file) foreach ($content['imports'] as $import) { $this->setCurrentDir(dirname($file)); - $subCollection = $this->import($import['resource'], null, isset($import['ignore_errors']) ? (Boolean) $import['ignore_errors'] : false, $file); + $subCollection = $this->import($import['resource'], null, isset($import['ignore_errors']) ? (bool) $import['ignore_errors'] : false, $file); $collection->addCollection($subCollection); } } diff --git a/Emoticon/Matcher/Dumper/PhpMatcherDumper.php b/Emoticon/Matcher/Dumper/PhpMatcherDumper.php index 713fb03..544a818 100644 --- a/Emoticon/Matcher/Dumper/PhpMatcherDumper.php +++ b/Emoticon/Matcher/Dumper/PhpMatcherDumper.php @@ -102,7 +102,7 @@ private function compileSmileyMatch(EmoticonCollection $emoticons) EOF; } } - $code .= <<http://example.org'), - array('[url="http://example.com"]Example[/url]','Example'), + array('[url]http://example.org[/url]', 'http://example.org'), + array('[url="http://example.com"]Example[/url]', 'Example'), ); } @@ -65,8 +65,8 @@ public function testImgFilter($value, $expected) public function dataImgTags() { return array( - array('[img]http://github.com/picture.jpg[/img]',''), - array('[img width="500"]http://github.com/picture.jpg[/img]',''), + array('[img]http://github.com/picture.jpg[/img]', ''), + array('[img width="500"]http://github.com/picture.jpg[/img]', ''), ); } @@ -84,7 +84,7 @@ public function testQuoteFilter($value, $expected) public function dataQuoteTags() { return array( - array('[quote]text[/quote]','text'), + array('[quote]text[/quote]', 'text'), ); } @@ -102,8 +102,8 @@ public function testStrict($value, $expected) public function dataStrict() { return array( - array('[url]http://example.org[/url]','http://example.org'), - array('[url=http://example.com]Example[/url]','Example'), + array('[url]http://example.org[/url]', 'http://example.org'), + array('[url=http://example.com]Example[/url]', 'Example'), ); } @@ -179,8 +179,8 @@ public function dataDefaultFilterSet() array('[sub]subscript[/sub]', 'subscript'), array('[sup]superscript[/sup]', 'superscript'), array('[abbr="Object relational mapper"]ORM[/abbr]', 'ORM'), - array('[url]http://example.org[/url]','http://example.org'), - array('[url="http://example.com"]Example[/url]','Example'), + array('[url]http://example.org[/url]', 'http://example.org'), + array('[url="http://example.com"]Example[/url]', 'Example'), array('[email]email@domain.com[/email]', 'email@domain.com'), ); }