Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php declare (strict_types=1); namespace OneTeamSoftware\ShippingCarrier\ShipStation\En..

Decoded Output download

<?php 
 declare (strict_types=1); namespace OneTeamSoftware\ShippingCarrier\ShipStation\EndPoint\RateFilter; use OneTeamSoftware\Logger\LoggerInterface; use OneTeamSoftware\ShippingCarrier\AbstractAdapter\Type\CollectionInterface; use OneTeamSoftware\ShippingCarrier\ShipStation\Type\ServiceIdBuilder; class RateFilter { private $logger; private $serviceIdBuilder; private $packageTypes; public function __construct(LoggerInterface $fnOUc, ServiceIdBuilder $blUDK, CollectionInterface $i0JQQ) { $this->logger = $fnOUc; $this->serviceIdBuilder = $blUDK; $this->packageTypes = $i0JQQ; } public function filter(array $iAKs6, string $anbag, string $BWx9O) : array { $this->logger->debug(__FILE__, 62, "filter: %s", print_r($iAKs6, true)); if (empty($iAKs6["serviceCode"]) || empty($iAKs6["serviceName"]) || empty($iAKs6["shipmentCost"]) || false === isset($iAKs6["otherCost"])) { $this->logger->debug(__FILE__, 70, "Rate does not have serviceName, shipmentCost or otherCost set, so skip might be invalid"); return []; } $nZonI = $this->serviceIdBuilder->build($anbag, $iAKs6["serviceCode"]); $PAlxy = $iAKs6["serviceName"]; list($PAlxy, $XrSkQ) = $this->getServiceAndPackageTypeNamesPair($PAlxy, $BWx9O); if (strtolower($BWx9O) !== strtolower($XrSkQ)) { $this->logger->debug(__FILE__, 80, "Package type %s does not match %s", $XrSkQ, $BWx9O); return []; } $fbi9x = []; $fbi9x["service"] = $nZonI; $fbi9x["postage_description"] = trim($PAlxy); $fbi9x["cost"] = $iAKs6["shipmentCost"] + $iAKs6["otherCost"]; $this->logger->debug(__FILE__, 90, "Package type has matched, so return rate: %s", print_r($fbi9x, true)); return $fbi9x; } private function getServiceAndPackageTypeNamesPair(string $PAlxy, string $BWx9O) : array { $S0XDc = explode("-", $PAlxy); if (2 !== count($S0XDc)) { $this->logger->debug(__FILE__, 106, "Service name does not contain a package type"); return [$PAlxy, $BWx9O]; } $S0XDc = array_map("trim", $S0XDc); $XrSkQ = $S0XDc[1]; $this->logger->debug(__FILE__, 114, "Look up package type: %s", $XrSkQ); if ($this->packageTypes->has($XrSkQ)) { $this->logger->debug(__FILE__, 117, "Service name contains supported package type"); return $S0XDc; } $XrSkQ = strtolower($XrSkQ); if ($this->packageTypes->has($XrSkQ)) { $this->logger->debug(__FILE__, 126, "Service name contains supported package type"); return $S0XDc; } $this->logger->debug(__FILE__, 131, "Service name does not contain supported package type"); return [$PAlxy, $BWx9O]; } } 
 ?>

Did this file decode correctly?

Original Code

