Completed
Push — master ( f07eb7...94d140 )
by Aimeos
01:57
created
lib/custom/src/MShop/Customer/Item/FosUser.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -33,10 +33,10 @@  discard block
 block discarded – undo
33 33
 	 * @param \Aimeos\MShop\Common\Item\Iface[] $refItems List of referenced items
34 34
 	 * @param \Aimeos\MShop\Common\Item\Helper\Password\Iface|null $helper Password encryption helper object
35 35
 	 */
36
-	public function __construct( \Aimeos\MShop\Common\Item\Address\Iface $address, array $values = array(),
37
-		array $listItems = array(), array $refItems = array(), \Aimeos\MShop\Common\Item\Helper\Password\Iface $helper = null )
36
+	public function __construct(\Aimeos\MShop\Common\Item\Address\Iface $address, array $values = array(),
37
+		array $listItems = array(), array $refItems = array(), \Aimeos\MShop\Common\Item\Helper\Password\Iface $helper = null)
38 38
 	{
39
-		parent::__construct( $address, $values, $listItems, $refItems, $helper );
39
+		parent::__construct($address, $values, $listItems, $refItems, $helper);
40 40
 
41 41
 		$this->values = $values;
42 42
 		$this->helper = $helper;
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 	 */
52 52
 	public function getPassword()
53 53
 	{
54
-		if( isset( $this->values['customer.password'] ) ) {
54
+		if (isset($this->values['customer.password'])) {
55 55
 			return (string) $this->values['customer.password'];
56 56
 		}
57 57
 
@@ -65,12 +65,12 @@  discard block
 block discarded – undo
65 65
 	 * @param string $value Password of the customer item
66 66
 	 * @return \Aimeos\MShop\Customer\Item\Iface Customer item for chaining method calls
67 67
 	 */
68
-	public function setPassword( $value )
68
+	public function setPassword($value)
69 69
 	{
70
-		if( $value == $this->getPassword() ) { return $this; }
70
+		if ($value == $this->getPassword()) { return $this; }
71 71
 
72
-		if( $this->helper !== null ) {
73
-			$value = $this->helper->encode( $value, $this->getSalt() );
72
+		if ($this->helper !== null) {
73
+			$value = $this->helper->encode($value, $this->getSalt());
74 74
 		}
75 75
 
76 76
 		$this->values['customer.password'] = (string) $value;
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 	 */
88 88
 	public function getRoles()
89 89
 	{
90
-		if( isset( $this->values['roles'] ) ) {
90
+		if (isset($this->values['roles'])) {
91 91
 			return (array) $this->values['roles'];
92 92
 		}
93 93
 
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 	 *
101 101
 	 * @param array $roles List of Symfony roles
102 102
 	 */
103
-	public function setRoles( array $roles )
103
+	public function setRoles(array $roles)
104 104
 	{
105 105
 		$this->values['roles'] = $roles;
106 106
 		$this->setModified();
@@ -116,8 +116,8 @@  discard block
 block discarded – undo
116 116
 	 */
117 117
 	public function getSalt()
118 118
 	{
119
-		if( !isset( $this->values['salt'] ) ) {
120
-			$this->values['salt'] = sha1( microtime( true ) . getmypid() . mt_rand() );
119
+		if (!isset($this->values['salt'])) {
120
+			$this->values['salt'] = sha1(microtime(true) . getmypid() . mt_rand());
121 121
 		}
122 122
 
123 123
 		return $this->values['salt'];
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 	 *
130 130
 	 * @param string $value Password salt
131 131
 	 */
132
-	public function setSalt( $value )
132
+	public function setSalt($value)
133 133
 	{
134 134
 		$this->values['salt'] = (string) $value;
135 135
 		$this->setModified();
Please login to merge, or discard this patch.