@@ 75-91 (lines=17) @@ | ||
72 | * @return $this |
|
73 | * @throws LogicException |
|
74 | */ |
|
75 | public function addClass($class) |
|
76 | { |
|
77 | if (!is_string($class)) { |
|
78 | $exMsg = sprintf('Provided class `%s` is not a string', $class); |
|
79 | throw new LogicException($exMsg); |
|
80 | } |
|
81 | ||
82 | $currentClass = $this->getClass(); |
|
83 | if (in_array($class, $currentClass)) { |
|
84 | $exMsg = sprintf('Provided class `%s` is already registered', $class); |
|
85 | throw new LogicException($exMsg); |
|
86 | } |
|
87 | ||
88 | $this->class[] = $class; |
|
89 | ||
90 | return $this; |
|
91 | } |
|
92 | ||
93 | /** |
|
94 | * Get properties |
@@ 73-89 (lines=17) @@ | ||
70 | * @return $this |
|
71 | * @throws LogicException |
|
72 | */ |
|
73 | public function addClass($class) |
|
74 | { |
|
75 | if (!is_string($class)) { |
|
76 | $exMsg = sprintf('Provided class `%s` is not a string', $class); |
|
77 | throw new LogicException($exMsg); |
|
78 | } |
|
79 | ||
80 | $currentClass = $this->getClass(); |
|
81 | if (in_array($class, $currentClass)) { |
|
82 | $exMsg = sprintf('Provided class `%s` is already registered', $class); |
|
83 | throw new LogicException($exMsg); |
|
84 | } |
|
85 | ||
86 | $this->class[] = $class; |
|
87 | ||
88 | return $this; |
|
89 | } |
|
90 | ||
91 | /** |
|
92 | * Get rel |