Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Feeds
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Feeds
Commits
dd7299b6
Commit
dd7299b6
authored
3 years ago
by
Andrew Dolgov
Browse files
Options
Downloads
Patches
Plain Diff
deal with a few more phpstan warnings re: base plugin class
parent
55729b4b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
classes/plugin.php
+47
-1
47 additions, 1 deletion
classes/plugin.php
plugins/af_readability/init.php
+1
-0
1 addition, 0 deletions
plugins/af_readability/init.php
with
48 additions
and
1 deletion
classes/plugin.php
+
47
−
1
View file @
dd7299b6
...
...
@@ -226,8 +226,18 @@ abstract class Plugin {
return
""
;
}
/**
* @param DOMDocument $doc
* @param string $site_url
* @param array<string> $allowed_elements
* @param array<string> $disallowed_attributes
* @param int $article_id
* @return DOMDocument
*/
function
hook_sanitize
(
$doc
,
$site_url
,
$allowed_elements
,
$disallowed_attributes
,
$article_id
)
{
user_error
(
"Dummy method invoked."
,
E_USER_ERROR
);
return
$doc
;
}
/**
...
...
@@ -301,8 +311,20 @@ abstract class Plugin {
user_error
(
"Dummy method invoked."
,
E_USER_ERROR
);
}
/**
* @param string $feed_data
* @param string $fetch_url
* @param int $owner_uid
* @param int $feed
* @param int $last_article_timestamp
* @param string $auth_login
* @param string $auth_pass
* @return string (possibly mangled feed data)
*/
function
hook_fetch_feed
(
$feed_data
,
$fetch_url
,
$owner_uid
,
$feed
,
$last_article_timestamp
,
$auth_login
,
$auth_pass
)
{
user_error
(
"Dummy method invoked."
,
E_USER_ERROR
);
return
""
;
}
/**
...
...
@@ -331,8 +353,19 @@ abstract class Plugin {
return
[];
}
function
hook_format_enclosures
(
$rv
,
$result
,
$id
,
$always_display_enclosures
,
$article_content
,
$hide_images
)
{
/**
* @param string $enclosures_formatted
* @param array<int, array<string, mixed>> $enclosures
* @param int $article_id
* @param bool $always_display_enclosures
* @param string $article_content
* @param bool $hide_images
* @return string|array<string,array<int, array<string, mixed>>> ($enclosures_formatted, $enclosures)
*/
function
hook_format_enclosures
(
$enclosures_formatted
,
$enclosures
,
$article_id
,
$always_display_enclosures
,
$article_content
,
$hide_images
)
{
user_error
(
"Dummy method invoked."
,
E_USER_ERROR
);
return
""
;
}
/**
...
...
@@ -344,6 +377,8 @@ abstract class Plugin {
*/
function
hook_subscribe_feed
(
$contents
,
$url
,
$auth_login
,
$auth_pass
)
{
user_error
(
"Dummy method invoked."
,
E_USER_ERROR
);
return
""
;
}
/**
...
...
@@ -366,10 +401,19 @@ abstract class Plugin {
*/
function
hook_render_enclosure
(
$entry
,
$article_id
,
$rv
)
{
user_error
(
"Dummy method invoked."
,
E_USER_ERROR
);
return
""
;
}
/**
* @param array<string,mixed> $article
* @param string $action
* @return array<string,mixed> ($article)
*/
function
hook_article_filter_action
(
$article
,
$action
)
{
user_error
(
"Dummy method invoked."
,
E_USER_ERROR
);
return
[];
}
/**
...
...
@@ -409,6 +453,8 @@ abstract class Plugin {
*/
function
hook_format_article
(
$html
,
$row
)
{
user_error
(
"Dummy method invoked."
,
E_USER_ERROR
);
return
""
;
}
function
hook_feed_basic_info
(
$basic_info
,
$fetch_url
,
$owner_uid
,
$feed_id
,
$auth_login
,
$auth_pass
)
{
...
...
This diff is collapsed.
Click to expand it.
plugins/af_readability/init.php
+
1
−
0
View file @
dd7299b6
...
...
@@ -187,6 +187,7 @@ class Af_Readability extends Plugin {
case
"action_append"
:
return
$this
->
process_article
(
$article
,
true
);
}
return
$article
;
}
public
function
extract_content
(
$url
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment