X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FGuzzleSiteAuthenticator%2FGrabySiteConfigBuilder.php;h=2e57aac8a891930dd05e3e63a060e028df45e9aa;hb=refs%2Fheads%2Fphp73;hp=da19fe3124a2d555ff0b8adc4ccf16923623a851;hpb=854616ac6d6246e8e0451342ab841985b401604d;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/CoreBundle/GuzzleSiteAuthenticator/GrabySiteConfigBuilder.php b/src/Wallabag/CoreBundle/GuzzleSiteAuthenticator/GrabySiteConfigBuilder.php index da19fe31..2e57aac8 100644 --- a/src/Wallabag/CoreBundle/GuzzleSiteAuthenticator/GrabySiteConfigBuilder.php +++ b/src/Wallabag/CoreBundle/GuzzleSiteAuthenticator/GrabySiteConfigBuilder.php @@ -58,7 +58,7 @@ class GrabySiteConfigBuilder implements SiteConfigBuilder { // required by credentials below $host = strtolower($host); - if (substr($host, 0, 4) === 'www.') { + if ('www.' === substr($host, 0, 4)) { $host = substr($host, 4); } @@ -107,14 +107,14 @@ class GrabySiteConfigBuilder implements SiteConfigBuilder */ protected function processExtraFields($extraFieldsStrings) { - if (!is_array($extraFieldsStrings)) { + if (!\is_array($extraFieldsStrings)) { return []; } $extraFields = []; foreach ($extraFieldsStrings as $extraField) { - if (strpos($extraField, '=') === false) { - continue; + if (false === strpos($extraField, '=')) { + break; } list($fieldName, $fieldValue) = explode('=', $extraField, 2);