protected function getAttributes( array $attributes ) : array
   {

      $result = [];

      foreach ( $attributes as $attribute )
      {
         if ( ! ( $attribute instanceof Descriptor ) )
         {
            continue;
         }
         $result[ $attribute->getName() ] = $attribute;
      }

      return $result;

   }