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 $XQ5SE, ServiceIdBuilder $E6C3S, CollectionInterface $Oj4N1) { $this->logger = $XQ5SE; $this->serviceIdBuilder = $E6C3S; $this->packageTypes = $Oj4N1; } public function filter(array $nJ3w7, string $vGExf, string $o6h8u) : array { $this->logger->debug(__FILE__, 62, "filter: %s", print_r($nJ3w7, true)); if (empty($nJ3w7["serviceCode"]) || empty($nJ3w7["serviceName"]) || empty($nJ3w7["shipmentCost"]) || false === isset($nJ3w7["otherCost"])) { $this->logger->debug(__FILE__, 70, "Rate does not have serviceName, shipmentCost or otherCost set, so skip might be invalid"); return []; } $dlEiA = $this->serviceIdBuilder->build($vGExf, $nJ3w7["serviceCode"]); $CYdXH = $nJ3w7["serviceName"]; list($CYdXH, $aReSk) = $this->getServiceAndPackageTypeNamesPair($CYdXH, $o6h8u); if (strtolower($o6h8u) !== strtolower(trim($aReSk))) { $this->logger->debug(__FILE__, 80, "Package type %s does not match %s", $aReSk, $o6h8u); return []; } $tFo39 = []; $tFo39["service"] = $dlEiA; $tFo39["postage_description"] = trim($CYdXH); $tFo39["cost"] = $nJ3w7["shipmentCost"] + $nJ3w7["otherCost"]; $this->logger->debug(__FILE__, 90, "Package type has matched, so return rate: %s", print_r($tFo39, true)); return $tFo39; } private function getServiceAndPackageTypeNamesPair(string $CYdXH, string $o6h8u) : array { $PspFL = explode("-", $CYdXH); if (2 !== count($PspFL)) { $this->logger->debug(__FILE__, 106, "Service name does not contain a package type"); return [$CYdXH, $o6h8u]; } $aReSk = $PspFL[1]; $this->logger->debug(__FILE__, 113, "Look up package type: %s", $aReSk); if ($this->packageTypes->has($aReSk)) { $this->logger->debug(__FILE__, 116, "Service name contains supported package type"); return $PspFL; } $this->logger->debug(__FILE__, 121, "Service name does not contain supported package type"); return [$CYdXH, $o6h8u]; } } 
 ?>

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 $XQ5SE, ServiceIdBuilder $E6C3S, CollectionInterface $Oj4N1) { $this->logger = $XQ5SE; $this->serviceIdBuilder = $E6C3S; $this->packageTypes = $Oj4N1; } public function filter(array $nJ3w7, string $vGExf, string $o6h8u) : array { $this->logger->debug(__FILE__, 62, "\x66\x69\154\164\x65\162\72\40\45\x73", print_r($nJ3w7, true)); if (empty($nJ3w7["\163\x65\162\x76\x69\143\x65\x43\x6f\144\x65"]) || empty($nJ3w7["\163\145\162\166\x69\x63\145\116\x61\155\145"]) || empty($nJ3w7["\x73\150\x69\x70\155\x65\156\164\103\x6f\x73\164"]) || false === isset($nJ3w7["\157\x74\x68\145\x72\x43\157\x73\x74"])) { $this->logger->debug(__FILE__, 70, "\122\141\164\x65\x20\x64\x6f\145\163\40\x6e\x6f\164\40\x68\141\166\145\x20\163\x65\162\166\151\x63\x65\x4e\141\x6d\145\x2c\x20\163\150\151\160\155\x65\x6e\x74\x43\x6f\163\164\40\157\162\40\157\x74\150\x65\162\x43\x6f\x73\164\x20\163\x65\x74\x2c\x20\163\157\40\163\x6b\151\x70\40\x6d\151\147\150\164\40\142\x65\x20\x69\156\166\141\154\151\x64"); return []; } $dlEiA = $this->serviceIdBuilder->build($vGExf, $nJ3w7["\x73\145\162\x76\x69\143\145\103\157\x64\x65"]); $CYdXH = $nJ3w7["\x73\145\162\x76\x69\143\145\x4e\141\x6d\x65"]; list($CYdXH, $aReSk) = $this->getServiceAndPackageTypeNamesPair($CYdXH, $o6h8u); if (strtolower($o6h8u) !== strtolower(trim($aReSk))) { $this->logger->debug(__FILE__, 80, "\120\x61\143\x6b\141\x67\145\x20\164\171\x70\145\x20\x25\163\x20\144\x6f\x65\x73\40\156\157\x74\40\x6d\141\x74\x63\150\40\x25\163", $aReSk, $o6h8u); return []; } $tFo39 = []; $tFo39["\x73\145\x72\166\151\143\x65"] = $dlEiA; $tFo39["\160\157\x73\x74\x61\147\x65\137\144\145\163\143\x72\151\160\x74\x69\157\156"] = trim($CYdXH); $tFo39["\x63\157\x73\164"] = $nJ3w7["\163\150\151\x70\x6d\x65\156\x74\103\157\163\164"] + $nJ3w7["\x6f\x74\150\x65\162\103\157\163\164"]; $this->logger->debug(__FILE__, 90, "\x50\141\143\x6b\x61\147\x65\x20\164\x79\x70\x65\40\x68\141\x73\40\x6d\141\x74\143\150\x65\x64\54\40\163\x6f\40\162\x65\x74\165\162\x6e\40\x72\x61\164\145\x3a\x20\x25\163", print_r($tFo39, true)); return $tFo39; } private function getServiceAndPackageTypeNamesPair(string $CYdXH, string $o6h8u) : array { $PspFL = explode("\55", $CYdXH); if (2 !== count($PspFL)) { $this->logger->debug(__FILE__, 106, "\123\145\x72\166\x69\x63\145\40\x6e\141\x6d\x65\40\x64\157\x65\x73\40\156\x6f\x74\40\143\x6f\156\x74\x61\x69\156\40\141\40\160\x61\x63\153\x61\x67\x65\x20\x74\x79\x70\x65"); return [$CYdXH, $o6h8u]; } $aReSk = $PspFL[1]; $this->logger->debug(__FILE__, 113, "\114\x6f\x6f\153\40\165\160\40\x70\x61\143\153\x61\x67\145\40\164\x79\160\x65\72\40\x25\x73", $aReSk); if ($this->packageTypes->has($aReSk)) { $this->logger->debug(__FILE__, 116, "\x53\x65\x72\x76\151\x63\145\40\x6e\x61\x6d\x65\40\143\157\156\164\141\151\156\163\40\163\165\160\160\157\162\164\145\144\x20\x70\x61\x63\153\141\x67\x65\x20\164\x79\160\145"); return $PspFL; } $this->logger->debug(__FILE__, 121, "\123\145\x72\x76\151\x63\x65\40\x6e\141\x6d\145\x20\x64\x6f\145\x73\x20\x6e\157\164\40\143\157\x6e\164\x61\x69\x6e\x20\x73\x75\160\x70\157\x72\x74\x65\x64\x20\x70\141\x63\153\x61\x67\145\40\x74\x79\x70\145"); return [$CYdXH, $o6h8u]; } }

Function Calls

None

Variables

None

Stats

MD5 c9bc50ec4bd668a852498967043a4f73
Eval Count 0
Decode Time 53 ms