Passed
Push — master ( b80f78...585cc6 )
by Anthony
02:51
created
Repository/NavigationRepository.php 1 patch
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -7,38 +7,38 @@
 block discarded – undo
7 7
 
8 8
 class NavigationRepository extends EntityRepository
9 9
 {
10
-    /**
11
-     * function that return all navigation links of pages and modules
12
-     * @return array
13
-     * @throws DBALException
14
-     */
15
-    public function findAllNavigation(): array
16
-    {
17
-        $query = $this->getEntityManager()->getConnection()->prepare("SELECT p.url, p.title, p.title_tag FROM navigation n
10
+				/**
11
+				 * function that return all navigation links of pages and modules
12
+				 * @return array
13
+				 * @throws DBALException
14
+				 */
15
+				public function findAllNavigation(): array
16
+				{
17
+								$query = $this->getEntityManager()->getConnection()->prepare("SELECT p.url, p.title, p.title_tag FROM navigation n
18 18
 			LEFT JOIN page p ON n.id_page = p.id AND p.displayed = 1
19 19
 			LEFT JOIN module m ON n.id_module = m.id AND m.displayed = 1
20 20
 		  	ORDER BY n.order ASC
21 21
  		");
22 22
 
23
-        $query->execute();
23
+								$query->execute();
24 24
 
25
-        return $query->fetchAll(\PDO::FETCH_ASSOC);
26
-    }
25
+								return $query->fetchAll(\PDO::FETCH_ASSOC);
26
+				}
27 27
 
28
-    /**
29
-     * function that return all navigation links of pages
30
-     * @return array
31
-     * @throws DBALException
32
-     */
33
-    public function findAllNavigationPage(): array
34
-    {
35
-        $query = $this->getEntityManager()->getConnection()->prepare("SELECT p.url, p.title, p.title_tag FROM navigation n
28
+				/**
29
+				 * function that return all navigation links of pages
30
+				 * @return array
31
+				 * @throws DBALException
32
+				 */
33
+				public function findAllNavigationPage(): array
34
+				{
35
+								$query = $this->getEntityManager()->getConnection()->prepare("SELECT p.url, p.title, p.title_tag FROM navigation n
36 36
 			INNER JOIN page p ON n.id_page = p.id AND p.displayed = 1
37 37
 		  	ORDER BY n.order ASC
38 38
  		");
39 39
 
40
-        $query->execute();
40
+								$query->execute();
41 41
 
42
-        return $query->fetchAll(\PDO::FETCH_ASSOC);
43
-    }
42
+								return $query->fetchAll(\PDO::FETCH_ASSOC);
43
+				}
44 44
 }
Please login to merge, or discard this patch.
Repository/AccessRightRepository.php 1 patch
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -8,33 +8,33 @@
 block discarded – undo
8 8
 
9 9
 class AccessRightRepository extends EntityRepository
10 10
 {
11
-    /**
12
-     * function that delete all user which are in a list of rights
13
-     * @param AccessRight $access_right
14
-     * @throws DBALException
15
-     */
16
-    public function deleteAllUsersList(AccessRight $access_right)
17
-    {
18
-        $query = $this->getEntityManager()->getConnection()->prepare("UPDATE user SET id_access_right = NULL WHERE
11
+				/**
12
+				 * function that delete all user which are in a list of rights
13
+				 * @param AccessRight $access_right
14
+				 * @throws DBALException
15
+				 */
16
+				public function deleteAllUsersList(AccessRight $access_right)
17
+				{
18
+								$query = $this->getEntityManager()->getConnection()->prepare("UPDATE user SET id_access_right = NULL WHERE
19 19
  			id_access_right = :id_access_right
20 20
  		");
21
-        $query->bindValue("id_access_right", $access_right->getId());
22
-        $query->execute();
23
-    }
21
+								$query->bindValue("id_access_right", $access_right->getId());
22
+								$query->execute();
23
+				}
24 24
 
25
-    /**
26
-     * function that add a user in an access right list
27
-     * @param int $access_right_id
28
-     * @param string $guid_admin
29
-     * @throws DBALException
30
-     */
31
-    public function setAccessRightListUser(int $access_right_id, string $guid_admin)
32
-    {
33
-        $query = $this->getEntityManager()->getConnection()->prepare("UPDATE user SET id_access_right = :id_access_right WHERE
25
+				/**
26
+				 * function that add a user in an access right list
27
+				 * @param int $access_right_id
28
+				 * @param string $guid_admin
29
+				 * @throws DBALException
30
+				 */
31
+				public function setAccessRightListUser(int $access_right_id, string $guid_admin)
32
+				{
33
+								$query = $this->getEntityManager()->getConnection()->prepare("UPDATE user SET id_access_right = :id_access_right WHERE
34 34
  			guid = :guid_user
35 35
  		");
36
-        $query->bindValue("id_access_right", $access_right_id, \PDO::PARAM_INT);
37
-        $query->bindValue("guid_user", $guid_admin, \PDO::PARAM_STR);
38
-        $query->execute();
39
-    }
36
+								$query->bindValue("id_access_right", $access_right_id, \PDO::PARAM_INT);
37
+								$query->bindValue("guid_user", $guid_admin, \PDO::PARAM_STR);
38
+								$query->execute();
39
+				}
40 40
 }
Please login to merge, or discard this patch.
Entity/AccountToken.php 1 patch
Indentation   +152 added lines, -152 removed lines patch added patch discarded remove patch
@@ -16,156 +16,156 @@
 block discarded – undo
16 16
  */
17 17
 class AccountToken
18 18
 {
19
-    use GuidTrait;
20
-
21
-    /**
22
-     * @ORM\Id
23
-     * @ORM\Column(type="integer")
24
-     * @ORM\GeneratedValue(strategy="AUTO")
25
-     */
26
-    protected $id;
27
-
28
-    /**
29
-     * @ORM\Column(type="string", length=200)
30
-     */
31
-    protected $token;
32
-
33
-    /**
34
-     * @ORM\Column(type="datetime", nullable=true)
35
-     */
36
-    protected $endToken;
37
-
38
-    /**
39
-     * @ORM\Column(type="string", length=200)
40
-     */
41
-    protected $userAgent;
42
-
43
-    /**
44
-     * @ORM\Column(type="string", length=200)
45
-     */
46
-    protected $ip;
47
-
48
-    /**
49
-     * @ORM\ManyToOne(targetEntity="Account", inversedBy="tokens")
50
-     * @ORM\JoinColumn(name="account_id", referencedColumnName="id", nullable=false)
51
-     */
52
-    protected $account;
53
-
54
-    /**
55
-     * @return mixed
56
-     */
57
-    public function getId()
58
-    {
59
-        return $this->id;
60
-    }
61
-
62
-    /**
63
-     * @param mixed $id
64
-     * @return AccountToken
65
-     */
66
-    public function setId($id)
67
-    {
68
-        $this->id = $id;
69
-
70
-        return $this;
71
-    }
72
-
73
-    /**
74
-     * @return mixed
75
-     */
76
-    public function getToken()
77
-    {
78
-        return $this->token;
79
-    }
80
-
81
-    /**
82
-     * @param mixed $token
83
-     * @return AccountToken
84
-     */
85
-    public function setToken($token)
86
-    {
87
-        $this->token = $token;
88
-
89
-        return $this;
90
-    }
91
-
92
-    /**
93
-     * @return mixed
94
-     */
95
-    public function getEndToken()
96
-    {
97
-        return $this->endToken;
98
-    }
99
-
100
-    /**
101
-     * @param mixed $endToken
102
-     * @return AccountToken
103
-     */
104
-    public function setEndToken($endToken)
105
-    {
106
-        $this->endToken = $endToken;
107
-
108
-        return $this;
109
-    }
110
-
111
-    /**
112
-     * @return mixed
113
-     */
114
-    public function getUserAgent()
115
-    {
116
-        return $this->userAgent;
117
-    }
118
-
119
-    /**
120
-     * @param mixed $userAgent
121
-     * @return AccountToken
122
-     */
123
-    public function setUserAgent($userAgent)
124
-    {
125
-        $this->userAgent = $userAgent;
126
-
127
-        return $this;
128
-    }
129
-
130
-    /**
131
-     * @return mixed
132
-     */
133
-    public function getIp()
134
-    {
135
-        return $this->ip;
136
-    }
137
-
138
-    /**
139
-     * @param mixed $ip
140
-     * @return AccountToken
141
-     */
142
-    public function setIp($ip)
143
-    {
144
-        $this->ip = $ip;
145
-
146
-        return $this;
147
-    }
148
-
149
-    /**
150
-     * Set Account entity (many to one).
151
-     *
152
-     * @param Account $account
153
-     * @return AccountToken
154
-     */
155
-    public function setAccount(Account $account = null)
156
-    {
157
-        $this->account = $account;
158
-
159
-        return $this;
160
-    }
161
-
162
-    /**
163
-     * Get Account entity (many to one).
164
-     *
165
-     * @return Account
166
-     */
167
-    public function getAccount()
168
-    {
169
-        return $this->account;
170
-    }
19
+				use GuidTrait;
20
+
21
+				/**
22
+				 * @ORM\Id
23
+				 * @ORM\Column(type="integer")
24
+				 * @ORM\GeneratedValue(strategy="AUTO")
25
+				 */
26
+				protected $id;
27
+
28
+				/**
29
+				 * @ORM\Column(type="string", length=200)
30
+				 */
31
+				protected $token;
32
+
33
+				/**
34
+				 * @ORM\Column(type="datetime", nullable=true)
35
+				 */
36
+				protected $endToken;
37
+
38
+				/**
39
+				 * @ORM\Column(type="string", length=200)
40
+				 */
41
+				protected $userAgent;
42
+
43
+				/**
44
+				 * @ORM\Column(type="string", length=200)
45
+				 */
46
+				protected $ip;
47
+
48
+				/**
49
+				 * @ORM\ManyToOne(targetEntity="Account", inversedBy="tokens")
50
+				 * @ORM\JoinColumn(name="account_id", referencedColumnName="id", nullable=false)
51
+				 */
52
+				protected $account;
53
+
54
+				/**
55
+				 * @return mixed
56
+				 */
57
+				public function getId()
58
+				{
59
+								return $this->id;
60
+				}
61
+
62
+				/**
63
+				 * @param mixed $id
64
+				 * @return AccountToken
65
+				 */
66
+				public function setId($id)
67
+				{
68
+								$this->id = $id;
69
+
70
+								return $this;
71
+				}
72
+
73
+				/**
74
+				 * @return mixed
75
+				 */
76
+				public function getToken()
77
+				{
78
+								return $this->token;
79
+				}
80
+
81
+				/**
82
+				 * @param mixed $token
83
+				 * @return AccountToken
84
+				 */
85
+				public function setToken($token)
86
+				{
87
+								$this->token = $token;
88
+
89
+								return $this;
90
+				}
91
+
92
+				/**
93
+				 * @return mixed
94
+				 */
95
+				public function getEndToken()
96
+				{
97
+								return $this->endToken;
98
+				}
99
+
100
+				/**
101
+				 * @param mixed $endToken
102
+				 * @return AccountToken
103
+				 */
104
+				public function setEndToken($endToken)
105
+				{
106
+								$this->endToken = $endToken;
107
+
108
+								return $this;
109
+				}
110
+
111
+				/**
112
+				 * @return mixed
113
+				 */
114
+				public function getUserAgent()
115
+				{
116
+								return $this->userAgent;
117
+				}
118
+
119
+				/**
120
+				 * @param mixed $userAgent
121
+				 * @return AccountToken
122
+				 */
123
+				public function setUserAgent($userAgent)
124
+				{
125
+								$this->userAgent = $userAgent;
126
+
127
+								return $this;
128
+				}
129
+
130
+				/**
131
+				 * @return mixed
132
+				 */
133
+				public function getIp()
134
+				{
135
+								return $this->ip;
136
+				}
137
+
138
+				/**
139
+				 * @param mixed $ip
140
+				 * @return AccountToken
141
+				 */
142
+				public function setIp($ip)
143
+				{
144
+								$this->ip = $ip;
145
+
146
+								return $this;
147
+				}
148
+
149
+				/**
150
+				 * Set Account entity (many to one).
151
+				 *
152
+				 * @param Account $account
153
+				 * @return AccountToken
154
+				 */
155
+				public function setAccount(Account $account = null)
156
+				{
157
+								$this->account = $account;
158
+
159
+								return $this;
160
+				}
161
+
162
+				/**
163
+				 * Get Account entity (many to one).
164
+				 *
165
+				 * @return Account
166
+				 */
167
+				public function getAccount()
168
+				{
169
+								return $this->account;
170
+				}
171 171
 }
Please login to merge, or discard this patch.