Split parser related files to have one class in one file
[lhc/web/wiklou.git] / includes / libs / ReplacementArray.php
index 4512a4b..46f9358 100644 (file)
  * Wrapper around strtr() that holds replacements
  */
 class ReplacementArray {
-       private $data = false;
+       private $data = [];
 
        /**
         * Create an object with the specified replacement array
         * The array should have the same form as the replacement array for strtr()
         * @param array $data
         */
-       public function __construct( $data = [] ) {
+       public function __construct( array $data = [] ) {
                $this->data = $data;
        }
 
@@ -44,12 +44,12 @@ class ReplacementArray {
         * Set the whole replacement array at once
         * @param array $data
         */
-       public function setArray( $data ) {
+       public function setArray( array $data ) {
                $this->data = $data;
        }
 
        /**
-        * @return array|bool
+        * @return array
         */
        public function getArray() {
                return $this->data;