src/Traits/DetectiveTrait.php
public function check($file, $verify = null)
	{
		if ($this->prepareFile($file))
		{
			$leads = $this->leads();

			if (!is_null($verify))
			{
				if (isset($leads[$verify]))
				{
					return $this->checkLead($leads[$verify]);
				}

				return false;
			}
			else
			{
				foreach ($leads as $lead)
				{
					$results = $this->checkLead($lead);

					// We're sure we've found something.
					if ($results === true)
					{
						return true;
					}
					// We're sure this detective can find nothing.
					else if ($results === false)
					{
						break;
					}
				}
			}
		}

		return false;
	}
public function check($file, $verify = null)
	{
		if ($this->prepareFile($file))
		{
			$leads = $this->leads();

			if (!is_null($verify))
			{
				if (isset($leads[$verify]))
				{
					return $this->checkLead($leads[$verify]);
				}

				return false;
			}
			else
			{
				foreach ($leads as $lead)
				{
					$results = $this->checkLead($lead);

					// We're sure we've found something.
					if ($results === true)
					{
						return true;
					}
					// We're sure this detective can find nothing.
					else if ($results === false)
					{
						break;
					}
				}
			}
		}

		return false;
	}
public function check ( $ file , $ verify = null ) { if ( $ this -> prepareFile ( $ file ) ) { $ leads = $ this -> leads ( ) ; if ( ! is_null ( $ verify ) ) { if ( isset ( $ leads [ $ verify ] ) ) { return $ this -> checkLead ( $ leads [ $ verify ] ) ; } return false ; } else { foreach ( $ leads as $ lead ) { $ results = $ this -> checkLead ( $ lead ) ; // We're sure we've found something.
 if ( $ results === true ) { return true ; } // We're sure this detective can find nothing.
 else if ( $ results === false ) { break ; } } } } return false ; }
Check the the file against our leads.

@param  mixed  $file  File to check.
@param  string|null  $verify  Extension to verify against. Checks all possible if unset.
@return boolean  True if we solved the case, false if not.
Check the the file against our leads .