• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

jojo1981 / php-types / 12707605573

10 Jan 2025 10:18AM UTC coverage: 88.119%. Remained the same
12707605573

push

github

jojo1981
Use GitHub actions workflow for CI instead of Travis CI.

267 of 303 relevant lines covered (88.12%)

16.43 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/src/CallableType.php
1
<?php declare(strict_types=1);
2
/*
3
 * This file is part of the jojo1981/php-types package
4
 *
5
 * Copyright (c) 2020 Joost Nijhuis <jnijhuis81@gmail.com>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed in the root of the source code
9
 */
10
namespace Jojo1981\PhpTypes;
11

12
use function is_callable;
13

14
/**
15
 * @package Jojo1981\PhpTypes
16
 */
17
final class CallableType extends AbstractCompoundType
18
{
19
    /**
20
     * @return string
21
     */
22
    public function getName(): string
23
    {
24
        return 'callable';
3✔
25
    }
26

27
    /**
28
     * @return bool
29
     */
30
    public function isCallable(): bool
31
    {
32
        return true;
1✔
33
    }
34

35
    /**
36
     * @param mixed $value
37
     * @return bool
38
     */
39
    public function isAssignableValue($value): bool
40
    {
41
        return is_callable($value);
1✔
42
    }
43
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc