verifies that the method on the class was never called

@api
@return  bool
@throws  \bovigo\callmap\CallAmountViolation
332123
public function wasNeverCalled(): bool
    {
        if (count($this->invocations) > 0) {
            throw new CallAmountViolation(sprintf(
                    '%s was not expected to be called,'
                    . ' but actually called %d time(s).',
                    $this->invocations->name(),
                    count($this->invocations)
            ));
        }

        return true;
    }
598998
protected function parseCall()
    {

        if ($this->call instanceof Closure) {
            $this->callClass = Closure::class;
            $this->callMethod = '';
            $this->isStaticMethod = false;
            $this->isFunction = false;
            $this->isClosure = true;
            return;
        }

        list($class, $method) = $this->toClassAndMethod($this->call);

        if ($class === '') {
            $this->callClass = '';
            $this->callMethod = $method;
            $this->isStaticMethod = false;
            $this->isFunction = true;
            $this->isClosure = false;
            return;
        }

        $this->callClass = $class;
        $this->callMethod = $method;
        $this->isFunction = false;
        $this->isClosure = false;

        $reflection = new ReflectionMethod($class, $method);
        $this->isStaticMethod = $reflection->isStatic();

        if (!$reflection->isPublic()) {
            throw new LogicException("Method '$method' of $class is not public and therefore not callable.");
        }

        return;

    }
165476
protected function _isActionMapped()
    {
        if (!empty($this->dispatchComponents)) {
            foreach ($this->dispatchComponents as $component => $enabled) {
                if (empty($enabled)) {
                    continue;
                }

                // Skip if isActionMapped isn't defined in the Component
                if (!method_exists($this->{$component}, 'isActionMapped')) {
                    continue;
                }

                // Skip if the action isn't mapped
                if (!$this->{$component}->isActionMapped()) {
                    continue;
                }

                // Skip if execute isn't defined in the Component
                if (!method_exists($this->{$component}, 'execute')) {
                    continue;
                }

                // Return the component instance.
                return $this->{$component};
            }
        }

        return false;
    }
146940
public function IsSponsored()
    {
        $bIsSponsored = $this->GetFromInternalCache('bVoucherIsSponsored');
        if (is_null($bIsSponsored)) {
            $bIsSponsored = false;
            $oVoucherSeries = $this->GetFieldShopVoucherSeries();
            if ($oVoucherSeries && !empty($oVoucherSeries->fieldShopVoucherSeriesSponsorId)) {
                $bIsSponsored = true;
            }
            $this->SetInternalCache('bVoucherIsSponsored', $bIsSponsored);
        }

        return $bIsSponsored;
    }
1196682
public function getCallInstance()
    {
        if ($this->callInstance !== false) {
            return $this->callInstance;
        }

        if (is_array($this->call) && isset($this->call[0]) && is_object($this->call[0])) {
            $this->callInstance = $this->call[0];
            return $this->callInstance;
        }

        if (is_object($this->call) && method_exists($this->call, '__invoke')){
            $this->callInstance = $this->call;
            return $this->callInstance;
        }

        if ($this->isFunction() || $this->isStaticMethod()) {
            $this->callInstance = null;
            return $this->callInstance;
        }

        $this->callInstance = $this->resolveCallInstance($this->getCallClass());

        return $this->callInstance;
    }
34688
public function current() {

        if (!$this->recordset->valid()) {
            return false;
        }

        if (!$record = $this->recordset->current()) {
            return false;
        }

        // Apply callback and return.
        if (!is_null($this->callbackextra)) {
            return call_user_func($this->callback, $record, $this->callbackextra);
        } else {
            return call_user_func($this->callback, $record);
        }
    }
126352
protected function withoutModelEvents()
    {
        $mock = Mockery::mock('Illuminate\Contracts\Events\Dispatcher');

        $mock->shouldReceive('dispatch')->andReturnUsing(function ($called) {
            $this->firedModelEvents[] = $called;
        });

        $mock->shouldReceive('until')->andReturnUsing(function ($called) {
            $this->firedModelEvents[] = $called;

            return true;
        });

        $mock->shouldReceive('listen')->andReturnUsing(function ($event, $listener) {
            //
        });

        Model::setEventDispatcher($mock);

        return $this;
    }
1282053
public function callMe()
    {
        $output = $this->dispatchStartEvent();

        /** @var \Brainworxx\Krexx\Service\Reflection\ReflectionClass $ref */
        $ref = $this->parameters[static::PARAM_REF];
        $refProps = $ref->getProperties(\ReflectionProperty::IS_PROTECTED);
        if (empty($refProps) === true) {
            return $output;
        }

        usort($refProps, array($this, 'reflectionSorting'));

        return $output .
            $this->getReflectionPropertiesData(
                $refProps,
                $ref,
                'Protected properties'
            );
    }
603904
public function isActive(): bool
    {
        if (is_callable($activeWhen = $this->activeWhen)) {
            return call_user_func($activeWhen);
        }

        if ($this->route) {
            return $this->hasActiveStateFromRoute();
        }

        return $this->hasActiveStateFromUrl();
    }
540756
private function isMagicFunctionWithoutReturn(): bool
    {
        $whitelist = [
            '__construct',
            '__destruct',
            '__clone',
            '__wakeup',
            '__set',
            '__unset',
        ];

        $stackToken = $this->tokens[$this->stackPos];

        $functionNamePtr = $this->file->getBaseFile()->findNext(
            [T_STRING],
            $this->stackPos + 1,
            $stackToken['parenthesis_opener']
        );

        $functionNameToken = $this->tokens[$functionNamePtr];

        return in_array($functionNameToken['content'], $whitelist, true);
    }
475432
public function hasResultFor(string $method, int $invocationCount): bool
    {
        if (!array_key_exists($method, $this->callMap)) {
            return false;
        }

        if ($this->callMap[$method] instanceof InvocationResults) {
            return $this->callMap[$method]->hasResultForInvocation($invocationCount - 1);
        }

        return true;
    }
1363535
public function methodIsCallable($method)
    {
        return ! $this->methodIsBlacklisted($method) &&
            method_exists($this, $method) &&
            ! method_exists(ModelFilter::class, $method);
    }
977293
public function isFirstCall() {
        if (!$this->stepAction && $this->stepCollection->isFirst($this->stepCollectionIterator->current()))
            return true;
        else return false;
    }
1219632
public function isValid()
    {
        if ( ! empty($this->name) and $this->hasMethod('__call') and $this->isSubclassOf('\O2System\Kernel\Http\Controller')) {
            return true;
        }

        return false;
    }
414575
public function isCallable()
    {
        if (!method_exists($this->controller, $this->action)) {
            return false;
        }

        $reflection = new \ReflectionMethod($this->controller, $this->action);
        if (!$reflection->isPublic()) {
            return false;
        }

        return true;
    }
684486
def assert_not_called(_mock_self):
        
        self = _mock_self
        if self.call_count != 0:
            msg = ("Expected '%s' to not have been called. Called %s times." %
                   (self._mock_name or 'mock', self.call_count))
            raise AssertionError(msg)
533330
private static function _checkLoaded()
    {
        $cls = get_called_class();
        if (!array_key_exists($cls, self::$_loaded)) {
            self::$_loaded[$cls] = false;
        }
        if (!self::$_loaded[$cls]) {
            self::_loadColumns();
        }
    }