original_string: public function depend($entity, $type) {
  		$depend = $type === 'count' ? 0 : [];
  
  		foreach (static::_dependent() as $model) {
  			$results = $model::find($type, [
  				'conditions' => [
  					'tags' => $entity->name
  				]
  			]);
  			if (!$results) {
  				continue;
  			}
  			if ($type === 'count') {
  				$depend += $results;
  			} else {
  				foreach ($results as $result) {
  					$depend[] = $result;
  				}
  			}
  		}
  		return $depend;
  	}
code: public function depend($entity, $type) {
  		$depend = $type === 'count' ? 0 : [];
  
  		foreach (static::_dependent() as $model) {
  			$results = $model::find($type, [
  				'conditions' => [
  					'tags' => $entity->name
  				]
  			]);
  			if (!$results) {
  				continue;
  			}
  			if ($type === 'count') {
  				$depend += $results;
  			} else {
  				foreach ($results as $result) {
  					$depend[] = $result;
  				}
  			}
  		}
  		return $depend;
  	}
code_tokens: public function depend ( $ entity , $ type ) { $ depend = $ type === 'count' ? 0 : [ ] ; foreach ( static :: _dependent ( ) as $ model ) { $ results = $ model :: find ( $ type , [ 'conditions' => [ 'tags' => $ entity -> name ] ] ) ; if ( ! $ results ) { continue ; } if ( $ type === 'count' ) { $ depend += $ results ; } else { foreach ( $ results as $ result ) { $ depend [ ] = $ result ; } } } return $ depend ; }
docstring: Do not use in performance criticial parts.
docstring_tokens: Do not use in performance criticial parts .