pagantis /
magento-2X
| 1 | <?php |
||||
| 2 | |||||
| 3 | namespace Pagantis\Pagantis\Block\Payment; |
||||
| 4 | |||||
| 5 | use Magento\Backend\Block\Template\Context; |
||||
| 6 | use Magento\Framework\View\Element\Template; |
||||
| 7 | use Magento\Checkout\Model\Session; |
||||
| 8 | use Magento\Framework\Session\SessionManagerInterface; |
||||
| 9 | |||||
| 10 | class Iframe extends Template |
||||
| 11 | { |
||||
| 12 | /** |
||||
| 13 | * @var string |
||||
| 14 | */ |
||||
| 15 | public $orderUrl; |
||||
| 16 | |||||
| 17 | /** |
||||
| 18 | * @var string |
||||
| 19 | */ |
||||
| 20 | public $checkoutUrl; |
||||
| 21 | |||||
| 22 | /** |
||||
| 23 | * @var string |
||||
| 24 | */ |
||||
| 25 | public $email; |
||||
| 26 | |||||
| 27 | /** |
||||
| 28 | * @var string |
||||
| 29 | */ |
||||
| 30 | public $session; |
||||
| 31 | |||||
| 32 | /** |
||||
| 33 | * @var ObjectManager $objectManager |
||||
|
0 ignored issues
–
show
|
|||||
| 34 | */ |
||||
| 35 | protected $objectManager; |
||||
| 36 | |||||
| 37 | /** |
||||
| 38 | * Iframe constructor. |
||||
| 39 | * |
||||
| 40 | * @param Context $context |
||||
| 41 | * @param Session $session |
||||
| 42 | * @param SessionManagerInterface $coreSession |
||||
| 43 | * @param array $data |
||||
| 44 | */ |
||||
| 45 | public function __construct( |
||||
| 46 | Context $context, |
||||
| 47 | Session $session, |
||||
| 48 | SessionManagerInterface $coreSession, |
||||
|
0 ignored issues
–
show
The parameter
$coreSession is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. Loading history...
|
|||||
| 49 | array $data = [] |
||||
| 50 | ) { |
||||
| 51 | parent::__construct($context, $data); |
||||
| 52 | $this->session = $session; |
||||
|
0 ignored issues
–
show
It seems like
$session of type Magento\Checkout\Model\Session is incompatible with the declared type string of property $session.
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property. Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property.. Loading history...
|
|||||
| 53 | //$this->objectManager = \Magento\Framework\App\ObjectManager::getInstance(); |
||||
| 54 | /*$this->coreSession = $coreSession; |
||||
| 55 | |||||
| 56 | $this->coreSession->start(); |
||||
| 57 | $info = explode("&", $this->coreSession->getMessage()); |
||||
| 58 | foreach ($info as $infoValue) { |
||||
| 59 | $infoParam = explode("=", $infoValue); |
||||
| 60 | $infoVar = $infoParam[0]; |
||||
| 61 | $this->$infoVar = $infoParam[1]; |
||||
| 62 | } |
||||
| 63 | var_dump($this->getEmail()); |
||||
| 64 | die('FIIIN');*/ |
||||
| 65 | } |
||||
| 66 | |||||
| 67 | /** |
||||
| 68 | * @return string |
||||
| 69 | */ |
||||
| 70 | public function getOrderUrl() |
||||
| 71 | { |
||||
| 72 | return $this->orderUrl; |
||||
| 73 | } |
||||
| 74 | |||||
| 75 | /** |
||||
| 76 | * @param string $orderUrl |
||||
| 77 | * |
||||
| 78 | * @return Iframe |
||||
| 79 | */ |
||||
| 80 | public function setOrderUrl($orderUrl) |
||||
| 81 | { |
||||
| 82 | $this->orderUrl = $orderUrl; |
||||
| 83 | |||||
| 84 | return $this; |
||||
| 85 | } |
||||
| 86 | |||||
| 87 | /** |
||||
| 88 | * @return string |
||||
| 89 | */ |
||||
| 90 | public function getCheckoutUrl() |
||||
| 91 | { |
||||
| 92 | return $this->checkoutUrl; |
||||
| 93 | } |
||||
| 94 | |||||
| 95 | /** |
||||
| 96 | * @param string $checkoutUrl |
||||
| 97 | * |
||||
| 98 | * @return Iframe |
||||
| 99 | */ |
||||
| 100 | public function setCheckoutUrl($checkoutUrl) |
||||
| 101 | { |
||||
| 102 | $this->checkoutUrl = $checkoutUrl; |
||||
| 103 | |||||
| 104 | return $this; |
||||
| 105 | } |
||||
| 106 | |||||
| 107 | /** |
||||
| 108 | * @return string |
||||
| 109 | */ |
||||
| 110 | public function getEmail() |
||||
| 111 | { |
||||
| 112 | return $this->email; |
||||
| 113 | } |
||||
| 114 | |||||
| 115 | /** |
||||
| 116 | * @param string $email |
||||
| 117 | * |
||||
| 118 | * @return Iframe |
||||
| 119 | */ |
||||
| 120 | public function setEmail($email) |
||||
| 121 | { |
||||
| 122 | $this->email = $email; |
||||
| 123 | |||||
| 124 | return $this; |
||||
| 125 | } |
||||
| 126 | |||||
| 127 | } |
||||
| 128 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths