for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* integer_net Magento Module
*
* @category IntegerNet
* @package IntegerNet_Anonymizer
* @copyright Copyright (c) 2015 integer_net GmbH (http://www.integer-net.de/)
* @author Fabian Schmengler <[email protected]>
*/
require_once 'abstract.php';
require_once 'autoloader_initializer.php';
class IntegerNet_Anonymizer_Shell extends AutoloaderInitializer
{
* Run script
public function run()
ini_set('memory_limit', '1024M');
/** @var IntegerNet_Anonymizer_Model_Anonymizer $anonymizer */
$anonymizer = Mage::getModel('integernet_anonymizer/anonymizer');
$anonymizer->setOutputStream(STDOUT);
STDOUT
string
resource
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example:
function acceptsInteger($int) { } $x = '123'; // string "123" // Instead of acceptsInteger($x); // we recommend to use acceptsInteger((integer) $x);
$anonymizer->setShowProgress((bool) $this->getArg('progress'));
$anonymizer->setProgressSteps((int) $this->getArg('progress'));
$anonymizer->anonymizeAll();
}
public function usageHelp()
return <<<USAGE
Usage: php -f anonymizer.php -- [options]
--progress [steps] Show progress in real time (steps defines after how many updated entities status should be refreshed)
-h | --help This help
USAGE;
$shell = new IntegerNet_Anonymizer_Shell();
$shell->run();
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: