Completed
Push — master ( e14cae...f66773 )
by Aimeos
01:52
created
controller/frontend/src/Controller/Frontend/Subscription/Decorator/Base.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -133,7 +133,7 @@
 block discarded – undo
133 133
 	/**
134 134
 	 * Returns the frontend controller
135 135
 	 *
136
-	 * @return \Aimeos\Controller\Frontend\Subscription\Iface Frontend controller object
136
+	 * @return \Aimeos\Controller\Frontend\Iface Frontend controller object
137 137
 	 */
138 138
 	protected function getController()
139 139
 	{
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -30,13 +30,13 @@  discard block
 block discarded – undo
30 30
 	 * @param \Aimeos\Controller\Frontend\Iface $controller Controller object
31 31
 	 * @param \Aimeos\MShop\Context\Item\Iface $context Context object with required objects
32 32
 	 */
33
-	public function __construct( \Aimeos\Controller\Frontend\Iface $controller, \Aimeos\MShop\Context\Item\Iface $context )
33
+	public function __construct(\Aimeos\Controller\Frontend\Iface $controller, \Aimeos\MShop\Context\Item\Iface $context)
34 34
 	{
35
-		\Aimeos\MW\Common\Base::checkClass( '\\Aimeos\\Controller\\Frontend\\Subscription\\Iface', $controller );
35
+		\Aimeos\MW\Common\Base::checkClass('\\Aimeos\\Controller\\Frontend\\Subscription\\Iface', $controller);
36 36
 
37 37
 		$this->controller = $controller;
38 38
 
39
-		parent::__construct( $context );
39
+		parent::__construct($context);
40 40
 	}
41 41
 
42 42
 
@@ -48,9 +48,9 @@  discard block
 block discarded – undo
48 48
 	 * @return mixed Returns the value of the called method
49 49
 	 * @throws \Aimeos\Controller\Frontend\Exception If method call failed
50 50
 	 */
51
-	public function __call( $name, array $param )
51
+	public function __call($name, array $param)
52 52
 	{
53
-		return @call_user_func_array( array( $this->controller, $name ), $param );
53
+		return @call_user_func_array(array($this->controller, $name), $param);
54 54
 	}
55 55
 
56 56
 
@@ -60,9 +60,9 @@  discard block
 block discarded – undo
60 60
 	 * @param string $id Unique subscription ID
61 61
 	 * @return \Aimeos\MShop\Subscription\Item\Iface Canceled subscription item
62 62
 	 */
63
-	public function cancel( $id )
63
+	public function cancel($id)
64 64
 	{
65
-		return $this->controller->cancel( $id );
65
+		return $this->controller->cancel($id);
66 66
 	}
67 67
 
68 68
 
@@ -94,9 +94,9 @@  discard block
 block discarded – undo
94 94
 	 * @param string $id Unique subscription ID
95 95
 	 * @return \Aimeos\MShop\Subscription\Item\Iface Subscription object
96 96
 	 */
97
-	public function getItem( $id )
97
+	public function getItem($id)
98 98
 	{
99
-		return $this->controller->getItem( $id );
99
+		return $this->controller->getItem($id);
100 100
 	}
101 101
 
102 102
 
@@ -106,9 +106,9 @@  discard block
 block discarded – undo
106 106
 	 * @param \Aimeos\MShop\Subscription\Item\Iface $item Subscription object
107 107
 	 * @return \Aimeos\MShop\Subscription\Item\Iface Saved subscription item
108 108
 	 */
109
-	public function saveItem( \Aimeos\MShop\Subscription\Item\Iface $item )
109
+	public function saveItem(\Aimeos\MShop\Subscription\Item\Iface $item)
110 110
 	{
111
-		return $this->controller->saveItem( $item );
111
+		return $this->controller->saveItem($item);
112 112
 	}
113 113
 
114 114
 
@@ -119,9 +119,9 @@  discard block
 block discarded – undo
119 119
 	 * @param integer &$total|null Variable that will contain the total number of available items
120 120
 	 * @return \Aimeos\MShop\Subscription\Item\Iface[] Associative list of IDs as keys and subscription objects as values
121 121
 	 */
122
-	public function searchItems( \Aimeos\MW\Criteria\Iface $filter, &$total = null )
122
+	public function searchItems(\Aimeos\MW\Criteria\Iface $filter, &$total = null)
123 123
 	{
124
-		return $this->controller->searchItems( $filter, $total );
124
+		return $this->controller->searchItems($filter, $total);
125 125
 	}
126 126
 
127 127
 
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Subscription/Iface.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 	 * @param string $id Unique subscription ID
26 26
 	 * @return \Aimeos\MShop\Subscription\Item\Iface Canceled subscription item
27 27
 	 */
28
-	public function cancel( $id );
28
+	public function cancel($id);
29 29
 
30 30
 	/**
31 31
 	 * Returns the filter for searching items
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 	 * @param string $id Unique subscription ID
48 48
 	 * @return \Aimeos\MShop\Subscription\Item\Iface Subscription object
49 49
 	 */
50
-	public function getItem( $id );
50
+	public function getItem($id);
51 51
 
52 52
 	/**
53 53
 	 * Saves the modified subscription item
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 	 * @param \Aimeos\MShop\Subscription\Item\Iface $item Subscription object
56 56
 	 * @return \Aimeos\MShop\Subscription\Item\Iface Saved subscription item
57 57
 	 */
58
-	public function saveItem( \Aimeos\MShop\Subscription\Item\Iface $item );
58
+	public function saveItem(\Aimeos\MShop\Subscription\Item\Iface $item);
59 59
 
60 60
 	/**
61 61
 	 * Returns the subscription items based on the given filter that belong to the current user
@@ -64,5 +64,5 @@  discard block
 block discarded – undo
64 64
 	 * @param integer &$total|null Variable that will contain the total number of available items
65 65
 	 * @return \Aimeos\MShop\Subscription\Item\Iface[] Associative list of IDs as keys and subscription objects as values
66 66
 	 */
67
-	public function searchItems( \Aimeos\MW\Criteria\Iface $filter, &$total = null );
67
+	public function searchItems(\Aimeos\MW\Criteria\Iface $filter, &$total = null);
68 68
 }
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Subscription/Factory.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 	 * @param string|null $name Name of the controller implementaton (default: "Standard")
29 29
 	 * @return \Aimeos\Controller\Frontend\Subscription\Iface Controller object
30 30
 	 */
31
-	public static function createController( \Aimeos\MShop\Context\Item\Iface $context, $name = null )
31
+	public static function createController(\Aimeos\MShop\Context\Item\Iface $context, $name = null)
32 32
 	{
33 33
 		/** controller/frontend/subscription/name
34 34
 		 * Class name of the used subscription frontend controller implementation
@@ -63,19 +63,19 @@  discard block
 block discarded – undo
63 63
 		 * @since 2018.04
64 64
 		 * @category Developer
65 65
 		 */
66
-		if( $name === null ) {
67
-			$name = $context->getConfig()->get( 'controller/frontend/subscription/name', 'Standard' );
66
+		if ($name === null) {
67
+			$name = $context->getConfig()->get('controller/frontend/subscription/name', 'Standard');
68 68
 		}
69 69
 
70
-		if( ctype_alnum( $name ) === false ) {
71
-			$classname = is_string( $name ) ? '\\Aimeos\\Controller\\Frontend\\Subscription\\' . $name : '<not a string>';
72
-			throw new \Aimeos\Controller\Frontend\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) );
70
+		if (ctype_alnum($name) === false) {
71
+			$classname = is_string($name) ? '\\Aimeos\\Controller\\Frontend\\Subscription\\' . $name : '<not a string>';
72
+			throw new \Aimeos\Controller\Frontend\Exception(sprintf('Invalid characters in class name "%1$s"', $classname));
73 73
 		}
74 74
 
75 75
 		$iface = '\\Aimeos\\Controller\\Frontend\\Subscription\\Iface';
76 76
 		$classname = '\\Aimeos\\Controller\\Frontend\\Subscription\\' . $name;
77 77
 
78
-		$manager = self::createControllerBase( $context, $classname, $iface );
78
+		$manager = self::createControllerBase($context, $classname, $iface);
79 79
 
80 80
 		/** controller/frontend/subscription/decorators/excludes
81 81
 		 * Excludes decorators added by the "common" option from the subscription frontend controllers
@@ -151,6 +151,6 @@  discard block
 block discarded – undo
151 151
 		 * @see controller/frontend/subscription/decorators/excludes
152 152
 		 * @see controller/frontend/subscription/decorators/global
153 153
 		 */
154
-		return self::addControllerDecorators( $context, $manager, 'subscription' );
154
+		return self::addControllerDecorators($context, $manager, 'subscription');
155 155
 	}
156 156
 }
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Supplier/Decorator/Base.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@
 block discarded – undo
118 118
 	/**
119 119
 	 * Returns the frontend controller
120 120
 	 *
121
-	 * @return \Aimeos\Controller\Frontend\Supplier\Iface Frontend controller object
121
+	 * @return \Aimeos\Controller\Frontend\Iface Frontend controller object
122 122
 	 */
123 123
 	protected function getController()
124 124
 	{
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -30,13 +30,13 @@  discard block
 block discarded – undo
30 30
 	 * @param \Aimeos\Controller\Frontend\Iface $controller Controller object
31 31
 	 * @param \Aimeos\MShop\Context\Item\Iface $context Context object with required objects
32 32
 	 */
33
-	public function __construct( \Aimeos\Controller\Frontend\Iface $controller, \Aimeos\MShop\Context\Item\Iface $context )
33
+	public function __construct(\Aimeos\Controller\Frontend\Iface $controller, \Aimeos\MShop\Context\Item\Iface $context)
34 34
 	{
35
-		\Aimeos\MW\Common\Base::checkClass( '\\Aimeos\\Controller\\Frontend\\Supplier\\Iface', $controller );
35
+		\Aimeos\MW\Common\Base::checkClass('\\Aimeos\\Controller\\Frontend\\Supplier\\Iface', $controller);
36 36
 
37 37
 		$this->controller = $controller;
38 38
 
39
-		parent::__construct( $context );
39
+		parent::__construct($context);
40 40
 	}
41 41
 
42 42
 
@@ -48,9 +48,9 @@  discard block
 block discarded – undo
48 48
 	 * @return mixed Returns the value of the called method
49 49
 	 * @throws \Aimeos\Controller\Frontend\Exception If method call failed
50 50
 	 */
51
-	public function __call( $name, array $param )
51
+	public function __call($name, array $param)
52 52
 	{
53
-		return @call_user_func_array( array( $this->controller, $name ), $param );
53
+		return @call_user_func_array(array($this->controller, $name), $param);
54 54
 	}
55 55
 
56 56
 
@@ -75,9 +75,9 @@  discard block
 block discarded – undo
75 75
 	 * @return \Aimeos\MShop\Supplier\Item\Iface Supplier item including the referenced domains items
76 76
 	 * @since 2018.07
77 77
 	 */
78
-	public function getItem( $id, array $domains = array( 'media', 'text' ) )
78
+	public function getItem($id, array $domains = array('media', 'text'))
79 79
 	{
80
-		return $this->controller->getItem( $id, $domains );
80
+		return $this->controller->getItem($id, $domains);
81 81
 	}
82 82
 
83 83
 
@@ -89,9 +89,9 @@  discard block
 block discarded – undo
89 89
 	 * @return \Aimeos\MShop\Supplier\Item\Iface[] Associative list of supplier item including the referenced domains items
90 90
 	 * @since 2018.07
91 91
 	 */
92
-	public function getItems( array $ids, array $domains = array( 'media', 'text' ) )
92
+	public function getItems(array $ids, array $domains = array('media', 'text'))
93 93
 	{
94
-		return $this->controller->getItems( $ids, $domains );
94
+		return $this->controller->getItems($ids, $domains);
95 95
 	}
96 96
 
97 97
 
@@ -104,9 +104,9 @@  discard block
 block discarded – undo
104 104
 	 * @return array Ordered list of supplier items implementing \Aimeos\MShop\Supplier\Item\Iface
105 105
 	 * @since 2018.07
106 106
 	 */
107
-	public function searchItems( \Aimeos\MW\Criteria\Iface $filter, array $domains = array( 'media', 'text' ), &$total = null )
107
+	public function searchItems(\Aimeos\MW\Criteria\Iface $filter, array $domains = array('media', 'text'), &$total = null)
108 108
 	{
109
-		return $this->controller->searchItems( $filter, $domains, $total );
109
+		return $this->controller->searchItems($filter, $domains, $total);
110 110
 	}
111 111
 
112 112
 
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Supplier/Factory.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 	 * @param string|null $name Name of the controller implementaton (default: "Standard")
29 29
 	 * @return \Aimeos\Controller\Frontend\Supplier\Iface Controller object
30 30
 	 */
31
-	public static function createController( \Aimeos\MShop\Context\Item\Iface $context, $name = null )
31
+	public static function createController(\Aimeos\MShop\Context\Item\Iface $context, $name = null)
32 32
 	{
33 33
 		/** controller/frontend/supplier/name
34 34
 		 * Class name of the used supplier frontend controller implementation
@@ -63,20 +63,20 @@  discard block
 block discarded – undo
63 63
 		 * @since 2018.07
64 64
 		 * @category Developer
65 65
 		 */
66
-		if( $name === null ) {
67
-			$name = $context->getConfig()->get( 'controller/frontend/supplier/name', 'Standard' );
66
+		if ($name === null) {
67
+			$name = $context->getConfig()->get('controller/frontend/supplier/name', 'Standard');
68 68
 		}
69 69
 
70
-		if( ctype_alnum( $name ) === false )
70
+		if (ctype_alnum($name) === false)
71 71
 		{
72
-			$classname = is_string( $name ) ? '\\Aimeos\\Controller\\Frontend\\Supplier\\' . $name : '<not a string>';
73
-			throw new \Aimeos\Controller\Frontend\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) );
72
+			$classname = is_string($name) ? '\\Aimeos\\Controller\\Frontend\\Supplier\\' . $name : '<not a string>';
73
+			throw new \Aimeos\Controller\Frontend\Exception(sprintf('Invalid characters in class name "%1$s"', $classname));
74 74
 		}
75 75
 
76 76
 		$iface = '\\Aimeos\\Controller\\Frontend\\Supplier\\Iface';
77 77
 		$classname = '\\Aimeos\\Controller\\Frontend\\Supplier\\' . $name;
78 78
 
79
-		$manager = self::createControllerBase( $context, $classname, $iface );
79
+		$manager = self::createControllerBase($context, $classname, $iface);
80 80
 
81 81
 		/** controller/frontend/supplier/decorators/excludes
82 82
 		 * Excludes decorators added by the "common" option from the supplier frontend controllers
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 		 * @see controller/frontend/supplier/decorators/excludes
153 153
 		 * @see controller/frontend/supplier/decorators/global
154 154
 		 */
155
-		return self::addControllerDecorators( $context, $manager, 'supplier' );
155
+		return self::addControllerDecorators($context, $manager, 'supplier');
156 156
 	}
