Skip to content

Commit

Permalink
fix: phpcs, phpdoc issues
Browse files Browse the repository at this point in the history
  • Loading branch information
keevan committed Jul 14, 2023
1 parent 70c5082 commit cd876d6
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 deletions.
17 changes: 9 additions & 8 deletions classes/local/step/directory_file_list_trait.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

namespace tool_dataflows\local\step;

use MoodleQuickForm;
use tool_dataflows\helper;

/**
Expand Down Expand Up @@ -171,19 +170,21 @@ public function validate_for_run() {
/**
* Apply various constraints/transforms to the list of files
*
* @param array<string> $filelist
* @param mixed $returnvalue
* @param mixed $offset
* @param mixed $limit
* @param array $filelist
* @param string $returnvalue
* @param string $sort
* @param int $offset
* @param int $limit
* @param bool $includedir
* @param string $path
* @param string $basepath
* @param string $pattern
* @return array Will return true or an array of errors.
*/
public function apply_list_constraints(
array $filelist,
$returnvalue,
string $returnvalue,
string $sort,
$offset,
int $offset,
?int $limit,
bool $includedir,
string $basepath,
Expand Down
4 changes: 2 additions & 2 deletions classes/local/step/sftp_directory_file_list_trait.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ trait sftp_directory_file_list_trait {
public static function form_define_fields(): array {
$fields = array_merge(
self::sftp_form_define_fields('list'),
self::directory_file_list_form_define_fields(),
self::directory_file_list_form_define_fields()
);

return $fields;
Expand Down Expand Up @@ -89,7 +89,7 @@ public function run() {
$config->limit,
isset($config->subdirectories),
$path,
$config->pattern,
$config->pattern
);

return $filelist;
Expand Down
2 changes: 2 additions & 0 deletions classes/local/step/sftp_trait.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ public function form_add_custom_inputs(\MoodleQuickForm &$mform, $behaviour = 'c
* Validate the configuration settings.
*
* @param object $config
* @param string $behaviour
* @return true|\lang_string[] true if valid, an array of errors otherwise
*/
public function validate_config($config, $behaviour = 'copy') {
Expand Down Expand Up @@ -203,6 +204,7 @@ public function validate_config($config, $behaviour = 'copy') {
/**
* Perform any extra validation that is required only for runs.
*
* @param string $behaviour
* @return true|array Will return true or an array of errors.
*/
public function validate_for_run($behaviour = 'copy') {
Expand Down
3 changes: 2 additions & 1 deletion tests/tool_dataflows_sftp_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
*/
class tool_dataflows_sftp_test extends \advanced_testcase {

private array $filelist = [
/** @var array list of realistic file paths to test. */
private $filelist = [
'test.txt',
'test.pdf',
'test.csv',
Expand Down

0 comments on commit cd876d6

Please sign in to comment.