function doesNotContainAnySubString($haystack, array $needles) { foreach ($needles as $needle) { if (containsSubString($haystack, $needle)) { return false; } } return true; }
/** * @param string $portType * @return void */ private function errorTest($portType) { if (!containsSubString($portType, 'in') && !containsSubString($portType, 'out') && !containsSubString($portType, 'error')) { if (isset($this->outPorts['error']) && $this->outPorts['error']->isAttached()) { $this->outPorts['error']->send('did not contain in or out! instead it was: `' . $portType . '`; '); } } }