157 157
 
158 158
 }
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Supplier/Standard.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 	 */
31 31
 	public function createFilter()
32 32
 	{
33
-		return \Aimeos\MShop\Factory::createManager( $this->getContext(), 'supplier' )->createSearch( true );
33
+		return \Aimeos\MShop\Factory::createManager($this->getContext(), 'supplier')->createSearch(true);
34 34
 	}
35 35
 
36 36
 
@@ -42,9 +42,9 @@  discard block
 block discarded – undo
42 42
 	 * @return \Aimeos\MShop\Supplier\Item\Iface Supplier item including the referenced domains items
43 43
 	 * @since 2018.07
44 44
 	 */
45
-	public function getItem( $id, array $domains = array( 'media', 'text' ) )
45
+	public function getItem($id, array $domains = array('media', 'text'))
46 46
 	{
47
-		return \Aimeos\MShop\Factory::createManager( $this->getContext(), 'supplier' )->getItem( $id, $domains, true );
47
+		return \Aimeos\MShop\Factory::createManager($this->getContext(), 'supplier')->getItem($id, $domains, true);
48 48
 	}
49 49
 
50 50
 
@@ -56,18 +56,18 @@  discard block
 block discarded – undo
56 56
 	 * @return \Aimeos\MShop\Supplier\Item\Iface[] Associative list of supplier item including the referenced domains items
