But the variable is already initialized regardless. I find setting it to a
bool when you don't have to redundant since you can just use the preg_match
return value.

(Sent from my phone)
On Nov 20, 2013 6:20 PM, "Inez Korczyński" <notifications@github.com> wrote:

> In includes/wikia/services/WikiaFileHelper.class.php:
>
> > @@ -652,16 +655,25 @@ public static function getWikiaFile( $url ) {
> >  		$pattern = '/(File:|'.$nsFileTranslated.':)(.+)$/';
> >
> >  		if ( preg_match( $pattern, $url, $matches ) ) {
> > +			$hasMatch = true;
>
> I didn't have a problem reading it the way it is now and I don't see a
> need to initialize extra variable ($hasMatch) just for the purpose of
> keeping a return result of simple call to a function.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/Wikia/app/pull/2128/files#r7813887>
> .
>