| @@ -4,7 +4,6 @@ | ||
| 4 | 4 | |
| 5 | 5 | use \Richdynamix\PersonalisedProducts\Console\Command\AbstractOrdersCommand; | 
| 6 | 6 | use Symfony\Component\Console\Command\Command; | 
| 7 | -use Symfony\Component\Console\Input\InputOption; | |
| 8 | 7 | use Symfony\Component\Console\Input\InputInterface; | 
| 9 | 8 | use Symfony\Component\Console\Output\OutputInterface; | 
| 10 | 9 | use \Symfony\Component\Config\Definition\Exception\Exception; | 
| @@ -37,7 +37,7 @@ | ||
| 37 | 37 | protected function execute(InputInterface $input, OutputInterface $output) | 
| 38 | 38 |      { | 
| 39 | 39 | $customerProducts = $this->_getCustomerProductCollection($this->_getOrderCollection()); | 
| 40 | -        $output->writeln('Preparing to send '. count($customerProducts) .' orders'); | |
| 40 | +        $output->writeln('Preparing to send ' . count($customerProducts) . ' orders'); | |
| 41 | 41 | $output->writeln( | 
| 42 | 42 | 'Preparing ' . $this->_getCustomerCount() . ' customers with a total of ' . | 
| 43 | 43 | $this->_getProductCount() . ' products' | 
| @@ -125,7 +125,6 @@ | ||
| 125 | 125 | /** | 
| 126 | 126 | * Set table row increment ID | 
| 127 | 127 | * | 
| 128 | - * @param mixed $id | |
| 129 | 128 | * @return $this | 
| 130 | 129 | */ | 
| 131 | 130 | public function setId($incrementId) | 
| @@ -104,7 +104,7 @@ | ||
| 104 | 104 | /** | 
| 105 | 105 | * Add query properties to the data in the query for PredictionIO engine | 
| 106 | 106 | * | 
| 107 | - * @param $property | |
| 107 | + * @param string $property | |
| 108 | 108 | * @param $data | 
| 109 | 109 | * @param $propertyData | 
| 110 | 110 | * @return $this | 
| @@ -84,8 +84,8 @@ | ||
| 84 | 84 |          try { | 
| 85 | 85 | $data = [ | 
| 86 | 86 | |
| 87 | - 'items' => $productIds, | |
| 88 | - 'num' => (int) $this->_config->getProductCount(Config::SIMILARITY_PRODUCT_COUNT), | |
| 87 | + 'items' => $productIds, | |
| 88 | + 'num' => (int) $this->_config->getProductCount(Config::SIMILARITY_PRODUCT_COUNT), | |
| 89 | 89 | ]; | 
| 90 | 90 | |
| 91 | 91 |              $this->_addProperties('categories', $data, $categories); | 
| @@ -121,9 +121,9 @@ discard block | ||
| 121 | 121 | /** | 
| 122 | 122 | * Method for sending user-action-item events | 
| 123 | 123 | * | 
| 124 | - * @param $action | |
| 125 | - * @param $customerId | |
| 126 | - * @param $productId | |
| 124 | + * @param string $action | |
| 125 | + * @param integer $customerId | |
| 126 | + * @param integer $productId | |
| 127 | 127 | * @return bool | 
| 128 | 128 | */ | 
| 129 | 129 | private function _setCustomerToItemAction($action, $customerId, $productId) | 
| @@ -149,8 +149,8 @@ discard block | ||
| 149 | 149 | /** | 
| 150 | 150 | * Method to send individual entities | 
| 151 | 151 | * | 
| 152 | - * @param $entityType | |
| 153 | - * @param $entityId | |
| 152 | + * @param string $entityType | |
| 153 | + * @param integer $entityId | |
| 154 | 154 | * @param null $properties | 
| 155 | 155 | * @return bool | 
| 156 | 156 | */ | 
| @@ -81,7 +81,7 @@ | ||
| 81 | 81 | $ordersCollection = $order->getCollection() | 
| 82 | 82 | ->addFieldToSelect(['entity_id', 'customer_id']) | 
| 83 | 83 |              ->addFieldToFilter('state', ['eq' => 'complete']) | 
| 84 | -            ->addFieldToFilter('customer_id', array('neq' => 'NULL' )); | |
| 84 | +            ->addFieldToFilter('customer_id', array('neq' => 'NULL')); | |
| 85 | 85 | |
| 86 | 86 | return $ordersCollection->getData(); | 
| 87 | 87 | } | 
| @@ -35,11 +35,11 @@ | ||
| 35 | 35 | protected function execute(InputInterface $input, OutputInterface $output) | 
| 36 | 36 |      { | 
| 37 | 37 | $collection = $this->_getProductCollection(); | 
| 38 | -        $output->writeln('Preparing to send '. count($collection) .' products'); | |
| 38 | +        $output->writeln('Preparing to send ' . count($collection) . ' products'); | |
| 39 | 39 | |
| 40 | 40 |          try { | 
| 41 | 41 | $sentCount = $this->_sendProductData($collection); | 
| 42 | -            $output->writeln('Successfully sent '. $sentCount .' customers to the PredictionIO event server'); | |
| 42 | +            $output->writeln('Successfully sent ' . $sentCount . ' customers to the PredictionIO event server'); | |
| 43 | 43 |          } catch (Exception $e) { | 
| 44 | 44 |              $output->writeln('Error: ' . $e->getMessage()); | 
| 45 | 45 | } | 
| @@ -34,11 +34,11 @@ | ||
| 34 | 34 | protected function execute(InputInterface $input, OutputInterface $output) | 
| 35 | 35 |      { | 
| 36 | 36 | $collection = $this->_getCustomerCollection(); | 
| 37 | -        $output->writeln('Preparing to send '. count($collection) .' customers'); | |
| 37 | +        $output->writeln('Preparing to send ' . count($collection) . ' customers'); | |
| 38 | 38 | |
| 39 | 39 |          try { | 
| 40 | 40 | $sentCount = $this->_sendCustomerData($collection); | 
| 41 | -            $output->writeln('Successfully sent '. $sentCount .' customers to the PredictionIO event server'); | |
| 41 | +            $output->writeln('Successfully sent ' . $sentCount . ' customers to the PredictionIO event server'); | |
| 42 | 42 |          } catch (\Exception $e) { | 
| 43 | 43 |              $output->writeln('Error: ' . $e->getMessage()); | 
| 44 | 44 | } | 
| @@ -1,10 +1,10 @@ | ||
| 1 | 1 | <?php | 
| 2 | 2 | /** | 
| 3 | - * Created by PhpStorm. | |
| 4 | - * User: sarichardson | |
| 5 | - * Date: 01/12/2015 | |
| 6 | - * Time: 10:29 | |
| 7 | - */ | |
| 3 | + * Created by PhpStorm. | |
| 4 | + * User: sarichardson | |
| 5 | + * Date: 01/12/2015 | |
| 6 | + * Time: 10:29 | |
| 7 | + */ | |
| 8 | 8 | |
| 9 | 9 | namespace Richdynamix\PersonalisedProducts\Tests\Block\Product\ProductList; | 
| 10 | 10 | |
| @@ -20,7 +20,7 @@ discard block | ||
| 20 | 20 | /** | 
| 21 | 21 | * Product ID to export | 
| 22 | 22 | */ | 
| 23 | - const PRODUCT_ID = 'product_id'; | |
| 23 | + const PRODUCT_ID = 'product_id'; | |
| 24 | 24 | |
| 25 | 25 | /** | 
| 26 | 26 | * Table row created time | 
| @@ -30,12 +30,12 @@ discard block | ||
| 30 | 30 | /** | 
| 31 | 31 | * Table row updated time | 
| 32 | 32 | */ | 
| 33 | - const UPDATE_TIME = 'update_time'; | |
| 33 | + const UPDATE_TIME = 'update_time'; | |
| 34 | 34 | |
| 35 | 35 | /** | 
| 36 | 36 | * Is the product exported | 
| 37 | 37 | */ | 
| 38 | - const IS_EXPORTED = 'is_exported'; | |
| 38 | + const IS_EXPORTED = 'is_exported'; | |
| 39 | 39 | |
| 40 | 40 | /** | 
| 41 | 41 | * Get the table increment ID |