mirror of
https://github.com/wallabag/wallabag.git
synced 2024-11-26 19:11:07 +00:00
Run php-cs-fixer for fixing coding standard issues (on ContentProxyTest)
This commit is contained in:
parent
83f1c3274f
commit
28cc645b93
1 changed files with 19 additions and 11 deletions
|
@ -740,30 +740,38 @@ class ContentProxyTest extends TestCase
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* https://stackoverflow.com/a/18506801
|
* https://stackoverflow.com/a/18506801.
|
||||||
|
*
|
||||||
* @param $string
|
* @param $string
|
||||||
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
private function strToHex($string){
|
private function strToHex($string)
|
||||||
|
{
|
||||||
$hex = '';
|
$hex = '';
|
||||||
for ($i=0; $i<strlen($string); $i++){
|
for ($i = 0; $i < \strlen($string); ++$i) {
|
||||||
$ord = ord($string[$i]);
|
$ord = \ord($string[$i]);
|
||||||
$hexCode = dechex($ord);
|
$hexCode = dechex($ord);
|
||||||
$hex .= substr('0'.$hexCode, -2);
|
$hex .= substr('0' . $hexCode, -2);
|
||||||
}
|
}
|
||||||
return strToUpper($hex);
|
|
||||||
|
return strtoupper($hex);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* https://stackoverflow.com/a/18506801
|
* https://stackoverflow.com/a/18506801.
|
||||||
|
*
|
||||||
* @param $hex
|
* @param $hex
|
||||||
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
private function hexToStr($hex){
|
private function hexToStr($hex)
|
||||||
$string='';
|
{
|
||||||
for ($i=0; $i < strlen($hex)-1; $i+=2){
|
$string = '';
|
||||||
$string .= chr(hexdec($hex[$i].$hex[$i+1]));
|
for ($i = 0; $i < \strlen($hex) - 1; $i += 2) {
|
||||||
|
$string .= \chr(hexdec($hex[$i] . $hex[$i + 1]));
|
||||||
}
|
}
|
||||||
|
|
||||||
return $string;
|
return $string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue