From 56aad743360e7685563e0b0ce286dcc32113183d Mon Sep 17 00:00:00 2001 From: StyleCI Bot Date: Wed, 2 Aug 2023 15:43:51 +0000 Subject: [PATCH] Apply fixes from StyleCI --- gatherling/api_lib.php | 10 +++- gatherling/models/Decksearch.php | 2 +- gatherling/models/Event.php | 6 +- gatherling/models/Pagination.php | 94 ++++++++++++++++---------------- gatherling/models/Standings.php | 3 +- 5 files changed, 62 insertions(+), 53 deletions(-) diff --git a/gatherling/api_lib.php b/gatherling/api_lib.php index 18b2e98f..0cfde655 100644 --- a/gatherling/api_lib.php +++ b/gatherling/api_lib.php @@ -67,7 +67,8 @@ function auth() /** * @param string $msg - * @param mixed $extra + * @param mixed $extra + * * @return never */ function error($msg, $extra = null) @@ -84,7 +85,8 @@ function error($msg, $extra = null) /** * @param string $key - * @param mixed $default + * @param mixed $default + * * @return mixed */ function arg($key, $default = null) @@ -196,6 +198,7 @@ function repr_json_deck($deck) /** * @param Gatherling\Series $series + * * @return mixed */ function repr_json_series($series) @@ -291,8 +294,9 @@ function drop_player_from_event($event, $name) /** * @param string $newseries - * @param bool $active + * @param bool $active * @param string $day + * * @return array */ function create_series($newseries, $active, $day) diff --git a/gatherling/models/Decksearch.php b/gatherling/models/Decksearch.php index 1e69b14f..87981a99 100644 --- a/gatherling/models/Decksearch.php +++ b/gatherling/models/Decksearch.php @@ -151,7 +151,7 @@ public function searchByMedals($medal) * * @param [$color_str_input] Array of the input color * - * @return mixed true if success/false otherwise + * @return mixed true if success/false otherwise */ public function searchByColor($color_str_input) { diff --git a/gatherling/models/Event.php b/gatherling/models/Event.php index 43d17931..637cf2b5 100644 --- a/gatherling/models/Event.php +++ b/gatherling/models/Event.php @@ -501,6 +501,7 @@ public function getTrophyImageLink() /** * @param string $name + * * @return bool */ public function isHost($name) @@ -519,6 +520,7 @@ public function isFinalized() /** * @param string $name + * * @return bool */ public function isOrganizer($name) @@ -539,6 +541,7 @@ public function isOrganizer($name) /** * @param string $playername + * * @return bool */ public function authCheck($playername) @@ -555,8 +558,9 @@ public function authCheck($playername) } /** - * @return int * @throws Exception + * + * @return int */ public function getPlayerCount() { diff --git a/gatherling/models/Pagination.php b/gatherling/models/Pagination.php index 1a95530e..828a6ec6 100644 --- a/gatherling/models/Pagination.php +++ b/gatherling/models/Pagination.php @@ -97,7 +97,7 @@ class Pagination * * Initializes the class and the default properties. * - * @return void + * @return void */ public function __construct() { @@ -117,14 +117,14 @@ public function __construct() * $pagination->always_show_navigation(false); * * - * @param bool $show (Optional) If set to FALSE, the "previous page" and "next page" links will only be - * shown if there are more pages than set through {@link selectable_pages()}. + * @param bool $show (Optional) If set to FALSE, the "previous page" and "next page" links will only be + * shown if there are more pages than set through {@link selectable_pages()}. * * Default is TRUE. * * @since 2.0 * - * @return void + * @return void */ public function always_show_navigation($show = true) { @@ -150,14 +150,14 @@ public function always_show_navigation($show = true) * $pagination->avoid_duplicate_content(false); * * - * @param bool $avoid_duplicate_content (Optional) If set to FALSE, the library will have for the first - * page (or last, if you are displaying links in {@link reverse() reverse} - * order) a different path than the one you have when you are accessing - * the page for the first (unpaginated) time. + * @param bool $avoid_duplicate_content (Optional) If set to FALSE, the library will have for the first + * page (or last, if you are displaying links in {@link reverse() reverse} + * order) a different path than the one you have when you are accessing + * the page for the first (unpaginated) time. * * Default is TRUE. * - * @return void + * @return void * * @since 2.0 */ @@ -201,17 +201,17 @@ public function avoid_duplicate_content($avoid_duplicate_content = true) * * If you want to preserve the hash in the URL, make sure you load the zebra_pagination.js file! * - * @param string $base_url (Optional) The base URL to be used when generating the navigation - * links + * @param string $base_url (Optional) The base URL to be used when generating the navigation + * links * * Defaults is whatever returned by * {@link http://www.php.net/manual/en/reserved.variables.server.php $_SERVER['REQUEST_URI']} - * @param bool $preserve_query_string (Optional) Indicates whether values in query strings, other than - * those set in $base_url, should be preserved + * @param bool $preserve_query_string (Optional) Indicates whether values in query strings, other than + * those set in $base_url, should be preserved * * Default is TRUE * - * @return void + * @return void */ public function base_url($base_url = '', $preserve_query_string = true) { @@ -242,7 +242,7 @@ public function base_url($base_url = '', $preserve_query_string = true) * echo $pagination->get_page(); * * - * @return int Returns the current page's number + * @return int Returns the current page's number */ public function get_page() { @@ -318,8 +318,8 @@ public function get_page() * * @since 2.1 * - * @return int Returns the total number of pages, based on the total number of records and the number of - * records to be shown per page. + * @return int Returns the total number of pages, based on the total number of records and the number of + * records to be shown per page. */ public function get_pages() { @@ -335,14 +335,14 @@ public function get_pages() * $pagination->labels('Previous', 'Next'); * * - * @param string $previous (Optional) The label for the "previous page" link. + * @param string $previous (Optional) The label for the "previous page" link. * * Default is "Previous page". - * @param string $next (Optional) The label for the "next page" link. + * @param string $next (Optional) The label for the "next page" link. * * Default is "Next page". * - * @return void + * @return void * * @since 2.0 */ @@ -361,7 +361,7 @@ public function labels($previous = 'Previous page', $next = 'Next page') * $pagination->method('url'); * * - * @param string $method (Optional) The method to be used for page propagation. + * @param string $method (Optional) The method to be used for page propagation. * * Values can be: * @@ -398,8 +398,8 @@ public function method($method = 'get') * These links can also be shown both on the left or on the right of the links to individual pages by setting the * method's argument to "left" or "right" respectively. * - * @param string $position Setting this argument to "left" or "right" will instruct the script to show next/previous - * page links on the left or on the right of the links to individual pages. + * @param string $position Setting this argument to "left" or "right" will instruct the script to show next/previous + * page links on the left or on the right of the links to individual pages. * * Allowed values are "left", "right" and "outside". * @@ -407,7 +407,7 @@ public function method($method = 'get') * * @since 2.1 * - * @return void + * @return void */ public function navigation_position($position) { @@ -425,12 +425,12 @@ public function navigation_position($position) * $pagination->padding(false); * * - * @param bool $enabled (Optional) Setting this property to FALSE will disable padding rather than - * enabling it. + * @param bool $enabled (Optional) Setting this property to FALSE will disable padding rather than + * enabling it. * * Default is TRUE. * - * @return void + * @return void */ public function padding($enabled = true) { @@ -451,9 +451,9 @@ public function padding($enabled = true) * $pagination->records(100); * * - * @param int $records The total number of records that need to be paginated + * @param int $records The total number of records that need to be paginated * - * @return void + * @return void */ public function records($records) { @@ -474,11 +474,11 @@ public function records($records) * $pagination->records_per_page(20); * * - * @param int $records_per_page The number of records displayed on one page. + * @param int $records_per_page The number of records displayed on one page. * * Default is 10. * - * @return void + * @return void */ public function records_per_page($records_per_page) { @@ -498,12 +498,12 @@ public function records_per_page($records_per_page) * $output = $pagination->render(true); * * - * @param bool $return_output (Optional) Setting this argument to TRUE will instruct the script to - * return the generated output rather than outputting it to the screen. + * @param bool $return_output (Optional) Setting this argument to TRUE will instruct the script to + * return the generated output rather than outputting it to the screen. * * Default is FALSE. * - * @return void + * @return void */ public function render($return_output = false) { @@ -579,11 +579,11 @@ public function render($return_output = false) * $pagination->reverse(true); * * - * @param bool $reverse (Optional) Set it to TRUE to generate navigation links in reverse order. + * @param bool $reverse (Optional) Set it to TRUE to generate navigation links in reverse order. * * Default is FALSE. * - * @return void + * @return void * * @since 2.0 */ @@ -601,15 +601,15 @@ public function reverse($reverse = false) * $pagination->selectable_pages(15); * * - * @param int $selectable_pages The number of links to be displayed at once (besides the "previous page" - * and "next page" links). + * @param int $selectable_pages The number of links to be displayed at once (besides the "previous page" + * and "next page" links). * * You should set this to an odd number so that the same number of links * will be shown to the left and to the right of the current page. * * Default is 11. * - * @return void + * @return void */ public function selectable_pages($selectable_pages) { @@ -626,7 +626,7 @@ public function selectable_pages($selectable_pages) * $pagination->set_page(5); * * - * @param int $page The page's number. + * @param int $page The page's number. * * A number lower than 1 will be interpreted as 1, while a number * greater than the total number of pages will be interpreted as the last page. @@ -635,7 +635,7 @@ public function selectable_pages($selectable_pages) * records (set through {@link records()}) and the number of records that are * shown on one page (set through {@link records_per_page()}). * - * @return void + * @return void */ public function set_page($page) { @@ -663,12 +663,12 @@ public function set_page($page) * $pagination->trailing_slash(false); * * - * @param bool $enabled (Optional) Setting this property to FALSE will disable trailing slashes on generated - * URLs when {@link method} is "url". + * @param bool $enabled (Optional) Setting this property to FALSE will disable trailing slashes on generated + * URLs when {@link method} is "url". * * Default is TRUE (trailing slashes are enabled by default). * - * @return void + * @return void */ public function trailing_slash($enabled) { @@ -686,11 +686,11 @@ public function trailing_slash($enabled) * $pagination->variable_name('foo'); * * - * @param string $variable_name A string representing the variable name to be used for page propagation. + * @param string $variable_name A string representing the variable name to be used for page propagation. * * Default is "page". * - * @return void + * @return void */ public function variable_name($variable_name) { @@ -702,7 +702,7 @@ public function variable_name($variable_name) * Generate the link for the page given as argument. * * - * @return void + * @return void */ private function _build_uri($page) { diff --git a/gatherling/models/Standings.php b/gatherling/models/Standings.php index 1c6c439a..d10e7833 100644 --- a/gatherling/models/Standings.php +++ b/gatherling/models/Standings.php @@ -89,7 +89,8 @@ public function save() /** * @param string $eventname - * @param int $isactive + * @param int $isactive + * * @return Standings[] */ public static function getEventStandings($eventname, $isactive)