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

miaoxing / plugin / 8087674491

20 Feb 2024 01:12PM UTC coverage: 38.266% (-0.09%) from 38.351%
8087674491

push

github

semantic-release-bot
chore(release): publish

See CHANGELOG.md for more details.

905 of 2365 relevant lines covered (38.27%)

6.0 hits per line

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

0.0
/src/functions.php
1
<?php
2

3
use Miaoxing\Plugin\Service\Ret;
4

5
if (!function_exists('suc')) {
6
    /**
7
     * Return operation successful result
8
     *
9
     * @param string|array|null $message
10
     * @return Ret
11
     */
12
    function suc($message = null)
13
    {
14
        return Ret::suc($message);
×
15
    }
16
}
17

18
if (!function_exists('err')) {
19
    /**
20
     * Return operation failed result, and logs with an info level
21
     *
22
     * @param array|string $message
23
     * @param int $code
24
     * @param string|null $level
25
     * @return Ret
26
     */
27
    function err($message, $code = null, $level = null)
28
    {
29
        return Ret::err(...func_get_args());
×
30
    }
31
}
32

33
if (!function_exists('ret')) {
34
    /**
35
     * Return operation result data
36
     *
37
     * @param array|string $message
38
     * @param int $code
39
     * @param string $type
40
     * @return mixed|string
41
     */
42
    function ret($message, $code = null, $type = null)
43
    {
44
        return wei()->ret->__invoke(...func_get_args());
×
45
    }
46
}
47

48
if (!function_exists('req')) {
49
    function req($name = null)
50
    {
51
        return null === $name ? wei()->req : wei()->req[$name];
×
52
    }
53
}
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

© 2025 Coveralls, Inc