Completed
Push — develop ( 3d5a51...2dc442 )
by Aleksey
03:34
created
Module.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
             __DIR__ . '/config/module.config.routes.php',
26 26
             __DIR__ . '/config/module.config.servicemanager.php',
27 27
         );
28
-        foreach($configFiles as $configFile) {
28
+        foreach ($configFiles as $configFile) {
29 29
             $config = \Zend\Stdlib\ArrayUtils::merge($config, include $configFile);
30 30
         }
31 31
         return $config;
@@ -43,25 +43,25 @@  discard block
 block discarded – undo
43 43
 
44 44
     public function onBootstrap($e)
45 45
     {
46
-        if($e->getRequest() instanceof \Zend\Console\Request){
46
+        if ($e->getRequest() instanceof \Zend\Console\Request) {
47 47
             return;
48 48
         }
49 49
 
50 50
         $app = $e->getParam('application');
51 51
 
52
-        $locator  = $app->getServiceManager();
52
+        $locator = $app->getServiceManager();
53 53
         $this->setServiceManager($locator);
54 54
 
55
-        $em  = $app->getEventManager()->getSharedManager();
55
+        $em = $app->getEventManager()->getSharedManager();
56 56
 
57
-        $em->attach('ImageUploader\Service\Uploader', 'fileupload.pre',  array('SpeckCatalog\Event\FileUpload', 'preFileUpload'));
57
+        $em->attach('ImageUploader\Service\Uploader', 'fileupload.pre', array('SpeckCatalog\Event\FileUpload', 'preFileUpload'));
58 58
         $em->attach('ImageUploader\Service\Uploader', 'fileupload.post', array('SpeckCatalog\Event\FileUpload', 'postFileUpload'));
59 59
 
60
-        $em->attach('SpeckCatalog\Service\ProductUom', 'insert.post', function ($e) {
60
+        $em->attach('SpeckCatalog\Service\ProductUom', 'insert.post', function($e) {
61 61
             $eventClass = new Event\FrontendEnabled;
62 62
             $eventClass->insertProductUom($e);
63 63
         });
64
-        $em->attach('SpeckCatalog\Service\ProductUom', 'update.post', function ($e) {
64
+        $em->attach('SpeckCatalog\Service\ProductUom', 'update.post', function($e) {
65 65
             $eventClass = new Event\FrontendEnabled;
66 66
             $eventClass->updateProductUom($e);
67 67
         });
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
         $em->attach('SpeckCatalog\Service\Product', 'insert.post', array('SpeckCatalog\Event\FrontendEnabled', 'insertProduct'));
70 70
 
71 71
         //install event listeners
72
-        $em->attach('SpeckInstall\Controller\InstallController', 'install.create_tables.post', array($this, 'constraints'),1);
72
+        $em->attach('SpeckInstall\Controller\InstallController', 'install.create_tables.post', array($this, 'constraints'), 1);
73 73
     }
74 74
 
75 75
     public function constraints($e)
@@ -79,15 +79,15 @@  discard block
 block discarded – undo
79 79
 
80 80
             //check dependencies
81 81
             $tables = $mapper->query("show tables like 'contact_company'");
82
-            if(!count($tables)) {
82
+            if (!count($tables)) {
83 83
                 return array(false, 'SpeckCatalog could not add table constraints - missing table contact_company from SpeckContact');
84 84
             }
85 85
             $tables = $mapper->query("show tables like 'catalog_product'");
86
-            if(!count($tables)) {
86
+            if (!count($tables)) {
87 87
                 return array(false, 'SpeckCatalog could not add table constraints - missing tables provided by SpeckCatalog');
88 88
             }
89 89
 
90
-            $alter = file_get_contents(__DIR__ .'/data/alter.sql');
90
+            $alter = file_get_contents(__DIR__ . '/data/alter.sql');
91 91
             $mapper->query($alter);
92 92
 
93 93
         } catch (\Exception $e) {
Please login to merge, or discard this patch.
src/SpeckCatalog/Adapter/PaginatorDbSelect.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 {
9 9
     public function getItems($a, $b)
10 10
     {
11
-        $items=parent::getItems($a, $b);
11
+        $items = parent::getItems($a, $b);
12 12
         $return = array();
13 13
         foreach ($items as $item) {
14 14
             $return[] = $item;
Please login to merge, or discard this patch.
src/SpeckCatalog/Controller/CategoryController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
         $offset = ((($page * $perPage) - $perPage) + 1); //this is the first item on the page
78 78
 
79 79
         $paginatorVars['p'] = floor($offset / $_GET['nn']) + 1; //new page number
80
-        $paginatorVars['n'] = $_GET['nn'];                      //new items per page
80
+        $paginatorVars['n'] = $_GET['nn']; //new items per page
81 81
 
82 82
         $query = '?' . http_build_query($paginatorVars);
83 83
 
Please login to merge, or discard this patch.
src/SpeckCatalog/Form/AbstractForm.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
      * flag is set to false if edit() has been called,
14 14
      * to differentiate between a form for a new record, or an existing record.
15 15
      */
16
-    protected $new=true;
16
+    protected $new = true;
17 17
 
18 18
     /*
19 19
      * automatically set the hydrator for the form
Please login to merge, or discard this patch.
src/SpeckCatalog/Form/View/Helper/CatalogManagerFormRow.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@
 block discarded – undo
138 138
             }
139 139
         } else {
140 140
             if ($this->renderErrors) {
141
-                $markup = $elementString;  //. $elementErrors;
141
+                $markup = $elementString; //. $elementErrors;
142 142
             } else {
143 143
                 $markup = $elementString;
144 144
             }
Please login to merge, or discard this patch.
src/SpeckCatalog/Mapper/AbstractMapper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -220,7 +220,7 @@
 block discarded – undo
220 220
     public function hydrate(array $data, AbstractModel $model = null, HydratorInterface $hydrator = null)
221 221
     {
222 222
         $hydrator = $hydrator ?: $this->getHydrator();
223
-        $model    = $model    ?: $this->getModel();
223
+        $model    = $model ?: $this->getModel();
224 224
 
225 225
         return $hydrator->hydrate($data, $model);
226 226
     }
Please login to merge, or discard this patch.
src/SpeckCatalog/Mapper/Builder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@
 block discarded – undo
111 111
                 'INNER'
112 112
             )
113 113
             ->where(array(
114
-                $c_o   . '.builder' => 1,
114
+                $c_o . '.builder' => 1,
115 115
                 $c_p_o . '.product_id' => $productId,
116 116
             ));
117 117
 
Please login to merge, or discard this patch.
src/SpeckCatalog/Mapper/Hydrator/Option.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
         $data['name']           = $model->getName();
14 14
         $data['instruction']    = $model->getInstruction();
15 15
         $data['required']       = ($model->getRequired()) ? 1 : 0;
16
-        $data['builder']        = ($model->getBuilder())  ? 1 : 0;
16
+        $data['builder']        = ($model->getBuilder()) ? 1 : 0;
17 17
         $data['option_type_id'] = $model->getOptionTypeId();
18 18
 
19 19
         return $data;
Please login to merge, or discard this patch.
src/SpeckCatalog/Model/Availability/Relational.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
 
54 54
     public function __toString()
55 55
     {
56
-        $string = $this->has('distributor') ? $this->getDistributor()->getName(): '___' ;
56
+        $string = $this->has('distributor') ? $this->getDistributor()->getName() : '___';
57 57
         return $string;
58 58
     }
59 59
 }
Please login to merge, or discard this patch.