57 57
 	 * @since 2018.07
58 58
 	 */
59
-	public function getItems( array $ids, array $domains = array( 'media', 'text' ) )
59
+	public function getItems(array $ids, array $domains = array('media', 'text'))
60 60
 	{
61
-		$manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'supplier' );
61
+		$manager = \Aimeos\MShop\Factory::createManager($this->getContext(), 'supplier');
62 62
 
63
-		$filter = $manager->createSearch( true );
63
+		$filter = $manager->createSearch(true);
64 64
 		$expr = [
65
-			$filter->compare( '==', 'supplier.id', $ids ),
65
+			$filter->compare('==', 'supplier.id', $ids),
66 66
 			$filter->getConditions(),
67 67
 		];
68
-		$filter->setConditions( $filter->combine( '&&', $expr ) );
68
+		$filter->setConditions($filter->combine('&&', $expr));
69 69
 
70
-		return $manager->searchItems( $filter, $domains );
70
+		return $manager->searchItems($filter, $domains);
71 71
 	}
72 72
 
73 73
 
@@ -80,8 +80,8 @@  discard block
 block discarded – undo
80 80
 	 * @return array Ordered list of supplier items implementing \Aimeos\MShop\Supplier\Item\Iface
81 81
 	 * @since 2018.07
82 82
 	 */
83
-	public function searchItems( \Aimeos\MW\Criteria\Iface $filter, array $domains = array( 'media', 'text' ), &$total = null )
83
+	public function searchItems(\Aimeos\MW\Criteria\Iface $filter, array $domains = array('media', 'text'), &$total = null)
84 84
 	{
85
-		return \Aimeos\MShop\Factory::createManager( $this->getContext(), 'supplier' )->searchItems( $filter, $domains, $total );
85
+		return \Aimeos\MShop\Factory::createManager($this->getContext(), 'supplier')->searchItems($filter, $domains, $total);
86 86
 	}
87 87
 }
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Supplier/Iface.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 	 * @return \Aimeos\MShop\Supplier\Item\Iface Supplier item including the referenced domains items
37 37
 	 * @since 2018.07
38 38
 	 */
39
-	public function getItem( $id, array $domains = array( 'media', 'text' ) );
39
+	public function getItem($id, array $domains = array('media', 'text'));
40 40
 
41 41
 
42 42
 	/**
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 	 * @return \Aimeos\MShop\Supplier\Item\Iface[] Associative list of supplier item including the referenced domains items
48 48
 	 * @since 2018.07
49 49
 	 */
50
-	public function getItems( array $ids, array $domains = array( 'media', 'text' ) );
50
+	public function getItems(array $ids, array $domains = array('media', 'text'));
51 51
 
52 52
 
53 53
 	/**
@@ -59,5 +59,5 @@  discard block
 block discarded – undo
59 59
 	 * @return array Ordered list of supplier items implementing \Aimeos\MShop\Supplier\Item\Iface
60 60
 	 * @since 2018.07
61 61
 	 */
62
-	public function searchItems( \Aimeos\MW\Criteria\Iface $filter, array $domains = array( 'media', 'text' ), &$total = null );
62
+	public function searchItems(\Aimeos\MW\Criteria\Iface $filter, array $domains = array('media', 'text'), &$total = null);
63 63
 }
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Stock/Standard.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -29,13 +29,13 @@  discard block
 block discarded – undo
29 29
 	 * @return \Aimeos\MW\Criteria\Iface Criteria object containing the conditions for searching
30 30
 	 * @since 2017.03
31 31
 	 */
