Completed
Push — master ( 065363...35d2f6 )
by Wachter
28:04 queued 25:44
created

TestHandler::handle()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 4
nc 2
nop 1
1
<?php
2
3
/*
4
 * This file is part of php-task library.
5
 *
6
 * (c) php-task
7
 *
8
 * This source file is subject to the MIT license that is bundled
9
 * with this source code in the file LICENSE.
10
 */
11
12
namespace Task\TaskBundle\Tests\Functional;
13
14
use Task\Handler\TaskHandlerInterface;
15
16
/**
17
 * This handler is used for testing purpose.
18
 */
19
class TestHandler implements TaskHandlerInterface
20
{
21
    /**
22
     * {@inheritdoc}
23
     */
24
    public function handle($workload)
25
    {
26
        if (empty($workload)) {
27
            return 'No workload.';
28
        }
29
30
        return strrev($workload);
31
    }
32
}
33