brendt / stitcher.io

Source code of stitcher.io
https://stitcher.io
179 stars 137 forks source link

Fix problems discovered by static analysis #225

Closed szepeviktor closed 1 year ago

szepeviktor commented 1 year ago

Only 3 remaining.

 ------ ------------------------------------------------------------------------------------------------------------------------
  Line   Console/Commands/RedditWeekCommand.php
 ------ ------------------------------------------------------------------------------------------------------------------------
  54     Argument of an invalid type Brendt\Stitcher\Console\DTO\RedditPost supplied for foreach, only iterables are supported.
 ------ ------------------------------------------------------------------------------------------------------------------------

 ------ ---------------------------------------------------------------------
  Line   Console/TwitterRepository.php
 ------ ---------------------------------------------------------------------
  53     Function array_last not found. 💣 
 ------ ---------------------------------------------------------------------

 ------ -------------------------------------------------------------------------------------
  Line   Handler/RssHandler.php
 ------ -------------------------------------------------------------------------------------
  16     Property Brendt\Stitcher\Handler\RssHandler::$renderer is never read, only written.
         💡 See: https://phpstan.org/developing-extensions/always-read-written-properties
 ------ -------------------------------------------------------------------------------------

Could you help?

szepeviktor commented 1 year ago

@brendt Do you find these interesting?

brendt commented 1 year ago

In theory, yes. But I'm not going to merge it since I'm low on time for reviewing atm.