@@ -81,7 +81,7 @@ |
||
| 81 | 81 | * Get country name by its ISO2 abbreviation |
| 82 | 82 | * |
| 83 | 83 | * @param string $sCountryCode |
| 84 | - * @return string|bool |
|
| 84 | + * @return string|false |
|
| 85 | 85 | */ |
| 86 | 86 | public function getCountryNameByIso2($sCountryCode) |
| 87 | 87 | { |
@@ -124,7 +124,7 @@ |
||
| 124 | 124 | * |
| 125 | 125 | * @param string $sText |
| 126 | 126 | * @param string $aSubstitutionArray |
| 127 | - * @param int|bool $iMaxLength |
|
| 127 | + * @param integer $iMaxLength |
|
| 128 | 128 | * @return string |
| 129 | 129 | */ |
| 130 | 130 | public function handleSubstituteReplacement($sText, $aSubstitutionArray, $iMaxLength = false) |
@@ -28,10 +28,8 @@ |
||
| 28 | 28 | |
| 29 | 29 | use Payone\Core\Controller\Onepage\Redirect as ClassToTest; |
| 30 | 30 | use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; |
| 31 | -use Magento\Sales\Model\Order as OrderCore; |
|
| 32 | 31 | use Magento\Checkout\Model\Session; |
| 33 | 32 | use Magento\Framework\App\Action\Context; |
| 34 | -use Magento\Customer\Model\Session as CustomerSession; |
|
| 35 | 33 | use Magento\Store\App\Response\Redirect as RedirectResponse; |
| 36 | 34 | use Magento\Framework\App\Console\Response; |
| 37 | 35 | use Magento\Framework\UrlInterface; |
@@ -28,10 +28,8 @@ |
||
| 28 | 28 | |
| 29 | 29 | use Payone\Core\Controller\Onepage\Returned as ClassToTest; |
| 30 | 30 | use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; |
| 31 | -use Magento\Sales\Model\Order as OrderCore; |
|
| 32 | 31 | use Magento\Checkout\Model\Session; |
| 33 | 32 | use Magento\Framework\App\Action\Context; |
| 34 | -use Magento\Customer\Model\Session as CustomerSession; |
|
| 35 | 33 | use Magento\Store\App\Response\Redirect as RedirectResponse; |
| 36 | 34 | use Magento\Framework\App\Console\Response; |
| 37 | 35 | use Magento\Framework\App\ResponseInterface; |
@@ -28,7 +28,6 @@ |
||
| 28 | 28 | |
| 29 | 29 | use Payone\Core\Controller\Paypal\Express as ClassToTest; |
| 30 | 30 | use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; |
| 31 | -use Magento\Sales\Model\Order as OrderCore; |
|
| 32 | 31 | use Magento\Framework\Controller\Result\Redirect; |
| 33 | 32 | use Magento\Checkout\Model\Session; |
| 34 | 33 | use Magento\Framework\Controller\ResultFactory; |
@@ -28,7 +28,6 @@ |
||
| 28 | 28 | |
| 29 | 29 | use Payone\Core\Controller\Paypal\Returned as ClassToTest; |
| 30 | 30 | use Magento\Framework\TestFramework\Unit\Helper\ObjectManager; |
| 31 | -use Magento\Sales\Model\Order as OrderCore; |
|
| 32 | 31 | use Magento\Framework\Controller\Result\Redirect; |
| 33 | 32 | use Magento\Checkout\Model\Session; |
| 34 | 33 | use Payone\Core\Model\Paypal\ReturnHandler; |
@@ -38,7 +38,6 @@ |
||
| 38 | 38 | use Magento\Payment\Model\InfoInterface; |
| 39 | 39 | use Magento\Framework\Exception\LocalizedException; |
| 40 | 40 | use Magento\Framework\Event\Observer; |
| 41 | -use Magento\Store\Model\ScopeInterface; |
|
| 42 | 41 | |
| 43 | 42 | class CheckoutSubmitBeforeTest extends \PHPUnit_Framework_TestCase |
| 44 | 43 | { |
@@ -87,7 +87,7 @@ |
||
| 87 | 87 | $sXml = $this->configExport->generateConfigExportXml(); |
| 88 | 88 | if ($sXml !== false) { |
| 89 | 89 | $oResultRaw->setHeader("Content-Type", "text/xml; charset=\"utf8\"", true); |
| 90 | - $oResultRaw->setHeader("Content-Disposition", "attachment; filename=\"payone_config_export" . date('Y-m-d H-i-s') . "_" . md5($sXml) . ".xml\"", true); |
|
| 90 | + $oResultRaw->setHeader("Content-Disposition", "attachment; filename=\"payone_config_export".date('Y-m-d H-i-s')."_".md5($sXml).".xml\"", true); |
|
| 91 | 91 | $oResultRaw->setContents($sXml); |
| 92 | 92 | } |
| 93 | 93 | } catch (\Exception $e) { |
@@ -65,7 +65,7 @@ |
||
| 65 | 65 | $oOrder = $observer->getOrder(); |
| 66 | 66 | |
| 67 | 67 | // order is not guaranteed to exist if using transaction status forwarding |
| 68 | - if (null === $oOrder){ |
|
| 68 | + if (null === $oOrder) { |
|
| 69 | 69 | return; |
| 70 | 70 | } |
| 71 | 71 | |