Code Duplication    Length = 6-8 lines in 2 locations

classes/Route.php 2 locations

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