@@ -52,7 +52,7 @@ |
||
52 | 52 | $this->_updater->setShowProgress($showProgress); |
53 | 53 | } |
54 | 54 | /** |
55 | - * @param $steps How often progress output should be refreshed (default is 1 = after every entity update; example: 10 = every 10 entity updates) |
|
55 | + * @param integer $steps How often progress output should be refreshed (default is 1 = after every entity update; example: 10 = every 10 entity updates) |
|
56 | 56 | */ |
57 | 57 | public function setProgressSteps($steps) |
58 | 58 | { |
@@ -43,7 +43,7 @@ |
||
43 | 43 | { |
44 | 44 | usort( |
45 | 45 | $entityModelsConfig, |
46 | - function ($entityModel1, $entityModel2) { |
|
46 | + function($entityModel1, $entityModel2) { |
|
47 | 47 | return strcmp($entityModel1['sort'], $entityModel2['sort']); |
48 | 48 | } |
49 | 49 | ); |
@@ -69,6 +69,10 @@ discard block |
||
69 | 69 | { |
70 | 70 | $this->_iteration = $iteration; |
71 | 71 | } |
72 | + |
|
73 | + /** |
|
74 | + * @param integer $offset |
|
75 | + */ |
|
72 | 76 | public function setIterationOffset($offset) |
73 | 77 | { |
74 | 78 | $this->_iterationOffset = $offset; |
@@ -77,7 +81,7 @@ discard block |
||
77 | 81 | /** |
78 | 82 | * Returns raw data from database |
79 | 83 | * |
80 | - * @return mixed |
|
84 | + * @return string[] |
|
81 | 85 | */ |
82 | 86 | function getRawData() |
83 | 87 | { |
@@ -55,6 +55,7 @@ |
||
55 | 55 | /** |
56 | 56 | * @param $id |
57 | 57 | * @param $bridge |
58 | + * @param string $idField |
|
58 | 59 | * @return mixed |
59 | 60 | */ |
60 | 61 | protected function _loadEntityByCollection($idField, $id, $bridge) |
@@ -14,7 +14,7 @@ |
||
14 | 14 | * @param $expected |
15 | 15 | */ |
16 | 16 | protected function _testGetValues(IntegerNet_Anonymizer_Model_Bridge_Entity_Abstract $bridge, |
17 | - Mage_Core_Model_Abstract $model, Varien_Object $expected) |
|
17 | + Mage_Core_Model_Abstract $model, Varien_Object $expected) |
|
18 | 18 | { |
19 | 19 | $bridge->setRawData($model->getData()); |
20 | 20 | $this->assertEquals($expected['identifier'], $bridge->getIdentifier(), 'Identifier'); |
@@ -56,7 +56,7 @@ |
||
56 | 56 | /** |
57 | 57 | * Returns total size of collection |
58 | 58 | * |
59 | - * @return mixed |
|
59 | + * @return integer |
|
60 | 60 | */ |
61 | 61 | function getSize() |
62 | 62 | { |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | $provider->expects($this->exactly(2))->method('getFakerData') |
54 | 54 | ->withConsecutive( |
55 | 55 | array('email', '[email protected]|[email protected]', true), |
56 | - array('name', '[email protected]|Mr. Email', false)); |
|
56 | + array('name', '[email protected]|Mr. Email', false)); |
|
57 | 57 | |
58 | 58 | $anonymizer = new Anonymizer($provider, 'de_DE'); |
59 | 59 | $anonymizer->anonymize([new AnonymizableMock(['email' => '[email protected]', 'name' => 'Mr. Email'], 'email')]); |
@@ -65,16 +65,16 @@ discard block |
||
65 | 65 | return array( |
66 | 66 | array( |
67 | 67 | 'inputData' => array( |
68 | - new AnonymizableMock(['email' => '[email protected]', 'firstName' => 'Max', 'lastName' => 'Mustermann']), |
|
69 | - new AnonymizableMock(['email' => '[email protected]', 'firstName' => 'Max', 'lastName' => 'Mustermann']), |
|
68 | + new AnonymizableMock(['email' => '[email protected]', 'firstName' => 'Max', 'lastName' => 'Mustermann']), |
|
69 | + new AnonymizableMock(['email' => '[email protected]', 'firstName' => 'Max', 'lastName' => 'Mustermann']), |
|
70 | 70 | new AnonymizableMock(['email' => '[email protected]', 'firstName' => 'Maxi', 'lastName' => 'Musterfrau']), |
71 | - new AnonymizableMock(['email' => '[email protected]', 'firstName' => 'Max', 'lastName' => 'Mustermann', 'streetAddress' => 'Musterstraße 42']), |
|
71 | + new AnonymizableMock(['email' => '[email protected]', 'firstName' => 'Max', 'lastName' => 'Mustermann', 'streetAddress' => 'Musterstraße 42']), |
|
72 | 72 | ), |
73 | 73 | 'expectedValues' => array( |
74 | - '[email protected]', '[email protected]', '[email protected]', |
|
74 | + '[email protected]', '[email protected]', '[email protected]', |
|
75 | 75 | '[email protected]', '[email protected]', '[email protected]', |
76 | 76 | '[email protected]', '[email protected]', '[email protected]', |
77 | - '[email protected]', '[email protected]', '[email protected]', '[email protected]' |
|
77 | + '[email protected]', '[email protected]', '[email protected]', '[email protected]' |
|
78 | 78 | ) |
79 | 79 | ) |
80 | 80 | ); |
@@ -45,6 +45,6 @@ |
||
45 | 45 | $randomDigits[] = $provider->getFakerData('randomDigit', '[email protected]', true); |
46 | 46 | } |
47 | 47 | sort($randomDigits); |
48 | - $this->assertEquals(range(0,9), $randomDigits, '10 unique digits should be all from 0..9'); |
|
48 | + $this->assertEquals(range(0, 9), $randomDigits, '10 unique digits should be all from 0..9'); |
|
49 | 49 | } |
50 | 50 | } |
@@ -55,7 +55,7 @@ |
||
55 | 55 | */ |
56 | 56 | private function _getFieldIdentifier(AnonymizableEntity $entity, AnonymizableValue $value) |
57 | 57 | { |
58 | - return sprintf('%s|%s', $entity->getIdentifier(), join('', (array)$value->getValue())); |
|
58 | + return sprintf('%s|%s', $entity->getIdentifier(), join('', (array) $value->getValue())); |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | public function resetUniqueGenerator() |
@@ -61,7 +61,7 @@ |
||
61 | 61 | /** @var IntegerNet_Anonymizer_Model_Bridge_Entity_Enterprise_GiftregistryPerson $bridge */ |
62 | 62 | $bridge = Mage::getModel('integernet_anonymizer/bridge_entity_enterprise_giftregistryPerson'); |
63 | 63 | |
64 | - $dataProvider = Mage::getModel('enterprise_giftregistry/person');; |
|
64 | + $dataProvider = Mage::getModel('enterprise_giftregistry/person'); ; |
|
65 | 65 | $bridge->setRawData($dataProvider->load($registryId)->setId($registryId)->getData()); |
66 | 66 | $bridge->getValues()['email']->setValue($changedEmail); |
67 | 67 |
@@ -43,7 +43,7 @@ |
||
43 | 43 | public function testUpdateValues($customerId) |
44 | 44 | { |
45 | 45 | static $changedEmail = '[email protected]', |
46 | - $changedMiddlename = 'trouble'; |
|
46 | + $changedMiddlename = 'trouble'; |
|
47 | 47 | |
48 | 48 | /** @var IntegerNet_Anonymizer_Model_Bridge_Entity_Customer $bridge */ |
49 | 49 | $bridge = Mage::getModel('integernet_anonymizer/bridge_entity_customer'); |