EC-CUBE /
ec-cube
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
| 1 | <?php |
||
| 2 | |||
| 3 | /* |
||
| 4 | * This file is part of EC-CUBE |
||
| 5 | * |
||
| 6 | * Copyright(c) LOCKON CO.,LTD. All Rights Reserved. |
||
| 7 | * |
||
| 8 | * http://www.lockon.co.jp/ |
||
| 9 | * |
||
| 10 | * For the full copyright and license information, please view the LICENSE |
||
| 11 | * file that was distributed with this source code. |
||
| 12 | */ |
||
| 13 | |||
| 14 | namespace Eccube\Entity; |
||
| 15 | |||
| 16 | use Doctrine\ORM\Mapping as ORM; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * BlockPosition |
||
| 20 | * |
||
| 21 | * @ORM\Table(name="dtb_block_position") |
||
| 22 | * @ORM\InheritanceType("SINGLE_TABLE") |
||
| 23 | * @ORM\DiscriminatorColumn(name="discriminator_type", type="string", length=255) |
||
| 24 | * @ORM\HasLifecycleCallbacks() |
||
| 25 | * @ORM\Entity(repositoryClass="Eccube\Repository\BlockPositionRepository") |
||
| 26 | */ |
||
| 27 | class BlockPosition extends \Eccube\Entity\AbstractEntity |
||
| 28 | { |
||
| 29 | /** |
||
| 30 | * @var int |
||
| 31 | * |
||
| 32 | * @ORM\Column(name="page_id", type="integer", options={"unsigned":true}, nullable=true) |
||
| 33 | * |
||
| 34 | * @deprecated |
||
| 35 | */ |
||
| 36 | private $page_id; |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @var int |
||
| 40 | * |
||
| 41 | * @ORM\Column(name="section", type="integer", options={"unsigned":true}) |
||
| 42 | * @ORM\Id |
||
| 43 | * @ORM\GeneratedValue(strategy="NONE") |
||
| 44 | */ |
||
| 45 | private $section; |
||
| 46 | |||
| 47 | /** |
||
| 48 | * @var int |
||
| 49 | * |
||
| 50 | * @ORM\Column(name="block_id", type="integer", options={"unsigned":true}) |
||
| 51 | * @ORM\Id |
||
| 52 | * @ORM\GeneratedValue(strategy="NONE") |
||
| 53 | */ |
||
| 54 | private $block_id; |
||
| 55 | |||
| 56 | /** |
||
| 57 | * @var int |
||
| 58 | * |
||
| 59 | * @ORM\Column(name="layout_id", type="integer", options={"unsigned":true}) |
||
| 60 | * @ORM\Id |
||
| 61 | * @ORM\GeneratedValue(strategy="NONE") |
||
| 62 | */ |
||
| 63 | private $layout_id; |
||
| 64 | |||
| 65 | /** |
||
| 66 | * @var int|null |
||
| 67 | * |
||
| 68 | * @ORM\Column(name="block_row", type="integer", nullable=true, options={"unsigned":true}) |
||
| 69 | */ |
||
| 70 | private $block_row; |
||
| 71 | |||
| 72 | /** |
||
| 73 | * @var int |
||
| 74 | * |
||
| 75 | * @ORM\Column(name="anywhere", type="smallint", options={"default":0}) |
||
| 76 | * |
||
| 77 | * @deprecated |
||
| 78 | */ |
||
| 79 | private $anywhere = 0; |
||
| 80 | |||
| 81 | /** |
||
| 82 | * @var \Eccube\Entity\Block |
||
| 83 | * |
||
| 84 | * @ORM\ManyToOne(targetEntity="Eccube\Entity\Block", inversedBy="BlockPositions") |
||
| 85 | * @ORM\JoinColumns({ |
||
| 86 | * @ORM\JoinColumn(name="block_id", referencedColumnName="id") |
||
| 87 | * }) |
||
| 88 | */ |
||
| 89 | private $Block; |
||
| 90 | |||
| 91 | /** |
||
| 92 | * @var \Eccube\Entity\PageLayout |
||
| 93 | * |
||
| 94 | * @ORM\ManyToOne(targetEntity="Eccube\Entity\Page", inversedBy="BlockPositions") |
||
| 95 | * @ORM\JoinColumns({ |
||
| 96 | * @ORM\JoinColumn(name="page_id", referencedColumnName="id") |
||
| 97 | * }) |
||
| 98 | * |
||
| 99 | * @deprecated |
||
| 100 | */ |
||
| 101 | private $Page; |
||
| 102 | |||
| 103 | /** |
||
| 104 | * @var \Eccube\Entity\Layout |
||
| 105 | * |
||
| 106 | * @ORM\ManyToOne(targetEntity="Eccube\Entity\Layout", inversedBy="BlockPositions") |
||
| 107 | * @ORM\JoinColumns({ |
||
| 108 | * @ORM\JoinColumn(name="layout_id", referencedColumnName="id") |
||
| 109 | * }) |
||
| 110 | */ |
||
| 111 | private $Layout; |
||
| 112 | |||
| 113 | /** |
||
| 114 | * Set pageId. |
||
| 115 | * |
||
| 116 | * @param int $pageId |
||
| 117 | * |
||
| 118 | * @return BlockPosition |
||
| 119 | * |
||
| 120 | * @deprecated |
||
| 121 | */ |
||
| 122 | public function setPageId($pageId) |
||
| 123 | { |
||
| 124 | $this->page_id = $pageId; |
||
|
0 ignored issues
–
show
|
|||
| 125 | |||
| 126 | return $this; |
||
| 127 | } |
||
| 128 | |||
| 129 | /** |
||
| 130 | * Get pageId. |
||
| 131 | * |
||
| 132 | * @return int |
||
| 133 | * |
||
| 134 | * @deprecated |
||
| 135 | */ |
||
| 136 | public function getPageId() |
||
| 137 | { |
||
| 138 | return $this->page_id; |
||
|
0 ignored issues
–
show
The property
Eccube\Entity\BlockPosition::$page_id has been deprecated.
This property has been deprecated. The supplier of the class has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the property will be removed from the class and what other property to use instead. Loading history...
|
|||
| 139 | } |
||
| 140 | |||
| 141 | /** |
||
| 142 | * Set section. |
||
| 143 | * |
||
| 144 | * @param int $section |
||
| 145 | * |
||
| 146 | * @return BlockPosition |
||
| 147 | */ |
||
| 148 | 1 | public function setSection($section) |
|
| 149 | { |
||
| 150 | 1 | $this->section = $section; |
|
| 151 | |||
| 152 | 1 | return $this; |
|
| 153 | } |
||
| 154 | |||
| 155 | /** |
||
| 156 | * Get section. |
||
| 157 | * |
||
| 158 | * @return int |
||
| 159 | */ |
||
| 160 | 113 | public function getSection() |
|
| 161 | { |
||
| 162 | 113 | return $this->section; |
|
| 163 | } |
||
| 164 | |||
| 165 | /** |
||
| 166 | * Set blockId. |
||
| 167 | * |
||
| 168 | * @param int $blockId |
||
| 169 | * |
||
| 170 | * @return BlockPosition |
||
| 171 | */ |
||
| 172 | 1 | public function setBlockId($blockId) |
|
| 173 | { |
||
| 174 | 1 | $this->block_id = $blockId; |
|
| 175 | |||
| 176 | 1 | return $this; |
|
| 177 | } |
||
| 178 | |||
| 179 | /** |
||
| 180 | * Get blockId. |
||
| 181 | * |
||
| 182 | * @return int |
||
| 183 | */ |
||
| 184 | 1 | public function getBlockId() |
|
| 185 | { |
||
| 186 | 1 | return $this->block_id; |
|
| 187 | } |
||
| 188 | |||
| 189 | /** |
||
| 190 | * Set layoutId. |
||
| 191 | * |
||
| 192 | * @param int $layoutId |
||
| 193 | * |
||
| 194 | * @return BlockPosition |
||
| 195 | */ |
||
| 196 | 1 | public function setLayoutId($layoutId) |
|
| 197 | { |
||
| 198 | 1 | $this->layout_id = $layoutId; |
|
| 199 | |||
| 200 | 1 | return $this; |
|
| 201 | } |
||
| 202 | |||
| 203 | /** |
||
| 204 | * Get layoutId. |
||
| 205 | * |
||
| 206 | * @return int |
||
| 207 | */ |
||
| 208 | public function getLayoutId() |
||
| 209 | { |
||
| 210 | return $this->layout_id; |
||
| 211 | } |
||
| 212 | |||
| 213 | /** |
||
| 214 | * Set blockRow. |
||
| 215 | * |
||
| 216 | * @param int|null $blockRow |
||
| 217 | * |
||
| 218 | * @return BlockPosition |
||
| 219 | */ |
||
| 220 | 1 | public function setBlockRow($blockRow = null) |
|
| 221 | { |
||
| 222 | 1 | $this->block_row = $blockRow; |
|
| 223 | |||
| 224 | 1 | return $this; |
|
| 225 | } |
||
| 226 | |||
| 227 | /** |
||
| 228 | * Get blockRow. |
||
| 229 | * |
||
| 230 | * @return int|null |
||
| 231 | */ |
||
| 232 | public function getBlockRow() |
||
| 233 | { |
||
| 234 | return $this->block_row; |
||
| 235 | } |
||
| 236 | |||
| 237 | /** |
||
| 238 | * Set anywhere. |
||
| 239 | * |
||
| 240 | * @param int $anywhere |
||
| 241 | * |
||
| 242 | * @return BlockPosition |
||
| 243 | * |
||
| 244 | * @deprecated |
||
| 245 | */ |
||
| 246 | public function setAnywhere($anywhere) |
||
| 247 | { |
||
| 248 | $this->anywhere = $anywhere; |
||
|
0 ignored issues
–
show
The property
Eccube\Entity\BlockPosition::$anywhere has been deprecated.
This property has been deprecated. The supplier of the class has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the property will be removed from the class and what other property to use instead. Loading history...
|
|||
| 249 | |||
| 250 | return $this; |
||
| 251 | } |
||
| 252 | |||
| 253 | /** |
||
| 254 | * Get anywhere. |
||
| 255 | * |
||
| 256 | * @return int |
||
| 257 | * |
||
| 258 | * @deprecated |
||
| 259 | */ |
||
| 260 | public function getAnywhere() |
||
| 261 | { |
||
| 262 | return $this->anywhere; |
||
|
0 ignored issues
–
show
The property
Eccube\Entity\BlockPosition::$anywhere has been deprecated.
This property has been deprecated. The supplier of the class has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the property will be removed from the class and what other property to use instead. Loading history...
|
|||
| 263 | } |
||
| 264 | |||
| 265 | /** |
||
| 266 | * Set block. |
||
| 267 | * |
||
| 268 | * @param \Eccube\Entity\Block|null $block |
||
| 269 | * |
||
| 270 | * @return BlockPosition |
||
| 271 | */ |
||
| 272 | 1 | public function setBlock(\Eccube\Entity\Block $block = null) |
|
| 273 | { |
||
| 274 | 1 | $this->Block = $block; |
|
| 275 | |||
| 276 | 1 | return $this; |
|
| 277 | } |
||
| 278 | |||
| 279 | /** |
||
| 280 | * Get block. |
||
| 281 | * |
||
| 282 | * @return \Eccube\Entity\Block|null |
||
| 283 | */ |
||
| 284 | 117 | public function getBlock() |
|
| 285 | { |
||
| 286 | 117 | return $this->Block; |
|
| 287 | } |
||
| 288 | |||
| 289 | /** |
||
| 290 | * Set layout. |
||
| 291 | * |
||
| 292 | * @param \Eccube\Entity\Layout|null $Layout |
||
| 293 | * |
||
| 294 | * @return BlockPosition |
||
| 295 | */ |
||
| 296 | 1 | public function setLayout(\Eccube\Entity\Layout $Layout = null) |
|
| 297 | { |
||
| 298 | 1 | $this->Layout = $Layout; |
|
| 299 | |||
| 300 | 1 | return $this; |
|
| 301 | } |
||
| 302 | |||
| 303 | /** |
||
| 304 | * Get Layout. |
||
| 305 | * |
||
| 306 | * @return \Eccube\Entity\Layout|null |
||
| 307 | */ |
||
| 308 | public function getLayout() |
||
| 309 | { |
||
| 310 | return $this->Layout; |
||
| 311 | } |
||
| 312 | |||
| 313 | /** |
||
| 314 | * Set pageLayout. |
||
| 315 | * |
||
| 316 | * @param \Eccube\Entity\Page|null $Page |
||
| 317 | * |
||
| 318 | * @return BlockPosition |
||
| 319 | * |
||
| 320 | * @deprecated |
||
| 321 | */ |
||
| 322 | public function setPage(\Eccube\Entity\Page $Page = null) |
||
| 323 | { |
||
| 324 | $this->Page = $Page; |
||
|
0 ignored issues
–
show
It seems like
$Page can also be of type object<Eccube\Entity\Page>. However, the property $Page is declared as type object<Eccube\Entity\PageLayout>. Maybe add an additional type check?
Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a mixed type is assigned to a property that is type hinted more strictly. For example, imagine you have a variable Either this assignment is in error or a type check should be added for that assignment. class Id
{
public $id;
public function __construct($id)
{
$this->id = $id;
}
}
class Account
{
/** @var Id $id */
public $id;
}
$account_id = false;
if (starsAreRight()) {
$account_id = new Id(42);
}
$account = new Account();
if ($account instanceof Id)
{
$account->id = $account_id;
}
Loading history...
The property
Eccube\Entity\BlockPosition::$Page has been deprecated.
This property has been deprecated. The supplier of the class has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the property will be removed from the class and what other property to use instead. Loading history...
|
|||
| 325 | |||
| 326 | return $this; |
||
| 327 | } |
||
| 328 | |||
| 329 | /** |
||
| 330 | * Get pageLayout. |
||
| 331 | * |
||
| 332 | * @return PageLayout |
||
| 333 | * |
||
| 334 | * @deprecated |
||
| 335 | */ |
||
| 336 | public function getPage() |
||
| 337 | { |
||
| 338 | return $this->Page; |
||
|
0 ignored issues
–
show
The property
Eccube\Entity\BlockPosition::$Page has been deprecated.
This property has been deprecated. The supplier of the class has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the property will be removed from the class and what other property to use instead. Loading history...
|
|||
| 339 | } |
||
| 340 | } |
||
| 341 |
This property has been deprecated. The supplier of the class has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the property will be removed from the class and what other property to use instead.