for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the tmilos/scim-schema package.
*
* (c) Milos Tomic <[email protected]>
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace Tmilos\ScimSchema\Validator;
class ValidationError
{
/** @var string */
private $attributeName;
private $parentAttribute;
private $schemaId;
private $message;
/**
* @param string $attributeName
* @param string $parentAttribute
* @param string $schemaId
* @param string $message
public function __construct($attributeName, $parentAttribute, $schemaId, $message)
$this->attributeName = $attributeName;
$this->parentAttribute = $parentAttribute;
$this->schemaId = $schemaId;
$this->message = $message;
}
* @return string
public function getAttributeName()
return $this->attributeName;
public function getParentAttribute()
return $this->parentAttribute;
public function getSchemaId()
return $this->schemaId;
public function getMessage()
return $this->message;
public function __toString()
return sprintf(
'[%s%s] %s [%s]',
$this->parentAttribute ? $this->parentAttribute.'.' : '',
$this->attributeName,
$this->message,
$this->schemaId
);