brandon14/brandonclothier.me

View on GitHub

Showing 5 of 7 total issues

File resume.blade.php has 336 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<section id="resume" class="section resume-section">
  <div class="row">
    <!-- Resume column -->
    <div class="col-lg-12">
      <h1>Resume</h1>
Severity: Minor
Found in resources/views/pages/sections/resume.blade.php - About 4 hrs to fix

Function manifest_asset has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

    function manifest_asset($path, $baseUrl = '')
    {
        static $manifests = [];

        $manifestDirectory = app('config')->get('app.webpack_asset_dir');
Severity: Minor
Found in helpers.php - About 1 hr to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function getLastModifiedTime has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

    public function getLastModifiedTime()
    {
        // Check the cache.
        if ($this->cacheTimestamp && $this->cache->has($this->cacheKey)) {
            return Carbon::createFromTimestamp($this->cache->get($this->cacheKey));
Severity: Minor
Found in app/Services/LastModified.php - About 1 hr to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method __construct has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

        CacheRepository $cache,
        $basePath,
        $cacheTimestamp = true,
        $cacheTtl = 30,
        $cacheKey = 'last_modified',
Severity: Minor
Found in app/Services/LastModified.php - About 45 mins to fix

Avoid too many return statements within this function.
Open

    return '';
Severity: Major
Found in resources/assets/js/app.js - About 30 mins to fix
Severity
Category
Status
Source
Language