32
-	public function addFilterCodes( \Aimeos\MW\Criteria\Iface $filter, array $codes )
32
+	public function addFilterCodes(\Aimeos\MW\Criteria\Iface $filter, array $codes)
33 33
 	{
34 34
 		$expr = [
35
-			$filter->compare( '==', 'stock.productcode', $codes ),
35
+			$filter->compare('==', 'stock.productcode', $codes),
36 36
 			$filter->getConditions(),
37 37
 		];
38
-		$filter->setConditions( $filter->combine( '&&', $expr ) );
38
+		$filter->setConditions($filter->combine('&&', $expr));
39 39
 
40 40
 		return $filter;
41 41
 	}
@@ -49,15 +49,15 @@  discard block
 block discarded – undo
49 49
 	 * @return \Aimeos\MW\Criteria\Iface Criteria object containing the conditions for searching
50 50
 	 * @since 2017.03
51 51
 	 */
52
-	public function addFilterTypes( \Aimeos\MW\Criteria\Iface $filter, array $codes )
52
+	public function addFilterTypes(\Aimeos\MW\Criteria\Iface $filter, array $codes)
53 53
 	{
54
-		if( !empty( $codes ) )
54
+		if (!empty($codes))
55 55
 		{
56 56
 			$expr = [
57
-				$filter->compare( '==', 'stock.type.code', $codes ),
57
+				$filter->compare('==', 'stock.type.code', $codes),
58 58
 				$filter->getConditions(),
59 59
 			];
60
-			$filter->setConditions( $filter->combine( '&&', $expr ) );
60
+			$filter->setConditions($filter->combine('&&', $expr));
61 61
 		}
62 62
 
63 63
 		return $filter;
@@ -73,10 +73,10 @@  discard block
 block discarded – undo
73 73
 	 */
74 74
 	public function createFilter()
75 75
 	{
76
-		$manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'stock' );
77
-		$search = $manager->createSearch( true );
76
+		$manager = \Aimeos\MShop\Factory::createManager($this->getContext(), 'stock');
77
+		$search = $manager->createSearch(true);
78 78
 
79
-		return $search->setSortations( [$search->sort( '+', 'stock.type.position' )] );
79
+		return $search->setSortations([$search->sort('+', 'stock.type.position')]);
80 80
 	}
81 81
 
82 82
 
@@ -87,9 +87,9 @@  discard block
 block discarded – undo
87 87
 	 * @return \Aimeos\MShop\Stock\Item\Iface Stock item including the referenced domains items
88 88
 	 * @since 2017.03
89 89
 	 */
90
-	public function getItem( $id )
90
+	public function getItem($id)
91 91
 	{
92
-		return \Aimeos\MShop\Factory::createManager( $this->getContext(), 'stock' )->getItem( $id, [], true );
92
+		return \Aimeos\MShop\Factory::createManager($this->getContext(), 'stock')->getItem($id, [], true);
93 93
 	}
94 94
 
95 95
 
@@ -101,8 +101,8 @@  discard block
 block discarded – undo
101 101
 	 * @return array Ordered list of stock items implementing \Aimeos\MShop\Stock\Item\Iface
102 102
 	 * @since 2017.03
103 103
 	 */
104
-	public function searchItems( \Aimeos\MW\Criteria\Iface $filter, &$total = null )
104
+	public function searchItems(\Aimeos\MW\Criteria\Iface $filter, &$total = null)
105 105
 	{
106
-		return \Aimeos\MShop\Factory::createManager( $this->getContext(), 'stock' )->searchItems( $filter, [], $total );
106
+		return \Aimeos\MShop\Factory::createManager($this->getContext(), 'stock')->searchItems($filter, [], $total);
107 107
 	}
108 108
 }
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Service/Standard.php 1 patch
Spacing   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -35,14 +35,14 @@  discard block
 block discarded – undo
35 35
 	 * @param string[] $attributes List of attribute codes as keys and strings entered by the customer as value
36 36
 	 * @return string[] List of attributes codes as keys and error messages as values for invalid or missing values
37 37
 	 */
