/** * @param $source * @return string */ private function addTarget($source) { if (String::isNotEmpty($this->getTarget())) { $source .= ' target="' . $this->target . '"'; return $source; } return $source; }
/** * @param $controller * @param $directory * @return array|string */ private static function loadSpecificController($controller, Directory $directory) { $className = ''; if (String::isNotEmpty($controller)) { $fileName = self::findControllerFilename($controller, $directory); /** @noinspection PhpIncludeInspection */ include_once $fileName; $className = self::generateClassName($fileName); $className = String::replace('.php', '', implode('\\', $className)); return $className; } return $className; }
/** * @param $source * @return string */ protected function addId($source) { if (String::isNotEmpty($this->getCssId())) { $source .= ' id="' . $this->getCssId() . '"'; return $source; } return $source; }
/** * */ public function testIsNotEmptyWithWrongDatatype() { $this->assertFalse(String::isNotEmpty(['a', 'b', 'c'])); }