brandon14/ebay-sdk-php

View on GitHub
src/Sell/Feed/V1/Api/TaskApi.php

Summary

Maintainability
F
1 wk
Test Coverage

File TaskApi.php has 1048 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

/**
 * This file is part of the trollandtoad/ebay-sdk-php package.
 *
Severity: Major
Found in src/Sell/Feed/V1/Api/TaskApi.php - About 2 days to fix

    TaskApi has 35 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class TaskApi
    {
        /**
         * @var ClientInterface
         */
    Severity: Minor
    Found in src/Sell/Feed/V1/Api/TaskApi.php - About 4 hrs to fix

      Function uploadFileRequest has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
      Open

          public function uploadFileRequest($task_id, $creation_date = null, $file_name = null, $modification_date = null, $name = null, $read_date = null, $size = null, $type = null)
          {
              // Verify the required parameter 'task_id' is set.
              if ($task_id === null || (\is_array($task_id) && count($task_id) === 0)) {
                  throw new \InvalidArgumentException('Missing the required parameter $task_id when calling uploadFile');
      Severity: Minor
      Found in src/Sell/Feed/V1/Api/TaskApi.php - About 3 hrs 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 getTasksRequest has 96 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function getTasksRequest($date_range = null, $feed_type = null, $limit = null, $look_back_days = null, $offset = null, $schedule_id = null)
          {
              $resourcePath = '/task';
              $formParams = [];
              $queryParams = [];
      Severity: Major
      Found in src/Sell/Feed/V1/Api/TaskApi.php - About 3 hrs to fix

        Function createTaskRequest has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
        Open

            public function createTaskRequest($create_task_request, $x_ebay_c_marketplace_id = null)
            {
                // Verify the required parameter 'create_task_request' is set.
                if ($create_task_request === null || (\is_array($create_task_request) && count($create_task_request) === 0)) {
                    throw new \InvalidArgumentException('Missing the required parameter $create_task_request when calling createTask');
        Severity: Minor
        Found in src/Sell/Feed/V1/Api/TaskApi.php - About 3 hrs 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 uploadFileRequest has 85 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function uploadFileRequest($task_id, $creation_date = null, $file_name = null, $modification_date = null, $name = null, $read_date = null, $size = null, $type = null)
            {
                // Verify the required parameter 'task_id' is set.
                if ($task_id === null || (\is_array($task_id) && count($task_id) === 0)) {
                    throw new \InvalidArgumentException('Missing the required parameter $task_id when calling uploadFile');
        Severity: Major
        Found in src/Sell/Feed/V1/Api/TaskApi.php - About 3 hrs to fix

          Function getInputFileRequest has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
          Open

              public function getInputFileRequest($task_id)
              {
                  // Verify the required parameter 'task_id' is set.
                  if ($task_id === null || (\is_array($task_id) && count($task_id) === 0)) {
                      throw new \InvalidArgumentException('Missing the required parameter $task_id when calling getInputFile');
          Severity: Minor
          Found in src/Sell/Feed/V1/Api/TaskApi.php - About 2 hrs 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 getTaskRequest has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
          Open

              public function getTaskRequest($task_id)
              {
                  // Verify the required parameter 'task_id' is set.
                  if ($task_id === null || (\is_array($task_id) && count($task_id) === 0)) {
                      throw new \InvalidArgumentException('Missing the required parameter $task_id when calling getTask');
          Severity: Minor
          Found in src/Sell/Feed/V1/Api/TaskApi.php - About 2 hrs 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 getResultFileRequest has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
          Open

              public function getResultFileRequest($task_id)
              {
                  // Verify the required parameter 'task_id' is set.
                  if ($task_id === null || (\is_array($task_id) && count($task_id) === 0)) {
                      throw new \InvalidArgumentException('Missing the required parameter $task_id when calling getResultFile');
          Severity: Minor
          Found in src/Sell/Feed/V1/Api/TaskApi.php - About 2 hrs 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 createTaskRequest has 66 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function createTaskRequest($create_task_request, $x_ebay_c_marketplace_id = null)
              {
                  // Verify the required parameter 'create_task_request' is set.
                  if ($create_task_request === null || (\is_array($create_task_request) && count($create_task_request) === 0)) {
                      throw new \InvalidArgumentException('Missing the required parameter $create_task_request when calling createTask');
          Severity: Major
          Found in src/Sell/Feed/V1/Api/TaskApi.php - About 2 hrs to fix

            Method getResultFileRequest has 64 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function getResultFileRequest($task_id)
                {
                    // Verify the required parameter 'task_id' is set.
                    if ($task_id === null || (\is_array($task_id) && count($task_id) === 0)) {
                        throw new \InvalidArgumentException('Missing the required parameter $task_id when calling getResultFile');
            Severity: Major
            Found in src/Sell/Feed/V1/Api/TaskApi.php - About 2 hrs to fix

              Method getInputFileRequest has 64 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function getInputFileRequest($task_id)
                  {
                      // Verify the required parameter 'task_id' is set.
                      if ($task_id === null || (\is_array($task_id) && count($task_id) === 0)) {
                          throw new \InvalidArgumentException('Missing the required parameter $task_id when calling getInputFile');
              Severity: Major
              Found in src/Sell/Feed/V1/Api/TaskApi.php - About 2 hrs to fix

                Method getTaskRequest has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function getTaskRequest($task_id)
                    {
                        // Verify the required parameter 'task_id' is set.
                        if ($task_id === null || (\is_array($task_id) && count($task_id) === 0)) {
                            throw new \InvalidArgumentException('Missing the required parameter $task_id when calling getTask');
                Severity: Major
                Found in src/Sell/Feed/V1/Api/TaskApi.php - About 2 hrs to fix

                  Method getInputFileWithHttpInfo has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function getInputFileWithHttpInfo($task_id)
                      {
                          $request = $this->getInputFileRequest($task_id);
                  
                          try {
                  Severity: Major
                  Found in src/Sell/Feed/V1/Api/TaskApi.php - About 2 hrs to fix

                    Method uploadFileWithHttpInfo has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function uploadFileWithHttpInfo($task_id, $creation_date = null, $file_name = null, $modification_date = null, $name = null, $read_date = null, $size = null, $type = null)
                        {
                            $request = $this->uploadFileRequest($task_id, $creation_date, $file_name, $modification_date, $name, $read_date, $size, $type);
                    
                            try {
                    Severity: Major
                    Found in src/Sell/Feed/V1/Api/TaskApi.php - About 2 hrs to fix

                      Method getTaskWithHttpInfo has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function getTaskWithHttpInfo($task_id)
                          {
                              $request = $this->getTaskRequest($task_id);
                      
                              try {
                      Severity: Major
                      Found in src/Sell/Feed/V1/Api/TaskApi.php - About 2 hrs to fix

                        Method getResultFileWithHttpInfo has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function getResultFileWithHttpInfo($task_id)
                            {
                                $request = $this->getResultFileRequest($task_id);
                        
                                try {
                        Severity: Major
                        Found in src/Sell/Feed/V1/Api/TaskApi.php - About 2 hrs to fix

                          Method getTasksWithHttpInfo has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function getTasksWithHttpInfo($date_range = null, $feed_type = null, $limit = null, $look_back_days = null, $offset = null, $schedule_id = null)
                              {
                                  $request = $this->getTasksRequest($date_range, $feed_type, $limit, $look_back_days, $offset, $schedule_id);
                          
                                  try {
                          Severity: Major
                          Found in src/Sell/Feed/V1/Api/TaskApi.php - About 2 hrs to fix

                            Function getTasksRequest has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                            Open

                                public function getTasksRequest($date_range = null, $feed_type = null, $limit = null, $look_back_days = null, $offset = null, $schedule_id = null)
                                {
                                    $resourcePath = '/task';
                                    $formParams = [];
                                    $queryParams = [];
                            Severity: Minor
                            Found in src/Sell/Feed/V1/Api/TaskApi.php - About 2 hrs 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 getTasksWithHttpInfo has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                            Open

                                public function getTasksWithHttpInfo($date_range = null, $feed_type = null, $limit = null, $look_back_days = null, $offset = null, $schedule_id = null)
                                {
                                    $request = $this->getTasksRequest($date_range, $feed_type, $limit, $look_back_days, $offset, $schedule_id);
                            
                                    try {
                            Severity: Minor
                            Found in src/Sell/Feed/V1/Api/TaskApi.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 getInputFileWithHttpInfo has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                            Open

                                public function getInputFileWithHttpInfo($task_id)
                                {
                                    $request = $this->getInputFileRequest($task_id);
                            
                                    try {
                            Severity: Minor
                            Found in src/Sell/Feed/V1/Api/TaskApi.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 getTaskWithHttpInfo has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                            Open

                                public function getTaskWithHttpInfo($task_id)
                                {
                                    $request = $this->getTaskRequest($task_id);
                            
                                    try {
                            Severity: Minor
                            Found in src/Sell/Feed/V1/Api/TaskApi.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 getResultFileWithHttpInfo has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                            Open

                                public function getResultFileWithHttpInfo($task_id)
                                {
                                    $request = $this->getResultFileRequest($task_id);
                            
                                    try {
                            Severity: Minor
                            Found in src/Sell/Feed/V1/Api/TaskApi.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 uploadFileWithHttpInfo has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                            Open

                                public function uploadFileWithHttpInfo($task_id, $creation_date = null, $file_name = null, $modification_date = null, $name = null, $read_date = null, $size = null, $type = null)
                                {
                                    $request = $this->uploadFileRequest($task_id, $creation_date, $file_name, $modification_date, $name, $read_date, $size, $type);
                            
                                    try {
                            Severity: Minor
                            Found in src/Sell/Feed/V1/Api/TaskApi.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 uploadFileWithHttpInfo has 8 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                public function uploadFileWithHttpInfo($task_id, $creation_date = null, $file_name = null, $modification_date = null, $name = null, $read_date = null, $size = null, $type = null)
                            Severity: Major
                            Found in src/Sell/Feed/V1/Api/TaskApi.php - About 1 hr to fix

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

                                  public function uploadFileAsync($task_id, $creation_date = null, $file_name = null, $modification_date = null, $name = null, $read_date = null, $size = null, $type = null)
                              Severity: Major
                              Found in src/Sell/Feed/V1/Api/TaskApi.php - About 1 hr to fix

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

                                    public function uploadFileRequest($task_id, $creation_date = null, $file_name = null, $modification_date = null, $name = null, $read_date = null, $size = null, $type = null)
                                Severity: Major
                                Found in src/Sell/Feed/V1/Api/TaskApi.php - About 1 hr to fix

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

                                      public function uploadFile($task_id, $creation_date = null, $file_name = null, $modification_date = null, $name = null, $read_date = null, $size = null, $type = null)
                                  Severity: Major
                                  Found in src/Sell/Feed/V1/Api/TaskApi.php - About 1 hr to fix

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

                                        public function uploadFileAsyncWithHttpInfo($task_id, $creation_date = null, $file_name = null, $modification_date = null, $name = null, $read_date = null, $size = null, $type = null)
                                    Severity: Major
                                    Found in src/Sell/Feed/V1/Api/TaskApi.php - About 1 hr to fix

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

                                          public function getTasks($date_range = null, $feed_type = null, $limit = null, $look_back_days = null, $offset = null, $schedule_id = null)
                                      Severity: Minor
                                      Found in src/Sell/Feed/V1/Api/TaskApi.php - About 45 mins to fix

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

                                            public function getTasksRequest($date_range = null, $feed_type = null, $limit = null, $look_back_days = null, $offset = null, $schedule_id = null)
                                        Severity: Minor
                                        Found in src/Sell/Feed/V1/Api/TaskApi.php - About 45 mins to fix

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

                                              public function getTasksAsync($date_range = null, $feed_type = null, $limit = null, $look_back_days = null, $offset = null, $schedule_id = null)
                                          Severity: Minor
                                          Found in src/Sell/Feed/V1/Api/TaskApi.php - About 45 mins to fix

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

                                                public function getTasksAsyncWithHttpInfo($date_range = null, $feed_type = null, $limit = null, $look_back_days = null, $offset = null, $schedule_id = null)
                                            Severity: Minor
                                            Found in src/Sell/Feed/V1/Api/TaskApi.php - About 45 mins to fix

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

                                                  public function getTasksWithHttpInfo($date_range = null, $feed_type = null, $limit = null, $look_back_days = null, $offset = null, $schedule_id = null)
                                              Severity: Minor
                                              Found in src/Sell/Feed/V1/Api/TaskApi.php - About 45 mins to fix

                                                Function createTaskWithHttpInfo has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                Open

                                                    public function createTaskWithHttpInfo($create_task_request, $x_ebay_c_marketplace_id = null)
                                                    {
                                                        $request = $this->createTaskRequest($create_task_request, $x_ebay_c_marketplace_id);
                                                
                                                        try {
                                                Severity: Minor
                                                Found in src/Sell/Feed/V1/Api/TaskApi.php - About 35 mins 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

                                                There are no issues that match your filters.

                                                Category
                                                Status