namespace Symfony\Component\Translation\Catalogue;
-use Symfony\Component\Translation\MessageCatalogue;
-use Symfony\Component\Translation\MessageCatalogueInterface;
use Symfony\Component\Translation\Exception\InvalidArgumentException;
use Symfony\Component\Translation\Exception\LogicException;
+use Symfony\Component\Translation\MessageCatalogue;
+use Symfony\Component\Translation\MessageCatalogueInterface;
/**
* Base catalogues binary operation class.
protected $result;
/**
- * @var null|array The domains affected by this operation
+ * @var array|null The domains affected by this operation
*/
private $domains;
* This array stores 'all', 'new' and 'obsolete' messages for all valid domains.
*
* The data structure of this array is as follows:
- * ```php
- * array(
- * 'domain 1' => array(
- * 'all' => array(...),
- * 'new' => array(...),
- * 'obsolete' => array(...)
- * ),
- * 'domain 2' => array(
- * 'all' => array(...),
- * 'new' => array(...),
- * 'obsolete' => array(...)
- * ),
- * ...
- * )
- * ```
+ *
+ * array(
+ * 'domain 1' => array(
+ * 'all' => array(...),
+ * 'new' => array(...),
+ * 'obsolete' => array(...)
+ * ),
+ * 'domain 2' => array(
+ * 'all' => array(...),
+ * 'new' => array(...),
+ * 'obsolete' => array(...)
+ * ),
+ * ...
+ * )
*
* @var array The array that stores 'all', 'new' and 'obsolete' messages
*/
*/
public function getMessages($domain)
{
- if (!in_array($domain, $this->getDomains())) {
+ if (!\in_array($domain, $this->getDomains())) {
throw new InvalidArgumentException(sprintf('Invalid domain: %s.', $domain));
}
*/
public function getNewMessages($domain)
{
- if (!in_array($domain, $this->getDomains())) {
+ if (!\in_array($domain, $this->getDomains())) {
throw new InvalidArgumentException(sprintf('Invalid domain: %s.', $domain));
}
*/
public function getObsoleteMessages($domain)
{
- if (!in_array($domain, $this->getDomains())) {
+ if (!\in_array($domain, $this->getDomains())) {
throw new InvalidArgumentException(sprintf('Invalid domain: %s.', $domain));
}