/** * Replace marker * * @return void */ private function replace() { foreach ($this->replacementArray as $_key => $_value) { if (String::isValid($_value)) { $this->replaceString($_key, $_value); } elseif (Collection::isValid($_value)) { $this->replaceArray($_key, $_value); } elseif (Object::isValid($_value)) { $this->replaceObject($_key, $_value); } } $this->cleanup(); }
/** * */ public function testIsValid() { $this->assertInternalType('bool', Object::isValid(['a', 'b', 'c'])); $this->assertInternalType('bool', Object::isValid('')); $this->assertInternalType('bool', Object::isValid(NULL)); /** @noinspection PhpParamsInspection */ $this->assertInternalType('bool', Object::isValid(new stdClass())); $this->assertFalse(Object::isValid(['a', 'b', 'c'])); $this->assertFalse(Object::isValid('abc')); $this->assertFalse(Object::isValid(NULL)); /** @noinspection PhpParamsInspection */ $this->assertTrue(Object::isValid(new stdClass())); }