<?php
 declare (strict_types=1); namespace OneTeamSoftware\ShippingCarrier\ShipStation\EndPoint\RateFilter; use OneTeamSoftware\Logger\LoggerInterface; use OneTeamSoftware\ShippingCarrier\AbstractAdapter\Type\CollectionInterface; use OneTeamSoftware\ShippingCarrier\ShipStation\Type\ServiceIdBuilder; class RateFilter { private $logger; private $serviceIdBuilder; private $packageTypes; public function __construct(LoggerInterface $fnOUc, ServiceIdBuilder $blUDK, CollectionInterface $i0JQQ) { $this->logger = $fnOUc; $this->serviceIdBuilder = $blUDK; $this->packageTypes = $i0JQQ; } public function filter(array $iAKs6, string $anbag, string $BWx9O) : array { $this->logger->debug(__FILE__, 62, "\146\x69\154\x74\x65\162\x3a\x20\45\163", print_r($iAKs6, true)); if (empty($iAKs6["\163\x65\162\x76\x69\143\x65\x43\157\x64\x65"]) || empty($iAKs6["\163\x65\x72\166\x69\x63\145\x4e\141\x6d\145"]) || empty($iAKs6["\163\x68\151\x70\155\x65\x6e\164\x43\x6f\x73\x74"]) || false === isset($iAKs6["\x6f\164\x68\x65\x72\x43\x6f\x73\164"])) { $this->logger->debug(__FILE__, 70, "\122\141\x74\x65\x20\144\157\145\x73\40\x6e\157\164\40\x68\x61\x76\145\x20\x73\x65\x72\166\151\x63\x65\x4e\x61\155\x65\x2c\40\163\x68\x69\160\x6d\x65\156\x74\103\157\x73\x74\x20\x6f\x72\x20\x6f\x74\x68\145\162\103\x6f\163\164\40\x73\x65\164\54\40\x73\157\40\x73\x6b\x69\160\40\x6d\151\147\x68\x74\x20\142\145\x20\x69\x6e\166\x61\154\151\144"); return []; } $nZonI = $this->serviceIdBuilder->build($anbag, $iAKs6["\x73\x65\162\166\151\x63\x65\x43\157\144\145"]); $PAlxy = $iAKs6["\163\x65\162\x76\151\143\145\x4e\141\x6d\145"]; list($PAlxy, $XrSkQ) = $this->getServiceAndPackageTypeNamesPair($PAlxy, $BWx9O); if (strtolower($BWx9O) !== strtolower($XrSkQ)) { $this->logger->debug(__FILE__, 80, "\x50\141\x63\153\x61\x67\145\x20\164\171\x70\x65\x20\x25\x73\x20\144\x6f\x65\163\40\156\x6f\x74\x20\x6d\x61\164\143\x68\40\45\163", $XrSkQ, $BWx9O); return []; } $fbi9x = []; $fbi9x["\x73\145\162\166\151\143\145"] = $nZonI; $fbi9x["\x70\x6f\163\x74\x61\x67\x65\x5f\x64\x65\x73\143\x72\x69\160\164\151\x6f\156"] = trim($PAlxy); $fbi9x["\x63\x6f\x73\164"] = $iAKs6["\x73\x68\151\160\x6d\x65\x6e\x74\x43\x6f\163\164"] + $iAKs6["\x6f\164\150\x65\x72\x43\157\163\x74"]; $this->logger->debug(__FILE__, 90, "\x50\x61\x63\x6b\x61\x67\145\x20\x74\171\x70\145\40\150\x61\163\x20\155\141\164\143\x68\145\144\54\x20\x73\157\x20\x72\145\164\x75\162\156\x20\162\141\x74\x65\x3a\40\45\163", print_r($fbi9x, true)); return $fbi9x; } private function getServiceAndPackageTypeNamesPair(string $PAlxy, string $BWx9O) : array { $S0XDc = explode("\55", $PAlxy); if (2 !== count($S0XDc)) { $this->logger->debug(__FILE__, 106, "\x53\145\x72\166\x69\143\x65\40\156\141\x6d\145\x20\x64\x6f\145\x73\40\x6e\x6f\164\x20\143\x6f\x6e\164\x61\151\156\x20\x61\x20\160\x61\x63\x6b\141\x67\145\40\x74\171\160\145"); return [$PAlxy, $BWx9O]; } $S0XDc = array_map("\164\x72\x69\155", $S0XDc); $XrSkQ = $S0XDc[1]; $this->logger->debug(__FILE__, 114, "\x4c\157\157\153\x20\x75\x70\40\x70\141\143\x6b\x61\147\x65\x20\164\x79\160\145\72\40\x25\x73", $XrSkQ); if ($this->packageTypes->has($XrSkQ)) { $this->logger->debug(__FILE__, 117, "\x53\x65\162\166\x69\x63\x65\x20\156\141\x6d\x65\40\x63\157\156\164\x61\x69\x6e\163\40\x73\165\160\x70\x6f\x72\x74\145\x64\40\x70\x61\x63\x6b\x61\147\x65\40\164\171\x70\x65"); return $S0XDc; } $XrSkQ = strtolower($XrSkQ); if ($this->packageTypes->has($XrSkQ)) { $this->logger->debug(__FILE__, 126, "\x53\x65\162\x76\x69\x63\145\x20\156\x61\x6d\x65\x20\x63\x6f\x6e\x74\141\x69\156\x73\x20\163\x75\160\x70\157\162\164\145\x64\x20\x70\x61\x63\x6b\x61\147\x65\x20\x74\x79\x70\x65"); return $S0XDc; } $this->logger->debug(__FILE__, 131, "\x53\x65\162\x76\151\x63\x65\40\156\141\x6d\145\40\x64\157\145\x73\x20\x6e\157\x74\40\143\157\x6e\x74\x61\151\x6e\40\163\165\x70\x70\x6f\x72\x74\x65\144\x20\x70\141\x63\153\141\x67\x65\x20\164\x79\160\145"); return [$PAlxy, $BWx9O]; } }

Function Calls

None

Variables

None

Stats

MD5 6a02af7c3a627ef772eb55dab627a229
Eval Count 0
Decode Time 59 ms