1 | <?php namespace Arcanesoft\Seo\Helpers; |
||
9 | class SeoChecker |
||
10 | { |
||
11 | /* ----------------------------------------------------------------- |
||
12 | | Constants |
||
13 | | ----------------------------------------------------------------- |
||
14 | */ |
||
15 | const STATUS_DANGER = 'danger'; |
||
16 | const STATUS_GOOD = 'good'; |
||
17 | const STATUS_WARNING = 'warning'; |
||
18 | |||
19 | /* ----------------------------------------------------------------- |
||
20 | | Main Methods |
||
21 | | ----------------------------------------------------------------- |
||
22 | */ |
||
23 | /** |
||
24 | * Check the title content. |
||
25 | * |
||
26 | * @param string $title |
||
27 | * @param int $min |
||
28 | * @param int $max |
||
29 | * |
||
30 | * @return string |
||
31 | */ |
||
32 | public static function checkTitle($title, $min = 40, $max = 60) |
||
36 | |||
37 | /** |
||
38 | * Check the description content. |
||
39 | * |
||
40 | * @param string $description |
||
41 | * @param int $min |
||
42 | * @param int $max |
||
43 | * |
||
44 | * @return string |
||
45 | */ |
||
46 | public static function checkDescription($description, $min = 140, $max = 160) |
||
50 | |||
51 | /* ----------------------------------------------------------------- |
||
52 | | Other Methods |
||
53 | | ----------------------------------------------------------------- |
||
54 | */ |
||
55 | /** |
||
56 | * Check the value with min & max length. |
||
57 | * |
||
58 | * @param string $value |
||
59 | * @param int $min |
||
60 | * @param int $max |
||
61 | * |
||
62 | * @return string |
||
63 | */ |
||
64 | protected static function check($value, $min, $max) |
||
76 | } |
||
77 |