38
-	public function checkAttributes( $serviceId, array $attributes )
38
+	public function checkAttributes($serviceId, array $attributes)
39 39
 	{
40
-		$manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'service' );
40
+		$manager = \Aimeos\MShop\Factory::createManager($this->getContext(), 'service');
41 41
 
42
-		$item = $manager->getItem( $serviceId, [], true );
43
-		$provider = $manager->getProvider( $item, $item->getType() );
42
+		$item = $manager->getItem($serviceId, [], true);
43
+		$provider = $manager->getProvider($item, $item->getType());
44 44
 
45
-		return array_filter( $provider->checkConfigFE( $attributes ) );
45
+		return array_filter($provider->checkConfigFE($attributes));
46 46
 	}
47 47
 
48 48
 
@@ -53,12 +53,12 @@  discard block
 block discarded – undo
53 53
 	 * @param string[] $ref List of domain names whose items should be fetched too
54 54
 	 * @return \Aimeos\MShop\Service\Provider\Iface Service provider object
55 55
 	 */
56
-	public function getProvider( $serviceId, $ref = ['media', 'price', 'text'] )
56
+	public function getProvider($serviceId, $ref = ['media', 'price', 'text'])
57 57
 	{
58
-		$manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'service' );
59
-		$item = $manager->getItem( $serviceId, $ref, true );
58
+		$manager = \Aimeos\MShop\Factory::createManager($this->getContext(), 'service');
59
+		$item = $manager->getItem($serviceId, $ref, true);
60 60
 
61
-		return $manager->getProvider( $item, $item->getType() );
61
+		return $manager->getProvider($item, $item->getType());
62 62
 	}
63 63
 
64 64
 
@@ -69,26 +69,26 @@  discard block
 block discarded – undo
69 69
 	 * @param string[] $ref List of domain names whose items should be fetched too
70 70
 	 * @return \Aimeos\MShop\Service\Provider\Iface[] List of service IDs as keys and service provider objects as values
71 71
 	 */
72
-	public function getProviders( $type = null, $ref = ['media', 'price', 'text'] )
72
+	public function getProviders($type = null, $ref = ['media', 'price', 'text'])
73 73
 	{
74 74
 		$list = [];
75
-		$manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'service' );
75
+		$manager = \Aimeos\MShop\Factory::createManager($this->getContext(), 'service');
76 76
 
77
-		$search = $manager->createSearch( true );
78
-		$search->setSortations( [$search->sort( '+', 'service.type.position' ), $search->sort( '+', 'service.position' )] );
77
+		$search = $manager->createSearch(true);
78
+		$search->setSortations([$search->sort('+', 'service.type.position'), $search->sort('+', 'service.position')]);
79 79
 
80
-		if( $type != null )
80
+		if ($type != null)
81 81
 		{
82 82
 			$expr = array(
83 83
 				$search->getConditions(),
84
-				$search->compare( '==', 'service.type.code', $type ),
85
-				$search->compare( '==', 'service.type.domain', 'service' ),
84
+				$search->compare('==', 'service.type.code', $type),
85
+				$search->compare('==', 'service.type.domain', 'service'),
86 86
 			);
87
-			$search->setConditions( $search->combine( '&&', $expr ) );
87
+			$search->setConditions($search->combine('&&', $expr));
88 88
 		}
89 89
 
90
-		foreach( $manager->searchItems( $search, $ref ) as $id => $item ) {
91
-			$list[$id] = $manager->getProvider( $item, $item->getType() );
90
+		foreach ($manager->searchItems($search, $ref) as $id => $item) {
91
+			$list[$id] = $manager->getProvider($item, $item->getType());
92 92
 		}
93 93
 
94 94
 		return $list;
@@ -106,15 +106,15 @@  discard block
 block discarded – undo
106 106
 	 * @return \Aimeos\MShop\Common\Item\Helper\Form\Iface|null Form object with URL, parameters, etc.
107 107
 	 * 	or null if no form data is required
108 108
 	 */
109
-	public function process( \Aimeos\MShop\Order\Item\Iface $orderItem, $serviceId, array $urls, array $params )
109
+	public function process(\Aimeos\MShop\Order\Item\Iface $orderItem, $serviceId, array $urls, array $params)
110 110
 	{
111
-		$manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'service' );
112
-		$item = $manager->getItem( $serviceId, [], true );
111
+		$manager = \Aimeos\MShop\Factory::createManager($this->getContext(), 'service');
112
+		$item = $manager->getItem($serviceId, [], true);
113 113
 
114
-		$provider = $manager->getProvider( $item, $item->getType() );
115
-		$provider->injectGlobalConfigBE( $urls );
114
+		$provider = $manager->getProvider($item, $item->getType());
115
+		$provider->injectGlobalConfigBE($urls);
116 116
 
117
-		return $provider->process( $orderItem, $params );
117
+		return $provider->process($orderItem, $params);
118 118
 	}
