Completed
Push — master ( a821fd...7659ff )
by Khoa
07:38 queued 30s
created
ext/vinabb/web/operators/bbook_chapter_interface.php 1 patch
Indentation   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -14,69 +14,69 @@
 block discarded – undo
14 14
 interface bbook_chapter_interface
15 15
 {
16 16
 	/**
17
-	* Get number of chapters
18
-	*
19
-	* @param int $book_id Book ID
20
-	* @return int
21
-	*/
17
+	 * Get number of chapters
18
+	 *
19
+	 * @param int $book_id Book ID
20
+	 * @return int
21
+	 */
22 22
 	public function count_chapters($book_id = 0);
23 23
 
24 24
 	/**
25
-	* Get all chapters
26
-	*
27
-	* @param int $parent_id Parent ID
28
-	* @return array
29
-	*/
25
+	 * Get all chapters
26
+	 *
27
+	 * @param int $parent_id Parent ID
28
+	 * @return array
29
+	 */
30 30
 	public function get_chapters($parent_id = 0);
31 31
 
32 32
 	/**
33
-	* Add a chapter
34
-	*
35
-	* @param \vinabb\web\entities\bbook_chapter_interface	$entity		Chapter entity
36
-	* @param int											$parent_id	Parent ID
37
-	* @return \vinabb\web\entities\bbook_chapter_interface
38
-	*/
33
+	 * Add a chapter
34
+	 *
35
+	 * @param \vinabb\web\entities\bbook_chapter_interface	$entity		Chapter entity
36
+	 * @param int											$parent_id	Parent ID
37
+	 * @return \vinabb\web\entities\bbook_chapter_interface
38
+	 */
39 39
 	public function add_chapter(\vinabb\web\entities\bbook_chapter_interface $entity, $parent_id = 0);
40 40
 
41 41
 	/**
42
-	* Move a chapter up/down
43
-	*
44
-	* @param int	$id			Chapter ID
45
-	* @param string	$direction	The direction: up|down
46
-	* @param int	$amount		The number of places to move
47
-	* @throws \vinabb\web\exceptions\out_of_bounds
48
-	*/
42
+	 * Move a chapter up/down
43
+	 *
44
+	 * @param int	$id			Chapter ID
45
+	 * @param string	$direction	The direction: up|down
46
+	 * @param int	$amount		The number of places to move
47
+	 * @throws \vinabb\web\exceptions\out_of_bounds
48
+	 */
49 49
 	public function move_chapter($id, $direction = 'up', $amount = 1);
50 50
 
51 51
 	/**
52
-	* Change the parent
53
-	*
54
-	* @param int	$id				Chapter ID
55
-	* @param int	$new_parent_id	New parent ID
56
-	* @throws \vinabb\web\exceptions\out_of_bounds
57
-	*/
52
+	 * Change the parent
53
+	 *
54
+	 * @param int	$id				Chapter ID
55
+	 * @param int	$new_parent_id	New parent ID
56
+	 * @throws \vinabb\web\exceptions\out_of_bounds
57
+	 */
58 58
 	public function change_parent($id, $new_parent_id);
59 59
 
60 60
 	/**
61
-	* Get a chapter's parent chapters (for use in breadcrumbs)
62
-	*
63
-	* @param int $parent_id Parent ID
64
-	* @return array
65
-	*/
61
+	 * Get a chapter's parent chapters (for use in breadcrumbs)
62
+	 *
63
+	 * @param int $parent_id Parent ID
64
+	 * @return array
65
+	 */
66 66
 	public function get_parents($parent_id);
67 67
 
68 68
 	/**
69
-	* Update the view counter
70
-	*
71
-	* @param int $id Chapter ID
72
-	*/
69
+	 * Update the view counter
70
+	 *
71
+	 * @param int $id Chapter ID
72
+	 */
73 73
 	public function increase_views($id);
74 74
 
75 75
 	/**
76
-	* Delete a chapter
77
-	*
78
-	* @param int $id Chapter ID
79
-	* @throws \vinabb\web\exceptions\out_of_bounds
80
-	*/
76
+	 * Delete a chapter
77
+	 *
78
+	 * @param int $id Chapter ID
79
+	 * @throws \vinabb\web\exceptions\out_of_bounds
80
+	 */
81 81
 	public function delete_chapter($id);
82 82
 }
Please login to merge, or discard this patch.
ext/vinabb/web/operators/bbook_chapter.php 2 patches
Indentation   +50 added lines, -50 removed lines patch added patch discarded remove patch
@@ -28,13 +28,13 @@  discard block
 block discarded – undo
28 28
 	protected $table_name;
29 29
 
30 30
 	/**
31
-	* Constructor
32
-	*
33
-	* @param ContainerInterface								$container	Container object
34
-	* @param \vinabb\web\operators\nestedset_bbook_chapters	$nestedset	Nestedset object for tree functionality
35
-	* @param \phpbb\db\driver\driver_interface				$db			Database object
36
-	* @param string											$table_name	Table name
37
-	*/
31
+	 * Constructor
32
+	 *
33
+	 * @param ContainerInterface								$container	Container object
34
+	 * @param \vinabb\web\operators\nestedset_bbook_chapters	$nestedset	Nestedset object for tree functionality
35
+	 * @param \phpbb\db\driver\driver_interface				$db			Database object
36
+	 * @param string											$table_name	Table name
37
+	 */
38 38
 	public function __construct(
39 39
 		ContainerInterface $container,
40 40
 		\phpbb\db\driver\driver_interface $db,
@@ -49,11 +49,11 @@  discard block
 block discarded – undo
49 49
 	}
50 50
 
