@@ -74,7 +74,7 @@ public function createMessage(string $body = '', array $properties = [], array $
7474 */
7575 public function createQueue (string $ name ): Queue
7676 {
77- if (0 !== strpos ($ name , '/ ' )) {
77+ if (! str_starts_with ($ name , '/ ' )) {
7878 $ destination = new StompDestination ($ this ->extensionType );
7979 $ destination ->setType (StompDestination::TYPE_QUEUE );
8080 $ destination ->setStompName ($ name );
@@ -101,7 +101,7 @@ public function createTemporaryQueue(): Queue
101101 */
102102 public function createTopic (string $ name ): Topic
103103 {
104- if (0 !== strpos ($ name , '/ ' )) {
104+ if (! str_starts_with ($ name , '/ ' )) {
105105 $ destination = new StompDestination ($ this ->extensionType );
106106 $ destination ->setType ($ this ->useExchangePrefix ? StompDestination::TYPE_EXCHANGE : StompDestination::TYPE_TOPIC );
107107 $ destination ->setStompName ($ name );
@@ -130,7 +130,7 @@ public function createDestination(string $destination): StompDestination
130130
131131 foreach ($ types as $ _type ) {
132132 $ typePrefix = '/ ' .$ _type .'/ ' ;
133- if (0 === strpos ($ dest , $ typePrefix )) {
133+ if (str_starts_with ($ dest , $ typePrefix )) {
134134 $ type = $ _type ;
135135 $ dest = substr ($ dest , strlen ($ typePrefix ));
136136
@@ -225,7 +225,7 @@ private function createStomp(): BufferedStompClient
225225 $ stomp = call_user_func ($ this ->stompFactory );
226226
227227 if (false == $ stomp instanceof BufferedStompClient) {
228- throw new \LogicException (sprintf ('The factory must return instance of BufferedStompClient. It returns %s ' , is_object ($ stomp ) ? get_class ( $ stomp) : gettype ($ stomp )));
228+ throw new \LogicException (sprintf ('The factory must return instance of BufferedStompClient. It returns %s ' , is_object ($ stomp ) ? $ stomp::class : gettype ($ stomp )));
229229 }
230230
231231 return $ stomp ;
0 commit comments