소스 검색

[Routing] Fix the exception inheritance + Add the LICENCE block in new files

alexandresalome 14 년 전
부모
커밋
5aaa78d9ca

+ 21 - 0
src/Symfony/Component/Routing/Exception/Exception.php

@@ -0,0 +1,21 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Routing\Exception;
+
+/**
+ * Exception
+ *
+ * @author Alexandre Salomé <alexandre.salome@gmail.com>
+ */
+interface Exception
+{
+}

+ 10 - 1
src/Symfony/Component/Routing/Exception/InvalidParameterException.php

@@ -1,5 +1,14 @@
 <?php
 
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
 namespace Symfony\Component\Routing\Exception;
 
 /**
@@ -7,6 +16,6 @@ namespace Symfony\Component\Routing\Exception;
  *
  * @author Alexandre Salomé <alexandre.salome@gmail.com>
  */
-class InvalidParameterException extends RoutingException
+class InvalidParameterException extends \InvalidArgumentException implements Exception
 {
 }

+ 10 - 1
src/Symfony/Component/Routing/Exception/MissingMandatoryParametersException.php

@@ -1,5 +1,14 @@
 <?php
 
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
 namespace Symfony\Component\Routing\Exception;
 
 /**
@@ -8,6 +17,6 @@ namespace Symfony\Component\Routing\Exception;
  *
  * @author Alexandre Salomé <alexandre.salome@gmail.com>
  */
-class MissingMandatoryParametersException extends RoutingException
+class MissingMandatoryParametersException extends \InvalidArgumentException implements Exception
 {
 }

+ 10 - 1
src/Symfony/Component/Routing/Exception/NotExistingRouteException.php

@@ -1,5 +1,14 @@
 <?php
 
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
 namespace Symfony\Component\Routing\Exception;
 
 /**
@@ -7,6 +16,6 @@ namespace Symfony\Component\Routing\Exception;
  *
  * @author Alexandre Salomé <alexandre.salome@gmail.com>
  */
-class NotExistingRouteException extends RoutingException
+class NotExistingRouteException extends \InvalidArgumentException implements Exception
 {
 }

+ 0 - 12
src/Symfony/Component/Routing/Exception/RoutingException.php

@@ -1,12 +0,0 @@
-<?php
-
-namespace Symfony\Component\Routing\Exception;
-
-/**
- * Base routing exception
- *
- * @author Alexandre Salomé <alexandre.salome@gmail.com>
- */
-class RoutingException extends \Exception
-{
-}