51 51
 	/**
52
-	* Get number of chapters
53
-	*
54
-	* @param int $book_id Book ID
55
-	* @return int
56
-	*/
52
+	 * Get number of chapters
53
+	 *
54
+	 * @param int $book_id Book ID
55
+	 * @return int
56
+	 */
57 57
 	public function count_chapters($book_id = 0)
58 58
 	{
59 59
 		$sql_where = $book_id ? 'WHERE book_id = ' . (int) $book_id : 'WHERE book_id > 0';
@@ -69,11 +69,11 @@  discard block
 block discarded – undo
69 69
 	}
70 70
 
71 71
 	/**
72
-	* Get all chapters
73
-	*
74
-	* @param int $parent_id Parent ID
75
-	* @return array
76
-	*/
72
+	 * Get all chapters
73
+	 *
74
+	 * @param int $parent_id Parent ID
75
+	 * @return array
76
+	 */
77 77
 	public function get_chapters($parent_id = 0)
78 78
 	{
79 79
 		$entities = [];
@@ -90,12 +90,12 @@  discard block
 block discarded – undo
90 90
 	}
91 91
 
92 92
 	/**
93
-	* Add a chapter
94
-	*
95
-	* @param \vinabb\web\entities\bbook_chapter_interface	$entity		Chapter entity
96
-	* @param int											$parent_id	Parent ID
97
-	* @return \vinabb\web\entities\bbook_chapter_interface
98
-	*/
93
+	 * Add a chapter
94
+	 *
95
+	 * @param \vinabb\web\entities\bbook_chapter_interface	$entity		Chapter entity
96
+	 * @param int											$parent_id	Parent ID
97
+	 * @return \vinabb\web\entities\bbook_chapter_interface
98
+	 */
99 99
 	public function add_chapter(\vinabb\web\entities\bbook_chapter_interface $entity, $parent_id = 0)
100 100
 	{
101 101
 		// Insert the entity to the database
@@ -118,13 +118,13 @@  discard block
 block discarded – undo
118 118
 	}
119 119
 
120 120
 	/**
121
-	* Move a chapter up/down
122
-	*
123
-	* @param int	$id			Chapter ID
124
-	* @param string	$direction	The direction: up|down
125
-	* @param int	$amount		The number of places to move
126
-	* @throws \vinabb\web\exceptions\out_of_bounds
127
-	*/
121
+	 * Move a chapter up/down
122
+	 *
123
+	 * @param int	$id			Chapter ID
124
+	 * @param string	$direction	The direction: up|down
125
+	 * @param int	$amount		The number of places to move
126
+	 * @throws \vinabb\web\exceptions\out_of_bounds
127
+	 */
128 128
 	public function move_chapter($id, $direction = 'up', $amount = 1)
129 129
 	{
130 130
 		$id = (int) $id;
@@ -141,12 +141,12 @@  discard block
 block discarded – undo
141 141
 	}
142 142
 
143 143
 	/**
144
-	* Change the parent
145
-	*
146
-	* @param int	$id				Chapter ID
147
-	* @param int	$new_parent_id	New parent ID
148
-	* @throws \vinabb\web\exceptions\out_of_bounds
149
-	*/
144
+	 * Change the parent
145
+	 *
146
+	 * @param int	$id				Chapter ID
147
+	 * @param int	$new_parent_id	New parent ID
148
+	 * @throws \vinabb\web\exceptions\out_of_bounds
149
+	 */
150 150
 	public function change_parent($id, $new_parent_id)
151 151
 	{
152 152
 		$id = (int) $id;
@@ -164,11 +164,11 @@  discard block
 block discarded – undo
164 164
 	}
165 165
 
166 166
 	/**
167
-	* Get a chapter's parent chapters (for use in breadcrumbs)
168
-	*
169
-	* @param int $parent_id Parent ID
170
-	* @return array
171
-	*/
167
+	 * Get a chapter's parent chapters (for use in breadcrumbs)
168
+	 *
169
+	 * @param int $parent_id Parent ID
170
+	 * @return array
171
+	 */
172 172
 	public function get_parents($parent_id)
173 173
 	{
174 174
 		$entities = [];
@@ -185,10 +185,10 @@  discard block
 block discarded – undo
185 185
 	}
186 186
 
187 187
 	/**
188
-	* Update the view counter
189
-	*
190
-	* @param int $id Chapter ID
191
-	*/
188
+	 * Update the view counter
189
+	 *
190
+	 * @param int $id Chapter ID
191
+	 */
192 192
 	public function increase_views($id)
193 193
 	{
194 194
 		$sql = 'UPDATE ' . $this->table_name . '
@@ -198,11 +198,11 @@  discard block
 block discarded – undo
198 198
 	}
199 199
 
200 200
 	/**
201
-	* Delete a chapter
202
-	*
203
-	* @param int $id Chapter ID
204
-	* @throws \vinabb\web\exceptions\out_of_bounds
205
-	*/
201
+	 * Delete a chapter
202
+	 *
203
+	 * @param int $id Chapter ID
204
+	 * @throws \vinabb\web\exceptions\out_of_bounds
205
+	 */
206 206
 	public function delete_chapter($id)
207 207
 	{
208 208
 		$id = (int) $id;
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,8 +40,7 @@
 block discarded – undo
40 40
 		\phpbb\db\driver\driver_interface $db,
41 41
 		\vinabb\web\operators\nestedset_bbook_chapters $nestedset,
42 42
 		$table_name
43
-	)
44
-	{
43
+	) {
45 44
 		$this->container = $container;
46 45
 		$this->db = $db;
47 46
 		$this->nestedset = $nestedset;
Please login to merge, or discard this patch.