Skip to content

Commit

Permalink
src: Fix some more issues noticed by Psalm
Browse files Browse the repository at this point in the history
  • Loading branch information
jtojnar committed May 1, 2020
1 parent 96c0c10 commit 78b4300
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/controllers/About.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,6 @@ public function about(Base $f3) {
],
];

echo $this->view->jsonSuccess($configuration);
$this->view->jsonSuccess($configuration);
}
}
8 changes: 5 additions & 3 deletions src/controllers/Opml/Import.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ public function __construct(Authentication $authentication, Logger $logger, \dao
* html
*
* @note Borrows from controllers/Sources.php:write
*
* @return void
*/
public function add() {
$this->authentication->needsLoggedIn();
Expand Down Expand Up @@ -78,8 +80,8 @@ public function add() {
// show errors
if (count($errors) > 0) {
http_response_code(202);
$messages = 'The following feeds could not be imported:';
$messages += $errors;
$messages[] = 'The following feeds could not be imported:';
$messages = array_merge($messages, $errors);
} else { // On success bring them back to their subscription list
http_response_code(200);
$amount = count($this->imported);
Expand Down Expand Up @@ -149,7 +151,7 @@ private function processGroup(SimpleXMLElement $xml, array $tags = []) {
* @param SimpleXMLElement $xml xml feed entry for item
* @param array $tags of the entry
*
* @return bool|string true on success or item title on error
* @return true|string true on success or item title on error
*/
private function addSubscription(SimpleXMLElement $xml, array $tags) {
// OPML Required attributes: text, xmlUrl, type
Expand Down
2 changes: 2 additions & 0 deletions src/controllers/Opml/ImportPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ public function __construct(Authentication $authentication) {
/**
* Shows a simple html form
* html
*
* @return void
*/
public function show() {
$this->authentication->needsLoggedIn();
Expand Down

0 comments on commit 78b4300

Please sign in to comment.