aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/Wallabag
diff options
context:
space:
mode:
authorTobi823 <Tobi823@users.noreply.github.com>2018-09-23 23:42:05 +0200
committerTobi823 <Tobi823@users.noreply.github.com>2018-09-23 23:42:05 +0200
commit28cc645b93a3505f39f8b5655e5f860544c023b4 (patch)
tree0888d976a97bebae1cdea6433f2f227a9f0ec95c /tests/Wallabag
parent83f1c3274f02ece12bd06c0b8df61d5e4b3236e7 (diff)
downloadwallabag-28cc645b93a3505f39f8b5655e5f860544c023b4.tar.gz
wallabag-28cc645b93a3505f39f8b5655e5f860544c023b4.tar.zst
wallabag-28cc645b93a3505f39f8b5655e5f860544c023b4.zip
Run php-cs-fixer for fixing coding standard issues (on ContentProxyTest)
Diffstat (limited to 'tests/Wallabag')
-rw-r--r--tests/Wallabag/CoreBundle/Helper/ContentProxyTest.php30
1 files changed, 19 insertions, 11 deletions
diff --git a/tests/Wallabag/CoreBundle/Helper/ContentProxyTest.php b/tests/Wallabag/CoreBundle/Helper/ContentProxyTest.php
index 5f10f482..3f3c60d0 100644
--- a/tests/Wallabag/CoreBundle/Helper/ContentProxyTest.php
+++ b/tests/Wallabag/CoreBundle/Helper/ContentProxyTest.php
@@ -740,30 +740,38 @@ class ContentProxyTest extends TestCase
740 } 740 }
741 741
742 /** 742 /**
743 * https://stackoverflow.com/a/18506801 743 * https://stackoverflow.com/a/18506801.
744 *
744 * @param $string 745 * @param $string
746 *
745 * @return string 747 * @return string
746 */ 748 */
747 private function strToHex($string){ 749 private function strToHex($string)
750 {
748 $hex = ''; 751 $hex = '';
749 for ($i=0; $i<strlen($string); $i++){ 752 for ($i = 0; $i < \strlen($string); ++$i) {
750 $ord = ord($string[$i]); 753 $ord = \ord($string[$i]);
751 $hexCode = dechex($ord); 754 $hexCode = dechex($ord);
752 $hex .= substr('0'.$hexCode, -2); 755 $hex .= substr('0' . $hexCode, -2);
753 } 756 }
754 return strToUpper($hex); 757
758 return strtoupper($hex);
755 } 759 }
756 760
757 /** 761 /**
758 * https://stackoverflow.com/a/18506801 762 * https://stackoverflow.com/a/18506801.
763 *
759 * @param $hex 764 * @param $hex
765 *
760 * @return string 766 * @return string
761 */ 767 */
762 private function hexToStr($hex){ 768 private function hexToStr($hex)
763 $string=''; 769 {
764 for ($i=0; $i < strlen($hex)-1; $i+=2){ 770 $string = '';
765 $string .= chr(hexdec($hex[$i].$hex[$i+1])); 771 for ($i = 0; $i < \strlen($hex) - 1; $i += 2) {
772 $string .= \chr(hexdec($hex[$i] . $hex[$i + 1]));
766 } 773 }
774
767 return $string; 775 return $string;
768 } 776 }
769 777