original_string: protected function castSetting($key, $value)
      {
          if (is_null($value)) {
              return $value;
          }
  
          if (!in_array($key, $this->notBooleans) && in_array($value, ['0', '1'])) {
              return (bool) $value;
          }
  
          return $value;
      }
code: protected function castSetting($key, $value)
      {
          if (is_null($value)) {
              return $value;
          }
  
          if (!in_array($key, $this->notBooleans) && in_array($value, ['0', '1'])) {
              return (bool) $value;
          }
  
          return $value;
      }
code_tokens: protected function castSetting ( $ key , $ value ) { if ( is_null ( $ value ) ) { return $ value ; } if ( ! in_array ( $ key , $ this -> notBooleans ) && in_array ( $ value , [ '0' , '1' ] ) ) { return ( bool ) $ value ; } return $ value ; }
docstring: Cast setting as the applicable type.
  
  @param string $key
  @param string $value
  
  @return mixed
docstring_tokens: Cast setting as the applicable type .