Showing 151 of 151 total issues
Property \Laravelium\Feed\Feed->view
has undeclared type \Illuminate\Contracts\View\Factory
Open
Open
protected $view = null;
- Exclude checks
Property \Laravelium\Feed\Feed->file
has undeclared type \Illuminate\Filesystem\Filesystem
Open
Open
protected $file = null;
- Exclude checks
Call to method make
from undeclared class \Illuminate\Contracts\Routing\ResponseFactory
Open
Open
return $this->response->make($this->cache->get($this->cacheKey), 200, ['Content-Type' => $this->cache->get($this->cacheKey."_ctype").'; charset='.$this->charset]);
- Exclude checks
Call to method has
from undeclared class \Illuminate\Contracts\Cache\Repository
Open
Open
if (0 < $this->caching && $this->cache->has($this->cacheKey)) {
- Exclude checks
Call to method make
from undeclared class \Illuminate\Contracts\View\Factory
Open
Open
return $this->response->make($this->view->make($view, $viewData), 200, ['Content-Type' => $ctype.'; charset='.$this->charset]);
- Exclude checks
Class extends undeclared class \Illuminate\Support\ServiceProvider
Open
Open
class FeedServiceProvider extends ServiceProvider implements DeferrableProvider
- Exclude checks
Returning type int
but getCacheDuration()
is declared to return string
Open
Open
return $this->caching;
- Exclude checks
Call to undeclared method \Laravelium\Feed\FeedServiceProvider::publishes
Open
Open
$this->publishes([
- Exclude checks
Call to undeclared function \config()
Open
Open
'cache_key' => 'laravel-feed.' . config('app.url'),
- Exclude checks
Reference to undeclared property \Laravelium\Feed\FeedServiceProvider->app
Open
Open
$this->app->alias('feed', Feed::class);
- Exclude checks
Parameter $cache
has undeclared type \Laravelium\Feed\datetime
(Did you mean class \DateTime) Open
Open
public function render($format = null, $cache = null, $key = null)
- Exclude checks
Returning type string
but getCustomView()
is declared to return void
Open
Open
return $this->customView;
- Exclude checks
Call to undeclared function \config_path()
Open
Open
$config_file => config_path('feed.php')
- Exclude checks
Define a constant instead of duplicating this literal "description" 4 times. Open
Open
$append = (strlen($item['description']) > $this->shorteningLimit) ? '...' : '';
- Read upRead up
- Exclude checks
Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.
On the other hand, constants can be referenced from many places, but only need to be updated in a single place.
Noncompliant Code Example
With the default threshold of 3:
function run() { prepare('action1'); // Non-Compliant - 'action1' is duplicated 3 times execute('action1'); release('action1'); }
Compliant Solution
ACTION_1 = 'action1'; function run() { prepare(ACTION_1); execute(ACTION_1); release(ACTION_1); }
Exceptions
To prevent generating some false-positives, literals having less than 5 characters are excluded.
Property \Laravelium\Feed\Feed->configRepository
has undeclared type \Illuminate\Contracts\Config\Repository
Open
Open
protected $configRepository = null;
- Exclude checks
Returning type string
but getDateFormat()
is declared to return void
Open
Open
return $this->dateFormat;
- Exclude checks
Call to undeclared method \Laravelium\Feed\FeedServiceProvider::mergeConfigFrom
Open
Open
$this->mergeConfigFrom($config_file, 'feed');
- Exclude checks
Suspicious array access to \Illuminate\Contracts\Container\Container
Open
Open
'config' => $app['config'],
- Exclude checks
Property \Laravelium\Feed\Feed->cache
has undeclared type \Illuminate\Contracts\Cache\Repository
Open
Open
public $cache = null;
- Exclude checks
Call to method forget
from undeclared class \Illuminate\Contracts\Cache\Repository
Open
Open
$this->cache->forget($this->cacheKey);
- Exclude checks