<commit_before><?php namespace Controllers\Admin;

use AdminController;
use Input;
use Lang;
use Asset;
use Supplier;
use Statuslabel;
use User;
use Setting;
use Redirect;
use DB;
use Actionlog;
use Model;
use Depreciation;
use Sentry;
use Str;
use Validator;
use View;
use Response;
use Config;
use Location;
use Log;

use BaconQrCode\Renderer\Image as QrImage;

class AssetsController extends AdminController
{
    protected $qrCodeDimensions = array( 'height' => 170, 'width' => 170);

    /**
     * Show a list of all the assets.
     *
     * @return View
     */

    public function getIndex()
    {
        // Grab all the assets

        // Filter results
        if (Input::get('Pending')) {
            $assets = Asset::with('model','assigneduser','assetstatus','defaultLoc','assetlog')
            ->whereNull('status_id','and')
        	->where('assigned_to','=','0')
        	->where('physical', '=', 1)
        	->get();
        } elseif (Input::get('RTD')) {
        	$assets = Asset::with('model','assigneduser','assetstatus','defaultLoc','assetlog')
        	->where('status_id', '=', 0)
        	->where('physical', '=', 1)
        	->orderBy('asset_tag', 'ASC')
        	->get();
        } elseif (Input::get('Undeployable')) {
           $assets = Asset::with('model','assigneduser','assetstatus','defaultLoc','assetlog')
           ->where('physical', '=', 1)
           ->where('assigned_to','>','1')
           ->orderBy('asset_tag', 'ASC')
           ->get();
        } elseif (Input::get('Deployed')) {
            $assets = Asset::with('model','assigneduser','assetstatus','defaultLoc','assetlog')
            ->where('physical', '=', 1)
            ->where('assigned_to','>','0')
            ->orderBy('asset_tag', 'ASC')
            ->get();
        } else {
			$assets = Asset::with('model','assigneduser','assetstatus','defaultLoc')
			->where('physical', '=', 1)
			->orderBy('asset_tag', 'ASC')
			->get();
<commit_msg>Fix #342<commit_after><?php namespace Controllers\Admin;

use AdminController;
use Input;
use Lang;
use Asset;
use Supplier;
use Statuslabel;
use User;
use Setting;
use Redirect;
use DB;
use Actionlog;
use Model;
use Depreciation;
use Sentry;
use Str;
use Validator;
use View;
use Response;
use Config;
use Location;
use Log;

use BaconQrCode\Renderer\Image as QrImage;

class AssetsController extends AdminController
{
    protected $qrCodeDimensions = array( 'height' => 170, 'width' => 170);

    /**
     * Show a list of all the assets.
     *
     * @return View
     */

    public function getIndex()
    {
        // Grab all the assets

        // Filter results
        if (Input::get('Pending')) {
        	$assets = Asset::with('model','assigneduser','assetstatus','defaultLoc','assetlog')
        	->whereNull('status_id','and')
        	->where('assigned_to','=','0')
        	->where('physical', '=', 1)
        	->get();
        } elseif (Input::get('RTD')) {
        	$assets = Asset::with('model','assigneduser','assetstatus','defaultLoc','assetlog')
        	->where('status_id', '=', 0)
        	->where('assigned_to', '=', '0')
        	->where('physical', '=', 1)
        	->orderBy('asset_tag', 'ASC')
        	->get();
        } elseif (Input::get('Undeployable')) {
        	$assets = Asset::with('model','assigneduser','assetstatus','defaultLoc','assetlog')
        	->where('status_id', '>', 1)
        	->where('physical', '=', 1)
        	->orderBy('asset_tag', 'ASC')
        	->get();
        } elseif (Input::get('Deployed')) {
        	$assets = Asset::with('model','assigneduser','assetstatus','defaultLoc','assetlog')
        	->where('status_id', '=', 0)
        	->where('physical', '=', 1)
        	->where('assigned_to','>','0')
        	->orderBy('asset_tag', 'ASC')
        	->get();
        } else {
        	$assets = Asset::with('model','assigneduser','assetstatus','defaultLoc')
        	->where('physical', '=', 1)
        	->orderBy('asset_tag', 'ASC')
        	->get();
{'fraction_non_alphanumeric': 0.19516494585746663, 'fraction_numerical': 0.008813900780659783, 'mean_word_length': 2.8265895953757227, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 51, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4657763', 'n_tokens_mistral': 1307, 'n_tokens_neox': 1251, 'n_words': 258}