Code Duplication    Length = 6-8 lines in 2 locations

classes/Route.php 2 locations

@@ 118-125 (lines=8) @@
115
	        $this->response .= ob_get_clean();
116
117
	        // Render View if returned, else echo string or encode json response
118
	        if ( null !== $view_results ) {
119
	          if (is_a($view_results,'View') || is_string($view_results)) {
120
	              $this->response .= (string)$view_results;
121
	          } else {
122
			        	$this->response_is_object = true;
123
	              $this->response_object 		= $view_results;
124
	          }
125
	        }
126
127
        } else if (is_a($callback,'View') || is_string($callback)) {
128
          // return rendered View or direct string
@@ 127-132 (lines=6) @@
124
	          }
125
	        }
126
127
        } else if (is_a($callback,'View') || is_string($callback)) {
128
          // return rendered View or direct string
129
        	$this->response .= (string)$callback;
130
        } else {
131
          // JSON encode returned value
132
        	$this->response_is_object = true;
133
        	$this->response_object 		= $callback;
134
        }
135