wiki.techinc.nl/includes/content
Thiemo Kreuz 70027add5d Make use of the preg_match() return value, if possible
Instead of checking if the resulting $matches array is complete, we can
safely assume it is, as long as the preg_match() call returned a
non-false value.

Note that some of these used empty() before and are actually bogus
because of this! empty() considers the string "0" to be empty. In case
of a ==0== headline that's an actual bug.

I'm also removing the `= []` initialization before the preg_match.
I understand why it was added: to make it a little more obvious that the
variable is guaranteed to be initialized. But:
* This is guaranteed by the preg_match anyway.
* Neither initializing it with null or an empty array makes much sense
  because the code below assumes so much more, e.g. that specific
  elements exist, and are arrays. Again, these guarantees are all given
  by the preg_match.

I find the additional initialization more distracting than helpful.

Change-Id: I22b192b59038d9fa51a7e6f04d8d76634ae3de73
2020-07-14 19:26:35 +00:00
..
Hook Replace "@stable for implementation" with "@stable to implement" 2020-07-13 11:05:49 +02:00
AbstractContent.php Merge "Replace "@stable for subclassing" with "@stable to extend"" 2020-07-13 09:31:38 +00:00
CodeContentHandler.php Merge "Replace "@stable for subclassing" with "@stable to extend"" 2020-07-13 09:31:38 +00:00
Content.php Stability annotations for interfaces. 2020-07-07 22:01:29 +00:00
ContentHandler.php Merge "Replace "@stable for subclassing" with "@stable to extend"" 2020-07-13 09:31:38 +00:00
ContentHandlerFactory.php ContentHandlerFactory: Inject LoggerInstance instead of using wfDebugLog 2020-06-01 22:37:12 +00:00
ContentModelChange.php Add ContentModelChangeFactory, implemented by PageCommandFactory 2020-05-30 22:36:16 +00:00
CssContent.php Make use of the preg_match() return value, if possible 2020-07-14 19:26:35 +00:00
CssContentHandler.php
FileContentHandler.php
IContentHandlerFactory.php Don't use a dynamic hook name when calling a hook 2020-02-25 13:42:30 +11:00
JavaScriptContent.php Make use of the preg_match() return value, if possible 2020-07-14 19:26:35 +00:00
JavaScriptContentHandler.php
JsonContent.php
JsonContentHandler.php
MessageContent.php
TextContent.php Merge "Replace "@stable for subclassing" with "@stable to extend"" 2020-07-13 09:31:38 +00:00
TextContentHandler.php
UnknownContent.php
UnknownContentHandler.php
WikitextContent.php Replace "@stable for calling" by "@stable to call" 2020-07-13 08:55:28 +00:00
WikitextContentHandler.php Remove usages of deprecated Language methods 2020-02-16 00:45:48 +00:00
WikiTextStructure.php