119 119
 
120 120
 
@@ -126,14 +126,14 @@  discard block
 block discarded – undo
126 126
 	 * @param string $code Unique code of the service used for the current order
127 127
 	 * @return \Psr\Http\Message\ResponseInterface Response object
128 128
 	 */
129
-	public function updatePush( ServerRequestInterface $request, ResponseInterface $response, $code )
129
+	public function updatePush(ServerRequestInterface $request, ResponseInterface $response, $code)
130 130
 	{
131
-		$manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'service' );
132
-		$item = $manager->findItem( $code );
131
+		$manager = \Aimeos\MShop\Factory::createManager($this->getContext(), 'service');
132
+		$item = $manager->findItem($code);
133 133
 
134
-		$provider = $manager->getProvider( $item, $item->getType() );
134
+		$provider = $manager->getProvider($item, $item->getType());
135 135
 
136
-		return $provider->updatePush( $request, $response );
136
+		return $provider->updatePush($request, $response);
137 137
 	}
138 138
 
139 139
 
@@ -145,24 +145,24 @@  discard block
 block discarded – undo
145 145
 	 * @param string $orderid ID of the order whose payment status should be updated
146 146
 	 * @return \Aimeos\MShop\Order\Item\Iface $orderItem Order item that has been updated
147 147
 	 */
148
-	public function updateSync( ServerRequestInterface $request, $code, $orderid )
148
+	public function updateSync(ServerRequestInterface $request, $code, $orderid)
149 149
 	{
150 150
 		$context = $this->getContext();
151
-		$orderManager = \Aimeos\MShop\Factory::createManager( $context, 'order' );
152
-		$serviceManager = \Aimeos\MShop\Factory::createManager( $context, 'service' );
151
+		$orderManager = \Aimeos\MShop\Factory::createManager($context, 'order');
152
+		$serviceManager = \Aimeos\MShop\Factory::createManager($context, 'service');
153 153
 
154
-		$orderItem = $orderManager->getItem( $orderid );
155
-		$serviceItem = $serviceManager->findItem( $code );
154
+		$orderItem = $orderManager->getItem($orderid);
155
+		$serviceItem = $serviceManager->findItem($code);
156 156
 
157
-		$provider = $serviceManager->getProvider( $serviceItem, $serviceItem->getType() );
157
+		$provider = $serviceManager->getProvider($serviceItem, $serviceItem->getType());
158 158
 
159 159
 
160
-		if( ( $orderItem = $provider->updateSync( $request, $orderItem ) ) !== null )
160
+		if (($orderItem = $provider->updateSync($request, $orderItem)) !== null)
161 161
 		{
162
-			if( $orderItem->getPaymentStatus() === \Aimeos\MShop\Order\Item\Base::PAY_UNFINISHED
163
-				&& $provider->isImplemented( \Aimeos\MShop\Service\Provider\Payment\Base::FEAT_QUERY )
162
+			if ($orderItem->getPaymentStatus() === \Aimeos\MShop\Order\Item\Base::PAY_UNFINISHED
163
+				&& $provider->isImplemented(\Aimeos\MShop\Service\Provider\Payment\Base::FEAT_QUERY)
164 164
 			) {
165
-				$provider->query( $orderItem );
165
+				$provider->query($orderItem);
166 166
 			}
167 167
 		}
168 168
 
Please login to merge, or discard this patch.