Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 7.2 fixes (method signature) #450

Merged
merged 2 commits into from Mar 9, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,14 @@
*/
class Mage_Customer_Model_Customer_Attribute_Source_Group extends Mage_Eav_Model_Entity_Attribute_Source_Table
{
public function getAllOptions()
/**
* Retrieve Full Option values array
*
* @param bool $withEmpty Argument has no effect, included for PHP 7.2 method signature compatibility
* @param bool $defaultValues Argument has no effect, included for PHP 7.2 method signature compatibility
* @return array
*/
public function getAllOptions($withEmpty = true, $defaultValues = false)
{
if (!$this->_options) {
$this->_options = Mage::getResourceModel('customer/group_collection')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,14 @@
*/
class Mage_Customer_Model_Customer_Attribute_Source_Store extends Mage_Eav_Model_Entity_Attribute_Source_Table
{
public function getAllOptions()
/**
* Retrieve Full Option values array
*
* @param bool $withEmpty Argument has no effect, included for PHP 7.2 method signature compatibility
* @param bool $defaultValues Argument has no effect, included for PHP 7.2 method signature compatibility
* @return array
*/
public function getAllOptions($withEmpty = true, $defaultValues = false)
{
if (!$this->_options) {
$collection = Mage::getResourceModel('core/store_collection');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,14 @@
*/
class Mage_Customer_Model_Customer_Attribute_Source_Website extends Mage_Eav_Model_Entity_Attribute_Source_Table
{
public function getAllOptions()
/**
* Retrieve Full Option values array
*
* @param bool $withEmpty Argument has no effect, included for PHP 7.2 method signature compatibility
* @param bool $defaultValues Argument has no effect, included for PHP 7.2 method signature compatibility
* @return array
*/
public function getAllOptions($withEmpty = true, $defaultValues = false)
{
if (!$this->_options) {
$this->_options = Mage::getSingleton('adminhtml/system_store')->getWebsiteValuesForForm(true, true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,11 @@ public function __construct(array $args = array())
/**
* Retrieve all options
*
* @param bool $withEmpty Argument has no effect, included for PHP 7.2 method signature compatibility
* @param bool $defaultValues Argument has no effect, included for PHP 7.2 method signature compatibility
* @return array
*/
public function getAllOptions()
public function getAllOptions($withEmpty = true, $defaultValues = false)
{
if (!$this->_options) {
$this->_options = $this->_factory->getResourceModel('directory/country_collection')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,11 @@ class Mage_Customer_Model_Resource_Address_Attribute_Source_Country extends Mage
/**
* Retreive all options
*
* @param bool $withEmpty Argument has no effect, included for PHP 7.2 method signature compatibility
* @param bool $defaultValues Argument has no effect, included for PHP 7.2 method signature compatibility
* @return array
*/
public function getAllOptions()
public function getAllOptions($withEmpty = true, $defaultValues = false)
{
if (!$this->_options) {
$this->_options = Mage::getResourceModel('directory/country_collection')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,11 @@ class Mage_Customer_Model_Resource_Address_Attribute_Source_Region extends Mage_
/**
* Retreive all region options
*
* @param bool $withEmpty Argument has no effect, included for PHP 7.2 method signature compatibility
* @param bool $defaultValues Argument has no effect, included for PHP 7.2 method signature compatibility
* @return array
*/
public function getAllOptions()
public function getAllOptions($withEmpty = true, $defaultValues = false)
{
if (!$this->_options) {
$this->_options = Mage::getResourceModel('directory/region_collection')->load()->toOptionArray();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,11 @@ class Mage_Eav_Model_Entity_Attribute_Source_Store extends Mage_Eav_Model_Entity
/**
* Retrieve Full Option values array
*
* @param bool $withEmpty Argument has no effect, included for PHP 7.2 method signature compatibility
* @param bool $defaultValues Argument has no effect, included for PHP 7.2 method signature compatibility
* @return array
*/
public function getAllOptions()
public function getAllOptions($withEmpty = true, $defaultValues = false)
{
if ($this->_options === null) {
$this->_options = Mage::getResourceModel('core/store_collection')->load()->toOptionArray();
Expand Down