mcred/FeedMeNow-PHP

View on GitHub

Showing 23 of 23 total issues

Restaurant has 23 functions (exceeds 20 allowed). Consider refactoring.
Open

class Restaurant
{
private $id;
private $name;
private $imageUrl;
Severity: Minor
Found in src/FeedMeNow/Model/Restaurant.php - About 2 hrs to fix

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

    $id,
    $name,
    $imageUrl,
    $isClaimed,
    $isClosed,
    Severity: Major
    Found in src/FeedMeNow/Model/Restaurant.php - About 2 hrs to fix

      Avoid excessively long variable names like $multipartStreamBuilder. Keep variable name length under 20.
      Open

      private $multipartStreamBuilder;
      Severity: Minor
      Found in src/FeedMeNow/RequestBuilder.php by phpmd

      The class Restaurant has 18 fields. Consider redesigning Restaurant to keep the number of fields under 15.
      Open

      class Restaurant
      {
      private $id;
      private $name;
      private $imageUrl;
      Severity: Minor
      Found in src/FeedMeNow/Model/Restaurant.php by phpmd

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

      $address1,
      $address2,
      $address3,
      $city,
      $zipCode,
      Severity: Major
      Found in src/FeedMeNow/Model/Address.php - About 1 hr to fix

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

        $name,
        $url,
        $fee,
        $serviceFee,
        $minimum,
        Severity: Major
        Found in src/FeedMeNow/Model/Provider.php - About 50 mins to fix

          Avoid variables with short names like $id. Configured minimum length is 3.
          Open

          $id,
          Severity: Minor
          Found in src/FeedMeNow/Model/Restaurant.php by phpmd

          Avoid variables with short names like $id. Configured minimum length is 3.
          Open

          private $id;
          Severity: Minor
          Found in src/FeedMeNow/Model/Restaurant.php by phpmd

          Method name "Category::GetAlias" is not in camel caps format
          Open

          public function GetAlias()

          Method name "Category::GetTitle" is not in camel caps format
          Open

          public function GetTitle()

          Avoid using static access to class '\Webmozart\Assert\Assert' in method 'get'.
          Open

          Assert::stringNotEmpty($address);
          Severity: Minor
          Found in src/FeedMeNow/Api/Search.php by phpmd

          Avoid using static access to class '\Http\Discovery\HttpClientDiscovery' in method '__construct'.
          Open

          $this->httpClient = $httpClient ?: HttpClientDiscovery::find();
          Severity: Minor
          Found in src/FeedMeNow/FeedMeNow.php by phpmd

          Avoid using static access to class '\Http\Discovery\MessageFactoryDiscovery' in method 'getRequestFactory'.
          Open

          $this->requestFactory = MessageFactoryDiscovery::find();
          Severity: Minor
          Found in src/FeedMeNow/RequestBuilder.php by phpmd

          Avoid using static access to class '\FeedMeNow\Model\Category' in method 'setCategories'.
          Open

          $return[] = Category::create($category);
          Severity: Minor
          Found in src/FeedMeNow/Model/Restaurant.php by phpmd

          Avoid using static access to class '\Webmozart\Assert\Assert' in method 'get'.
          Open

          Assert::stringNotEmpty($address);
          Severity: Minor
          Found in src/FeedMeNow/Api/Provider.php by phpmd

          Avoid using static access to class '\FeedMeNow\Model\Restaurant' in method 'create'.
          Open

          $return[] = Restaurant::create($item);
          Severity: Minor
          Found in src/FeedMeNow/Mapper/Provider.php by phpmd

          Avoid using static access to class '\FeedMeNow\Model\Provider' in method 'setProviders'.
          Open

          $return[] = Provider::create($provider);
          Severity: Minor
          Found in src/FeedMeNow/Model/Restaurant.php by phpmd

          Avoid unused private fields such as '$multipartStreamBuilder'.
          Open

          private $multipartStreamBuilder;
          Severity: Minor
          Found in src/FeedMeNow/RequestBuilder.php by phpmd

          Avoid using static access to class '\FeedMeNow\Model\Hour' in method 'setHours'.
          Open

          $return[] = Hour::create($hour);
          Severity: Minor
          Found in src/FeedMeNow/Model/Restaurant.php by phpmd

          The method __construct has 18 parameters. Consider reducing the number of parameters to less than 10.
          Open

          public function __construct(
          $id,
          $name,
          $imageUrl,
          $isClaimed,
          Severity: Minor
          Found in src/FeedMeNow/Model/Restaurant.php by phpmd
          Severity
          Category
          Status
          Source
          Language