1 | <?php |
||
11 | class Author extends Base { |
||
12 | const ALL_AUTHORS_ID = "cops:authors"; |
||
13 | |||
14 | const SQL_AUTHORS_BY_FIRST_LETTER = |
||
15 | "select authors.id as id, authors.name as name, authors.sort as sort, count(*) as count |
||
16 | from authors |
||
17 | inner join books_authors_link as link on link.author = authors.id |
||
18 | inner join ({0}) as filter on filter.id = link.book |
||
19 | where upper (authors.sort) like ? |
||
20 | group by authors.id, authors.name, authors.sort |
||
21 | order by sort"; |
||
22 | const SQL_AUTHORS_FOR_SEARCH = |
||
23 | 56 | "select authors.id as id, authors.name as name, authors.sort as sort, count(*) as count |
|
24 | 56 | from authors |
|
25 | 56 | inner join books_authors_link as link on link.author = authors.id |
|
26 | 56 | inner join ({0}) as filter on filter.id = link.book |
|
27 | 56 | where (upper (authors.sort) like ? or upper (authors.name) like ?) |
|
28 | group by authors.id, authors.name, authors.sort |
||
29 | 53 | order by sort"; |
|
30 | 53 | const SQL_ALL_AUTHORS = |
|
31 | "select authors.id as id, authors.name as name, authors.sort as sort, count(*) as count |
||
32 | from authors |
||
33 | 20 | inner join books_authors_link as link on author = authors.id |
|
34 | 20 | inner join ({0}) as filter on filter.id = link.book |
|
35 | group by authors.id, authors.name, authors.sort |
||
36 | order by sort"; |
||
37 | 3 | const SQL_ALL_AUTHORS_FIRST_LETTERS = |
|
38 | 3 | "select substr (upper (sort), 1, 1) as title, count(*) as count |
|
39 | from authors |
||
40 | inner join books_authors_link as link on link.author = authors.id |
||
41 | 7 | inner join ({0}) as filter on filter.id = link.book |
|
42 | group by substr (upper (sort), 1, 1) |
||
43 | 7 | order by substr (upper (sort), 1, 1)"; |
|
44 | |||
45 | public $id; |
||
46 | 2 | public $name; |
|
47 | 2 | public $sort; |
|
48 | |||
49 | public function __construct($post) { |
||
54 | 2 | ||
55 | 2 | public function getUri () { |
|
58 | 2 | ||
59 | public function getEntryId () { |
||
62 | 1 | ||
63 | public static function getEntryIdByLetter ($startingLetter) { |
||
66 | 23 | ||
67 | public static function getCount() { |
||
71 | |||
72 | public static function getAllAuthorsFirstLetters() { |
||
83 | |||
84 | 46 | public static function getAuthorsByStartingLetter($letter) { |
|
87 | 46 | ||
88 | 46 | public static function getAuthorsForSearch($query) { |
|
91 | 46 | ||
92 | 46 | public static function getAllAuthors() { |
|
95 | |||
96 | public static function getEntryArray ($query, $params) { |
||
99 | |||
100 | public static function getAuthorById ($authorId) { |
||
106 | |||
107 | public static function getAuthorByBookId ($bookId) { |
||
118 | } |
||
119 |
This check looks for a call to a parent method whose name is different than the method from which it is called.
Consider the following code:
The
getFirstName()
method in theSon
calls the wrong method in the parent class.